<!-- Option: Display Alternate Graphic Representation (MARC 880) -->
<xsl:variable name="display880" select="boolean(marc:datafield[@tag=880])"/>
+ <xsl:variable name="UseControlNumber" select="1"/>
<xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
<xsl:variable name="OPACURLOpenInNewWindow" select="marc:sysprefs/marc:syspref[@name='OPACURLOpenInNewWindow']"/>
<xsl:variable name="URLLinkText" select="marc:sysprefs/marc:syspref[@name='URLLinkText']"/>
<xsl:variable name="ShowISBD" select="marc:sysprefs/marc:syspref[@name='viewISBD']"/>
+
+ <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
+ <xsl:variable name="UseAuthoritiesForTracings" select="marc:sysprefs/marc:syspref[@name='UseAuthoritiesForTracings']"/>
<xsl:variable name="leader" select="marc:leader"/>
<xsl:variable name="leader6" select="substring($leader,7,1)"/>
<xsl:variable name="leader7" select="substring($leader,8,1)"/>
+ <xsl:variable name="leader19" select="substring($leader,20,1)"/>
<xsl:variable name="controlField008" select="marc:controlfield[@tag=008]"/>
<xsl:variable name="materialTypeCode">
<xsl:choose>
+ <xsl:when test="$leader19='a'">ST</xsl:when>
<xsl:when test="$leader6='a'">
<xsl:choose>
<xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">BK</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="$leader6='t'">BK</xsl:when>
- <xsl:when test="$leader6='p'">MX</xsl:when>
+ <xsl:when test="$leader6='o' or $leader6='p'">MX</xsl:when>
<xsl:when test="$leader6='m'">CF</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">MP</xsl:when>
- <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">VM</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">VM</xsl:when>
<xsl:when test="$leader6='i' or $leader6='j'">MU</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">PR</xsl:when>
</xsl:choose>
</xsl:variable>
<xsl:variable name="materialTypeLabel">
<xsl:choose>
+ <xsl:when test="$leader19='a'">Set</xsl:when>
<xsl:when test="$leader6='a'">
<xsl:choose>
<xsl:when test="$leader7='c' or $leader7='d' or $leader7='m'">Book</xsl:when>
- <xsl:when test="$leader7='i' or $leader7='s'">Continuing Resource</xsl:when>
+ <xsl:when test="$leader7='i' or $leader7='s'">
+ <xsl:choose>
+ <xsl:when test="substring($controlField008,22,1)!='m'">Continuing Resource</xsl:when>
+ <xsl:otherwise>Series</xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
<xsl:when test="$leader7='a' or $leader7='b'">Article</xsl:when>
</xsl:choose>
</xsl:when>
<xsl:when test="$leader6='t'">Book</xsl:when>
+ <xsl:when test="$leader6='o'">Kit</xsl:when>
<xsl:when test="$leader6='p'">Mixed Materials</xsl:when>
<xsl:when test="$leader6='m'">Computer File</xsl:when>
<xsl:when test="$leader6='e' or $leader6='f'">Map</xsl:when>
- <xsl:when test="$leader6='g' or $leader6='k' or $leader6='o' or $leader6='r'">Visual Material</xsl:when>
+ <xsl:when test="$leader6='g' or $leader6='k' or $leader6='r'">Visual Material</xsl:when>
<xsl:when test="$leader6='j'">Music</xsl:when>
<xsl:when test="$leader6='i'">Sound</xsl:when>
<xsl:when test="$leader6='c' or $leader6='d'">Score</xsl:when>
</xsl:if>
<xsl:if test="marc:datafield[@tag=245]">
- <h1>
+ <h1 class="title">
<xsl:for-each select="marc:datafield[@tag=245]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
<xsl:for-each select="marc:datafield[@tag=100 or @tag=700]">
<a>
<xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="marc:datafield[@tag=110 or @tag=710]">
<a>
<xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
</xsl:choose>
<a>
<xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
</h5>
</xsl:when>
</xsl:choose>
- <div id="views">
- <span class="view"><span id="Normalview">Normal View</span> </span>
- <span class="view"><a id="MARCviewPop" href="/cgi-bin/koha/opac-showmarc.pl?id={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC" rel="gb_page_center[600,500]">MARC View</a></span>
- <span class="view"><a id="MARCview" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}" title="MARC">Expanded MARC View</a></span>
-<xsl:if test="$ShowISBD!='0'">
- <span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}">Card View (ISBD)</a></span>
-</xsl:if>
- </div>
<xsl:if test="$DisplayOPACiconsXSLT!='0'">
<xsl:if test="$materialTypeCode!=''">
<span class="results_summary"><span class="label">Type: </span>
- <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt"></xsl:attribute></xsl:element>
+ <xsl:element name="img"><xsl:attribute name="src">/opac-tmpl/prog/famfamfam/<xsl:value-of select="$materialTypeCode"/>.png</xsl:attribute><xsl:attribute name="alt">materialTypeLabel</xsl:attribute><xsl:attribute name="class">materialtype</xsl:attribute></xsl:element>
<xsl:value-of select="$materialTypeLabel"/>
</span>
</xsl:if>
</xsl:call-template>
</xsl:if>
+ <!-- Series -->
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
<span class="results_summary"><span class="label">Series: </span>
+ <!-- 440 -->
<xsl:for-each select="marc:datafield[@tag=440]">
<a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
<xsl:call-template name="chopPunctuation">
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</xsl:for-each>
- <xsl:for-each select="marc:datafield[@tag=490]">
+ <!-- 490 Series not traced, Ind1 = 0 -->
+ <xsl:for-each select="marc:datafield[@tag=490][@ind1=0]">
<a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='a']}">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="part"/>
<xsl:choose><xsl:when test="position()=last()"><xsl:text>.</xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</xsl:for-each>
+ <!-- 490 Series traced, Ind1 = 1 -->
+ <xsl:if test="marc:datafield[@tag=490][@ind1=1]">
+ <xsl:for-each select="marc:datafield[@tag=800 or @tag=810 or @tag=811 or @tag=830]">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='w']">
+ <a href="/cgi-bin/koha/opac-search.pl?q=rcn:{marc:subfield[@code='w']}">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">at</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a href="/cgi-bin/koha/opac-search.pl?q=se:{marc:subfield[@code='t']}">
+ <xsl:call-template name="chopPunctuation">
+ <xsl:with-param name="chopString">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">at</xsl:with-param>
+ </xsl:call-template>
+ </xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:call-template name="part"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>: </xsl:text>
+ <xsl:value-of select="marc:subfield[@code='v']" />
+ <xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
+ </xsl:for-each>
+ </xsl:if>
+ </span>
+ </xsl:if>
+
+ <!-- Volumes of sets and traced series -->
+ <xsl:if test="$materialTypeCode='ST' or substring($controlField008,22,1)='m'">
+ <span class="results_summary"><span class="label">Volumes: </span>
+ <a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '/', '')"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:text>Show volumes</xsl:text>
+ </a>
+ </span>
+ </xsl:if>
+
+ <!-- Set -->
+ <xsl:if test="$leader19='c'">
+ <span class="results_summary"><span class="label">Set: </span>
+ <xsl:for-each select="marc:datafield[@tag=773]">
+ <a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:value-of select="translate(//marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')" />
+ </a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
</span>
</xsl:if>
<xsl:if test="marc:datafield[@tag=260]">
<span class="results_summary"><span class="label">Publisher: </span>
<xsl:for-each select="marc:datafield[@tag=260]">
+ <xsl:if test="marc:subfield[@code='b']">
+ <a href="/cgi-bin/koha/opac-search.pl?q=pb:{marc:subfield[@code='b']}">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">b</xsl:with-param>
+ </xsl:call-template>
+ </a>
+ </xsl:if>
+ <xsl:text> </xsl:text>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString">
<xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">abcg</xsl:with-param>
+ <xsl:with-param name="codes">acg</xsl:with-param>
</xsl:call-template>
</xsl:with-param>
</xsl:call-template>
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
<a>
<xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
+ <xsl:when test="marc:subfield[@code=9] and $UseAuthoritiesForTracings='1'">
<xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="marc:subfield[@code='a']"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="chopPunctuation">
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary"><span class="label">Online Resources: </span>
<xsl:for-each select="marc:datafield[@tag=856]">
- <xsl:if test="$OPACURLOpenInNewWindow='0'">
- <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">y3z</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
- <xsl:choose>
- <xsl:when test="$URLLinkText!=''">
- <xsl:value-of select="$URLLinkText"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Click here to access online</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </a>
- </xsl:if>
- <xsl:if test="$OPACURLOpenInNewWindow='1'">
- <a target='_blank'><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
- <xsl:choose>
- <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
- <xsl:call-template name="subfieldSelect">
- <xsl:with-param name="codes">y3z</xsl:with-param>
- </xsl:call-template>
- </xsl:when>
- <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
- <xsl:choose>
- <xsl:when test="$URLLinkText!=''">
- <xsl:value-of select="$URLLinkText"/>
- </xsl:when>
- <xsl:otherwise>
- <xsl:text>Click here to access online</xsl:text>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </a>
- </xsl:if>
- <xsl:choose>
- <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
- <xsl:otherwise> | </xsl:otherwise>
- </xsl:choose>
-
+ <a><xsl:attribute name="href"><xsl:value-of select="marc:subfield[@code='u']"/></xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:if>
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='y' or @code='3' or @code='z']">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">y3z</xsl:with-param>
+ </xsl:call-template>
+ </xsl:when>
+ <xsl:when test="not(marc:subfield[@code='y']) and not(marc:subfield[@code='3']) and not(marc:subfield[@code='z'])">
+ <xsl:choose>
+ <xsl:when test="$URLLinkText!=''">
+ <xsl:value-of select="$URLLinkText"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:text>Click here to access online</xsl:text>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:when>
+ </xsl:choose>
+ </a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"><xsl:text> </xsl:text></xsl:when>
+ <xsl:otherwise> | </xsl:otherwise>
+ </xsl:choose>
</xsl:for-each>
</span>
</xsl:if>
+
+ <!-- 530 -->
+ <xsl:if test="marc:datafield[@tag=530]">
+ <xsl:for-each select="marc:datafield[@tag=530]">
+ <span class="results_summary additionalforms">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcd</xsl:with-param>
+ </xsl:call-template>
+ <xsl:for-each select="marc:subfield[@code='u']">
+ <a><xsl:attribute name="href"><xsl:value-of select="text()"/></xsl:attribute>
+ <xsl:if test="$OPACURLOpenInNewWindow='1'">
+ <xsl:attribute name="target">_blank</xsl:attribute>
+ </xsl:if>
+ <xsl:value-of select="text()"/>
+ </a>
+ </xsl:for-each>
+ </span>
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- 505 -->
<xsl:if test="marc:datafield[@tag=505]">
<xsl:for-each select="marc:datafield[@tag=505]">
- <span class="results_summary">
+ <span class="results_summary contents">
<xsl:choose>
<xsl:when test="@ind1=1">
<span class="label">Incomplete contents:</span>
</xsl:choose>
<xsl:choose>
<xsl:when test="@ind2=0">
- <xsl:for-each select="marc:subfield[@code='t']">
- <xsl:value-of select="marc:subfield[@code=t]"/> <xsl:value-of select="marc:subfield[@code=r]"/>
- </xsl:for-each>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">tru</xsl:with-param>
+ </xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="subfieldSelect">
</xsl:for-each>
</xsl:if>
+ <!-- 583 -->
+ <xsl:if test="marc:datafield[@tag=583]">
+ <xsl:for-each select="marc:datafield[@tag=583]">
+ <xsl:if test="@ind1=1 or @ind1=' '">
+ <span class="results_summary actionnote">
+ <xsl:choose>
+ <xsl:when test="marc:subfield[@code='z']">
+ <xsl:value-of select="marc:subfield[@code='z']"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdefgijklnou</xsl:with-param>
+ </xsl:call-template>
+ </xsl:otherwise>
+ </xsl:choose>
+ </span>
+ </xsl:if>
+ </xsl:for-each>
+ </xsl:if>
+
+ <!-- 586 -->
+ <xsl:if test="marc:datafield[@tag=586]">
+ <xsl:for-each select="marc:datafield[@tag=586]">
+ <span class="results_summary awardsnote">
+ <xsl:if test="@ind1=' '">
+ <span class="label">Awards: </span>
+ </xsl:if>
+ <xsl:value-of select="marc:subfield[@code='a']"/>
+ </span>
+ </xsl:for-each>
+ </xsl:if>
+
<!-- 773 -->
<xsl:if test="marc:datafield[@tag=773]">
<xsl:for-each select="marc:datafield[@tag=773]">
</xsl:choose>
</span>
<xsl:variable name="f773">
- <xsl:call-template name="subfieldSelect">
+ <xsl:call-template name="chopPunctuation"><xsl:with-param name="chopString"><xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">at</xsl:with-param>
- </xsl:call-template>
+ </xsl:call-template></xsl:with-param></xsl:call-template>
</xsl:variable>
- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
- <xsl:value-of select="translate($f773, '()', '')"/>
- </a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:call-template name="extractControlNumber"><xsl:with-param name="subfieldW" select="marc:subfield[@code='w']"/></xsl:call-template></xsl:attribute>
+ <xsl:value-of select="translate($f773, '()', '')"/><xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate($f773, '()', '')"/></xsl:attribute>
+ <xsl:value-of select="$f773"/><xsl:if test="marc:subfield[@code='g']"><xsl:text> </xsl:text><xsl:value-of select="marc:subfield[@code='g']"/></xsl:if>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
</span>
<xsl:if test="marc:subfield[@code='n']">
</span>
</xsl:if>
+ <!-- 775 Other Edition -->
+ <xsl:if test="marc:datafield[@tag=775]">
+ <span class="results_summary"><span class="label">Other Editions: </span>
+ <xsl:for-each select="marc:datafield[@tag=775]">
+ <xsl:if test="marc:subfield[@code='i']">
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">i</xsl:with-param>
+ </xsl:call-template>
+ <xsl:text>: </xsl:text>
+ </xsl:if>
+ <a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:subfield[@code='w']"/></xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Title:<xsl:value-of select="translate(marc:subfield[@code='t'], '.', '')"/></xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">t</xsl:with-param>
+ </xsl:call-template>
+ </a>
+ <xsl:choose>
+ <xsl:when test="position()=last()"></xsl:when>
+ <xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise>
+ </xsl:choose>
+ </xsl:for-each>
+ </span>
+ </xsl:if>
+
<!-- 780 -->
<xsl:if test="marc:datafield[@tag=780]">
<xsl:for-each select="marc:datafield[@tag=780]">
<xsl:with-param name="codes">at</xsl:with-param>
</xsl:call-template>
</xsl:variable>
- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
- <xsl:value-of select="translate($f780, '()', '')"/>
- </a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
+ <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
+ <xsl:value-of select="translate($f780, '()', '')"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f780, '()', '')"/></xsl:attribute>
+ <xsl:value-of select="translate($f780, '()', '')"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
</span>
<xsl:if test="marc:subfield[@code='n']">
</xsl:call-template>
</xsl:variable>
- <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
- <xsl:value-of select="translate($f785, '()', '')"/>
- </a>
+ <xsl:choose>
+ <xsl:when test="$UseControlNumber = '1' and marc:subfield[@code='w']">
+ <a href="/cgi-bin/koha/opac-search.pl?q=Control-number:{marc:subfield[@code='w']}">
+ <xsl:value-of select="translate($f785, '()', '')"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <a><xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:value-of select="translate($f785, '()', '')"/></xsl:attribute>
+ <xsl:value-of select="translate($f785, '()', '')"/>
+ </a>
+ </xsl:otherwise>
+ </xsl:choose>
</span>