<xsl:template match="marc:record">
+ <!-- Sysprefs -->
+ <xsl:variable name="SubjectModifier"><xsl:if test="marc:sysprefs/marc:syspref[@name='TraceCompleteSubfields']='1'">,complete-subfield</xsl:if></xsl:variable>
+ <xsl:variable name="TraceSubjectSubdivisions" select="marc:sysprefs/marc:syspref[@name='TraceSubjectSubdivisions']"/>
+ <xsl:variable name="TracingQuotesLeft">
+ <xsl:choose>
+ <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">{</xsl:when>
+ <xsl:otherwise>"</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="TracingQuotesRight">
+ <xsl:choose>
+ <xsl:when test="marc:sysprefs/marc:syspref[@name='UseICU']='1'">}</xsl:when>
+ <xsl:otherwise>"</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="DisplayOPACiconsXSLT" select="marc:sysprefs/marc:syspref[@name='DisplayOPACiconsXSLT']"/>
+
<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)"/>
</h5>
</xsl:when>
</xsl:choose>
- <div id="views">
- <span class="view"><span id="Normalview">Normal visning</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-visning</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">Utvidet MARC-visning</a></span>
- <span class="view"><a id="ISBDview" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber={marc:datafield[@tag=999]/marc:subfield[@code='c']}">Kortvisning (ISBD)</a></span>
- </div>
-
+ <xsl:if test="$DisplayOPACiconsXSLT!='0'">
<xsl:if test="$materialTypeCode!=''">
<span class="results_summary"><span class="label">Materialtype: </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:value-of select="$materialTypeLabel"/>
</span>
</xsl:if>
+ </xsl:if>
<!--Series -->
<xsl:if test="marc:datafield[@tag=440 or @tag=490]">
</span>
</xsl:if>
+ <!-- Subjects -->
+
<xsl:if test="marc:datafield[substring(@tag, 1, 1) = '6']">
- <span class="results_summary"><span class="label">Emner: </span>
+ <span class="results_summary subjects"><span class="label">Emne(r): </span>
<xsl:for-each select="marc:datafield[substring(@tag, 1, 1) = '6']">
<a>
<xsl:choose>
- <xsl:when test="marc:subfield[@code=9]">
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=an:<xsl:value-of select="marc:subfield[@code=9]"/></xsl:attribute>
+ <!-- Will implement this later
+ <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:when test="$TraceSubjectSubdivisions='1'">
+ <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=<xsl:call-template name="subfieldSelect">
+ <xsl:with-param name="codes">abcdvxyz</xsl:with-param>
+ <xsl:with-param name="delimeter"> AND </xsl:with-param>
+ <xsl:with-param name="prefix">(su<xsl:value-of select="$SubjectModifier"/>:<xsl:value-of select="$TracingQuotesLeft"/></xsl:with-param>
+ <xsl:with-param name="suffix"><xsl:value-of select="$TracingQuotesRight"/>)</xsl:with-param>
+ </xsl:call-template>
+ </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="$TracingQuotesLeft"/><xsl:value-of select="marc:subfield[@code='a']"/><xsl:value-of select="$TracingQuotesRight"/></xsl:attribute>
</xsl:otherwise>
</xsl:choose>
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="subdivDelimiter">-- </xsl:with-param>
</xsl:call-template>
</xsl:with-param>
- </xsl:call-template></a>
+ </xsl:call-template>
+ </a>
<xsl:choose>
<xsl:when test="position()=last()"></xsl:when>
<xsl:otherwise> | </xsl:otherwise>