Bug 12842: Add DDC classification numbers to MARC21 XSLT detail page

Patch will add DDC classifications, divided with | below the subjects
in the OPAC and staff detail pages.

To test:
- catalogue a record with one or mulitple 082$a subfields
- verify the classifications are displayed in OPAC and staff detail page
- Add following CSS to OpacUserCSS or IntranetUserCSS:

.results_summary.ddc {
  display:none;
}

- Verify the DDC classifications are now no longer displayed

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Test plan ok. Repetions of $a subfield are separated by a space, which seems
correct. I'm not sure whether other subfield than $a should be displayed on
intranet. Whatever, this could be added later.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Katrin Fischer 2014-08-28 15:17:10 +02:00 committed by Tomas Cohen Arazi
parent 011d8e9855
commit f383fe0ffe
2 changed files with 33 additions and 0 deletions

View file

@ -565,6 +565,22 @@
</span>
</xsl:if>
<!-- DDC classification -->
<xsl:if test="marc:datafield[@tag=082]">
<span class="results_summary ddc">
<span class="label">DDC classification: </span>
<xsl:for-each select="marc:datafield[@tag=082]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
<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>
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary online_resources"><span class="label">Online resources: </span>
<xsl:for-each select="marc:datafield[@tag=856]">

View file

@ -625,6 +625,23 @@
</span>
</xsl:if>
<!-- DDC classification -->
<xsl:if test="marc:datafield[@tag=082]">
<span class="results_summary ddc">
<span class="label">DDC classification: </span>
<xsl:for-each select="marc:datafield[@tag=082]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">a</xsl:with-param>
</xsl:call-template>
<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>
<!-- Image processing code added here, takes precedence over text links including y3z text -->
<xsl:if test="marc:datafield[@tag=856]">
<span class="results_summary online_resources"><span class="label">Online resources: </span>