Commit 9d20012e authored by Jerome Chauveau's avatar Jerome Chauveau
Browse files

Merge branch 'dev' of git.unicaen.fr:pdn-certic/MaX into dev

parents 88859717 ec252b56
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -8,7 +8,11 @@ declare variable $id external;

let $locale := max.i18n:getLang($project)

return <nav class="article_actions">
return 
 if($id='eadheader' or $id='archdesc')
    then ()
    else
<nav class="article_actions">
	<ul>
		<li>
			<label>
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ function max.plugin.metadata:getMetadataDocument($project, $doc, $tag, $search a
    let $html := max.html:render(
            $project, $doc,
            <div>
                <div class="plugins-wrapper">{max.html:invokePluginXQueries($project, $doc, ())}</div>
                <div class="plugins-wrapper">{max.html:invokePluginXQueries($project, $doc, $tag)}</div>
                <div id='text'>
                  {xslt:transform(
                    $xml, 
+4 −1
Original line number Diff line number Diff line

declare variable $id external;

(:hides pdf export in eadheader or archdesc consult context :)
    if($id='eadheader' or $id='archdesc')
    then ()
    else
        <div class="ead2pdf">
            <a role="button" title="Export pdf" target="_blank" href="./ead/{$id}.pdf">
                &#8682;<span class="texte">PDF</span>
+5 −4
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@ function max.plugin.ead_search:searchPage($project){
    let $simpleSearch := 
        <section>
    <p>La recherche peut se faire de deux manières indépendantes : </p><ul><li>soit par une recherche en plein texte,</li> <li>soit par une recherche multicritère (dont fait partie la recherche par année de production).</li></ul>
    <p>On ne peut croiser ces deux types de recherche.</p>
    <p>On ne peut pas croiser ces deux types de recherche.</p>
        <div id="ead-search-simple">
            <label>Recherche plein texte </label>
            <input id="searchInput" type="text" placeholder="Texte..."/>
@@ -86,7 +86,8 @@ function max.plugin.ead_search:searchPage($project){
            </div>
            else ()
        }
            <div id="ead-search-date-wrap">
        <!-- par défaut on masque la recherche par date -->
            <div id="ead-search-date-wrap" style="display:none">
                <input type="checkbox" id="ead-search-date-cb"/>
                <label>Année de production</label>
                <!--<div>
@@ -264,10 +265,10 @@ declare %private function max.plugin.ead_search:dateIntervalFilter($from as xs:s

    return
    for $m in $matches
        where $m/ancestor::*:c[1][@otherlevel='manuscrit']//*:unitdate[1]
        where $m/ancestor::*:c[1][@otherlevel]//*:unitdate[1]
        (: where $m//*:unitdate[1] :)
        (: let $unitDate := string((($m//*:unitdate)[1])/@normal) :)
        let $unitDate := string((($m/ancestor::*:c[1][@otherlevel='manuscrit']//*:unitdate)[1])/@normal)
        let $unitDate := string((($m/ancestor::*:c[1][@otherlevel]//*:unitdate)[1])/@normal)
        return if(contains($unitDate,'/'))
            then
            let $dates := tokenize($unitDate,'/')
+64 −34
Original line number Diff line number Diff line
@@ -31,7 +31,7 @@
      <!-- équivalent du head html -->
      <fo:layout-master-set>
        <!-- Les gabarits de page. Au moins 1 simple-page-master obligatoire-->
        <fo:simple-page-master master-name="couverture" margin-top="40mm" margin-bottom="5mm" margin-left="20mm" margin-right="40mm">
        <fo:simple-page-master master-name="couverture" margin-top="40mm" margin-bottom="20mm" margin-left="20mm" margin-right="40mm">
          <fo:region-body margin-bottom="20mm" margin-top="20mm"/>
          <fo:region-after extent="10mm" region-name="pied-couverture"/>
        </fo:simple-page-master>
@@ -67,8 +67,7 @@
      <fo:page-sequence master-reference="couverture">
        <fo:static-content flow-name="pied-couverture">
          <fo:block text-align="left" font-size="8pt" space-after="6pt">
            <xsl:value-of select="../ead:eadheader/ead:filedesc/ead:publicationstmt/ead:publisher"/>
            <xsl:text></xsl:text>
          <xsl:text>Pôle Document numérique – MRSH – université de Caen Normandie – </xsl:text>
            <xsl:value-of select="format-dateTime(current-dateTime(),'[D,2]/[M,2]/[Y]')" />
          </fo:block>
        </fo:static-content>
@@ -178,76 +177,80 @@
  </xsl:template>

  <!-- DID -->
  <xsl:template match="ead:did">
    <fo:block xsl:use-attribute-sets="table-and-caption">
      <fo:table xsl:use-attribute-sets="table">
        <fo:table-column column-width="120px"/>
        <fo:table-column />
        <fo:table-body>


  <xsl:template match="ead:c/ead:did">
    <fo:block xsl:use-attribute-sets="infoParent">
      <xsl:apply-templates/>
    </fo:block>
  </xsl:template>

  <xsl:template match="ead:c/ead:c/ead:did">
    <fo:block xsl:use-attribute-sets="infoEnfants">
      <xsl:apply-templates/>
        </fo:table-body>
      </fo:table>
    </fo:block>
  </xsl:template>

  <xsl:template match="ead:unitid | ead:unittitle | ead:language | ead:unitdate | ead:physdesc | ead:origination | ead:physloc | ead:repository | ead:materialspec">
    <fo:table-row>
      <fo:table-cell xsl:use-attribute-sets="cell">
        <fo:block xsl:use-attribute-sets="label">

  <xsl:template match="ead:unitid | ead:unittitle | ead:language | ead:unitdate | ead:origination | ead:physloc | ead:repository | ead:materialspec">
    <fo:block xsl:use-attribute-sets="divDid">
      <fo:inline xsl:use-attribute-sets="label">
        <xsl:choose>
          <xsl:when test="@label">
            <xsl:value-of select="@label"/>
            <xsl:text> : </xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:choose>
              <xsl:when test="self::ead:unitid">
                  <xsl:text>Cote(s)</xsl:text>
                <xsl:text>Cote(s) : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:unittitle">
                <xsl:text>Intitulé</xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:unitdate">
                  <xsl:text>Datation</xsl:text>
                <xsl:text>Datation : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:physdesc">
                  <xsl:text>Description matérielle</xsl:text>
                <xsl:text>Description matérielle : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:language">
                  <xsl:text>Langue(s)</xsl:text>
                <xsl:text>Langue(s) : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:origination">
                  <xsl:text>Origine</xsl:text>
                <xsl:text>Origine : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:physloc">
                  <xsl:text>Localisation physique</xsl:text>
                <xsl:text>Localisation physique : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:repository">
                  <xsl:text>Organisme responsable de l’accès intellectuel</xsl:text>
                <xsl:text>Organisme responsable de l’accès intellectuel : </xsl:text>
              </xsl:when>
              <xsl:when test="self::ead:materialspec">
                  <xsl:text>Particularités de certains types de documents</xsl:text>
                <xsl:text>Particularités de certains types de documents : </xsl:text>
              </xsl:when>
            </xsl:choose>
          </xsl:otherwise>
        </xsl:choose>
        </fo:block>
      </fo:table-cell>
      <fo:table-cell xsl:use-attribute-sets="cell">
        <fo:block xsl:use-attribute-sets="content">
      </fo:inline>
      <fo:inline xsl:use-attribute-sets="content">
        <xsl:apply-templates/>
      </fo:inline>
    </fo:block>
      </fo:table-cell>
    </fo:table-row>
  </xsl:template>

  <xsl:template match="ead:dimensions | ead:extent | ead:physfacet | ead:address">
    <fo:block>
    <fo:block xsl:use-attribute-sets="divDid">
      <fo:inline xsl:use-attribute-sets="label">
        <xsl:choose>
          <xsl:when test="@label">
            <xsl:value-of select="@label"/>
            <xsl:text> : </xsl:text>
          </xsl:when>
          <xsl:when test="@type">
            <xsl:value-of select="@type"/>
            <xsl:text> : </xsl:text>
          </xsl:when>
          <xsl:otherwise>
            <xsl:choose>
              <xsl:when test="self::ead:dimensions">
@@ -289,7 +292,7 @@
    </xsl:if>
  </xsl:template>

  <xsl:template match="ead:accessrestrict | ead:accruals | ead:acqinfo | ead:altformavail | ead:appraisal | ead:arrangement | ead:bibliography | ead:bioghist | ead:controlaccess | ead:custodhist | ead:odd | ead:originalsloc | ead:otherfindaid | ead:phystech | ead:prefercite | ead:processinfo | ead:relatedmaterial | ead:scopecontent | ead:separatedmaterial | ead:userestrict | ead:c/ead:daogroup">
  <xsl:template match="ead:accessrestrict | ead:accruals | ead:acqinfo | ead:altformavail | ead:appraisal | ead:arrangement | ead:bibliography | ead:bioghist | ead:controlaccess | ead:custodhist | ead:odd | ead:originalsloc | ead:otherfindaid | ead:phystech | ead:prefercite | ead:processinfo | ead:relatedmaterial | ead:scopecontent | ead:separatedmaterial | ead:userestrict">
    <fo:block xsl:use-attribute-sets="div">
      <xsl:choose>
        <xsl:when test="ead:head">
@@ -435,8 +438,6 @@
    </fo:list-item>
  </xsl:template>



  <xsl:template match="ead:list/ead:head" mode="titre_liste">
    <xsl:apply-templates select="node()"/>
  </xsl:template>
@@ -469,10 +470,39 @@

  <!-- Les images -->

  <xsl:template match="ead:dao">
  <xsl:template match="ead:daogrp[1]">
      <fo:inline xsl:use-attribute-sets="label">
      Document(s) iconographique(s)
    </fo:inline>
     <fo:block>
       <xsl:apply-templates/>
    </fo:block>
  </xsl:template>

  <xsl:template match="ead:daodesc">
     <fo:inline xsl:use-attribute-sets="label">
  <xsl:apply-templates/>
  </fo:inline>
</xsl:template>

  <xsl:template match="ead:daoloc">
  <fo:inline xsl:use-attribute-sets="content">
      [Image] <external-graphic src="{@*:href}" width="50%"/>
  <xsl:apply-templates/>
  </fo:inline>
</xsl:template>

 <xsl:template match="ead:dao">
   <fo:inline xsl:use-attribute-sets="label">
      FFDocument(s) iconographique(s) : 
     </fo:inline>
    <fo:block xsl:use-attribute-sets="content">
      [Image] <external-graphic src="url('file:/Users/anne/Documents/MaXStandaloneV2/maxTemplatesPDDN/templates-editions/max_ead_demo/ui/images/nummus/medaillier/DSCN7998.jpg')" width="5%"/>
  <xsl:apply-templates/>
   </fo:block>
</xsl:template>



</xsl:stylesheet>
Loading