<span class="results_summary"><span class="label">Volumes: </span>
<a>
<xsl:choose>
- <xsl:when test="$UseControlNumber = '1'">
+ <xsl:when test="$UseControlNumber = '1' and marc:controlfield[@tag=001]">
<xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=rcn:<xsl:value-of select="marc:controlfield[@tag=001]"/></xsl:attribute>
</xsl:when>
<xsl:otherwise>
<!-- 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'">
- <xsl:attribute name="href">/cgi-bin/koha/catalogue/search.pl?q=Control-number:<xsl:value-of select="marc:datafield[@tag=773]/marc:subfield[@code='w']"/></xsl:attribute>
+ <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/catalogue/search.pl?q=Title:<xsl:value-of select="translate(marc:datafield[@tag=245]/marc:subfield[@code='a'], '.', '')"/></xsl:attribute>
+ <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'], '.', '')" />
+ <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:for-each>
</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/catalogue/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/catalogue/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]">
<span class="results_summary"><span class="label">Volumes: </span>
<a>
<xsl:choose>
- <xsl:when test="$UseControlNumber = '1'">
+ <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>
<!-- 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'">
- <xsl:attribute name="href">/cgi-bin/koha/opac-search.pl?q=Control-number:<xsl:value-of select="marc:datafield[@tag=773]/marc:subfield[@code='w']"/></xsl:attribute>
+ <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: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'], '.', '')" />
+ <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>
</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]">