Bug 20986: (follow-up) Avoid br tags, but allow for line breaks to be added easily with CSS

This patch removes the br tags from the XSLT in favor of some more
spans and classes.

This will allow to add the line breaks with one line of CSS:
span.holdings_note_data { display:block; }

Signed-off-by: Liz Rea <wizzyrea@gmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Katrin Fischer 2018-09-27 19:49:27 +02:00 committed by Martin Renvoize
parent c23276324c
commit 65de22a6ef
Signed by: martin.renvoize
GPG key ID: 422B469130441A0F
2 changed files with 42 additions and 30 deletions

View file

@ -1065,36 +1065,42 @@
<!-- 866 textual holdings -->
<xsl:if test="marc:datafield[@tag=866]">
<span class="results_summary holdings_note"><span class="label">Holdings: </span><br />
<span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
<xsl:for-each select="marc:datafield[@tag=866]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>
<!-- 867 textual holdings -->
<xsl:if test="marc:datafield[@tag=867]">
<span class="results_summary holdings_note"><span class="label">Supplements: </span><br />
<span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
<xsl:for-each select="marc:datafield[@tag=867]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>
<!-- 868 textual holdings -->
<xsl:if test="marc:datafield[@tag=868]">
<span class="results_summary holdings_note"><span class="label">Indexes: </span><br />
<span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
<xsl:for-each select="marc:datafield[@tag=868]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">axz</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>

View file

@ -1201,36 +1201,42 @@
<!-- 866 textual holdings -->
<xsl:if test="marc:datafield[@tag=866]">
<span class="results_summary holdings_note"><span class="label">Holdings: </span> <br />
<span class="results_summary holdings_note basic_bibliographic_unit"><span class="label">Holdings: </span>
<xsl:for-each select="marc:datafield[@tag=866]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>
<!-- 867 textual holdings -->
<xsl:if test="marc:datafield[@tag=867]">
<span class="results_summary holdings_note"><span class="label">Supplements: </span> <br />
<span class="results_summary holdings_note supplementary_material"><span class="label">Supplements: </span>
<xsl:for-each select="marc:datafield[@tag=867]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>
<!-- 868 textual holdings -->
<xsl:if test="marc:datafield[@tag=868]">
<span class="results_summary holdings_note"><span class="label">Indexes: </span> <br />
<span class="results_summary holdings_note indexes"><span class="label">Indexes: </span>
<xsl:for-each select="marc:datafield[@tag=868]">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
<span class="holdings_note_data">
<xsl:call-template name="subfieldSelect">
<xsl:with-param name="codes">az</xsl:with-param>
</xsl:call-template>
<xsl:choose><xsl:when test="position()=last()"><xsl:text></xsl:text></xsl:when><xsl:otherwise><xsl:text>; </xsl:text><br /></xsl:otherwise></xsl:choose>
</span>
</xsl:for-each>
</span>
</xsl:if>