Bug 10218 - In OPAC XSLT search results, add class to 'online access'
In some cases in OPAC search results and the detail page there is a
class specific to each line of data being output (publisher, date,
subjects, etc). In other cases there is no additional class. This patch
makes modifications to a few different OPAC files in an attempt to make
them consistent with each other.
To test, apply the patch and view:
- an OPAC detail page with OPACXSLTDetailsDisplay off
- the OPAC search results page with OPACXSLTDetailsDisplay off
- the OPAC search results page with OPACXSLTDetailsDisplay on
Labels should have classes relevant to their data. To test the specific
case requested by this bug, view details/results for a record which
includes online resources (856u in MARC21).
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
html changes only, passes all tests
Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
(cherry picked from commit 45168efeb9)
Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
parent
cfdf4759dc
commit
cf96dd5f53
|
|
@ -591,7 +591,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
[% END %]
|
||||
|
||||
[% IF ( MARCSERIES ) %]
|
||||
<span class="results_summary"><span class="label">Series:</span>
|
||||
<span class="results_summary series"><span class="label">Series:</span>
|
||||
[% FOREACH MARCSERIE IN MARCSERIES %]
|
||||
[% FOREACH MARCSERIES_SUBFIELDS_LOO IN MARCSERIE.MARCSERIES_SUBFIELDS_LOOP %]
|
||||
[% IF ( MARCSERIES_SUBFIELDS_LOO.value ) %]<a href="/cgi-bin/koha/opac-search.pl?q=se:[% MARCSERIES_SUBFIELDS_LOO.value |url %]">[% MARCSERIES_SUBFIELDS_LOO.value %]</a>[% END %][% IF ( MARCSERIES_SUBFIELDS_LOO.volumenum ) %]. [% MARCSERIES_SUBFIELDS_LOO.volumenum %][% END %]
|
||||
|
|
@ -600,17 +600,17 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
</span>
|
||||
[% END %]
|
||||
[% IF ( editionstatement ) %]
|
||||
<span class="results_summary"><span class="label">Edition statement:</span>[% editionstatement %][% IF ( editionresponsibility ) %]/[% editionresponsibility %][% END %]</span>
|
||||
<span class="results_summary edition"><span class="label">Edition statement:</span>[% editionstatement %][% IF ( editionresponsibility ) %]/[% editionresponsibility %][% END %]</span>
|
||||
[% END %]
|
||||
[% IF ( publishercode ) %]
|
||||
<span class="results_summary"><span class="label">Published by :</span>
|
||||
<span class="results_summary publisher"><span class="label">Published by :</span>
|
||||
<a href="/cgi-bin/koha/opac-search.pl?q=pb:[% publishercode |url %] ">
|
||||
[% publishercode |html %]
|
||||
</a> [% IF ( place ) %]([% place %])[% END %] [% IF ( publicationyear ) %], [% publicationyear %][% END %]
|
||||
</span>
|
||||
[% END %]
|
||||
|
||||
[% IF ( pages ) %]<span class="results_summary"><span class="label">Physical details:</span> [% pages %] [% illus %] [% size %]</span>[% END %]
|
||||
[% IF ( pages ) %]<span class="results_summary physical"><span class="label">Physical details:</span> [% pages %] [% illus %] [% size %]</span>[% END %]
|
||||
|
||||
[% IF ( MARCISBNS ) %]
|
||||
<span class="results_summary isbn"><span class="label">ISBN:</span>[% FOREACH MARCISBN IN MARCISBNS %][% MARCISBN.marcisbn %][% IF ( loop.last ) %].[% ELSE %]; [% END %][% END %]</span>
|
||||
|
|
@ -620,10 +620,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
[% END %]
|
||||
[% END %]
|
||||
[% IF ( issn ) %]
|
||||
<span class="results_summary"><span class="label">ISSN:</span>[% issn %]</span>
|
||||
<span class="results_summary issn"><span class="label">ISSN:</span>[% issn %]</span>
|
||||
[% END %]
|
||||
[% IF ( collectiontitle ) %]
|
||||
<span class="results_summary"><span class="label">Collection: </span>
|
||||
<span class="results_summary collection"><span class="label">Collection: </span>
|
||||
[% collectiontitle %]
|
||||
[% IF ( collectionissn ) %], ISSN [% collectionissn %] [% END %]
|
||||
[% IF ( collectionvolume ) %]; [% collectionvolume %] [% END %]
|
||||
|
|
@ -631,7 +631,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
</span>
|
||||
[% END %]
|
||||
[% IF ( unititles ) %]
|
||||
<span class="results_summary"><span class="label">Uniform titles:</span>
|
||||
<span class="results_summary unititle"><span class="label">Uniform titles:</span>
|
||||
[% FOREACH unititle IN unititles %]
|
||||
[% unititle.unititle %] ;
|
||||
[% END %]
|
||||
|
|
@ -640,7 +640,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
[% END %]
|
||||
|
||||
[% IF ( MARCSUBJCTS ) %]
|
||||
<span class="results_summary">
|
||||
<span class="results_summary subject">
|
||||
<span class="label">Subject(s):</span>
|
||||
[% IF OPACPopupAuthorsSearch %]
|
||||
<div class="subjectSearch" >
|
||||
|
|
@ -694,14 +694,14 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
[% END %]
|
||||
</span>
|
||||
[% ELSE %]
|
||||
[% IF ( subjects ) %]<span class="results_summary"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject %]</a> | [% END %]</span>[% END %]
|
||||
[% IF ( subjects ) %]<span class="results_summary subject"><span class="label">Subject(s):</span> [% FOREACH subject IN subjects %]<a href="/cgi-bin/koha/opac-search.pl?q=su:[% subject.subject |url %]">[% subject.subject %]</a> | [% END %]</span>[% END %]
|
||||
[% END %]
|
||||
|
||||
[% IF ( copyrightdate ) %]
|
||||
<span class="results_summary"><span class="label">Year: </span>[% copyrightdate %]</span>
|
||||
<span class="results_summary year"><span class="label">Year: </span>[% copyrightdate %]</span>
|
||||
[% END %]
|
||||
[% UNLESS ( item_level_itypes ) %]<img src="[% imageurl %]" alt="[% description %]" title="[% description %]" />
|
||||
<span class="results_summary"><span class="label">Item type: </span>
|
||||
<span class="results_summary itemtype"><span class="label">Item type: </span>
|
||||
[% IF ( description ) %]
|
||||
[% description %]
|
||||
[% ELSE %]
|
||||
|
|
@ -710,7 +710,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
</span>[% END %]
|
||||
|
||||
[% IF ( MARCURLS ) %]
|
||||
<div class="results_summary"><span class="label">Online resources:</span>
|
||||
<div class="results_summary online_resources"><span class="label">Online resources:</span>
|
||||
<ul> [% FOREACH MARCurl IN MARCURLS %]
|
||||
<li>[% IF ( MARCurl.part ) %][% MARCurl.part %]
|
||||
<br />[% END %]
|
||||
|
|
@ -718,13 +718,13 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
|
||||
[% IF ( OPACurlOpenInNewWindow ) %]
|
||||
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
|
||||
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]" target="_blank">
|
||||
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]" target="_blank">
|
||||
[% ELSE %]
|
||||
<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]" target="_blank">
|
||||
[% END %]
|
||||
[% ELSE %]
|
||||
[% IF trackclicks == 'track' || trackclicks == 'anonymous' %]
|
||||
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]">
|
||||
<a href="/cgi-bin/koha/tracklinks.pl?uri=[% MARCurl.MARCURL |url%]&biblionumber=[% biblionumber | url %]" title="[% MARCurl.MARCURL %]">
|
||||
[% ELSE %]
|
||||
<a href="[% MARCurl.MARCURL %]" title="[% MARCurl.MARCURL %]">
|
||||
[% END %]
|
||||
|
|
@ -761,7 +761,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
|
||||
<!--This grabs all of the lists a bib record appears in -->
|
||||
[% IF ( GetShelves ) %]
|
||||
<span class="results_summary"><span class="label">List(s) this item appears in: </span>
|
||||
<span class="results_summary lists"><span class="label">List(s) this item appears in: </span>
|
||||
[% FOREACH GetShelve IN GetShelves %]
|
||||
<a href="/cgi-bin/koha/opac-shelves.pl?viewshelf=[% GetShelve.shelfnumber %]">[% GetShelve.shelfname %]</a>
|
||||
[% IF ( loop.last ) %][% ELSE %]|[% END %]
|
||||
|
|
@ -770,7 +770,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
[% END %]
|
||||
|
||||
[% IF ( TagsShowEnabled ) %]
|
||||
<div class="results_summary">
|
||||
<div class="results_summary tags">
|
||||
[% IF ( TagLoop ) %]
|
||||
<span class="label">Tags from this library:</span>
|
||||
<ul id="tagslist">[% FOREACH TagLoo IN TagLoop %]
|
||||
|
|
@ -781,7 +781,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
</div>
|
||||
[% END %]
|
||||
[% IF ( TagsInputEnabled ) %]
|
||||
<div class="results_summary">
|
||||
<div class="results_summary tagsinput">
|
||||
[% IF ( loggedinusername ) %]
|
||||
<a class="tag_add" id="tag_add[% biblionumber %]" href="#">Add</a>
|
||||
<form id="tagform[% biblionumber %]" method="post" action="/cgi-bin/koha/opac-tags.pl" style="display:none;">
|
||||
|
|
@ -839,7 +839,7 @@ YAHOO.util.Event.onContentReady("furtherm", function () {
|
|||
|
||||
[% IF ( OpacStarRatings != 'disable' ) %]
|
||||
<form method="post" action="/cgi-bin/koha/opac-ratings.pl">
|
||||
<div class="results_summary">
|
||||
<div class="results_summary ratings">
|
||||
|
||||
[% FOREACH i IN [ 1 2 3 4 5 ] %]
|
||||
[% IF rating_avg == i && borrowernumber %]
|
||||
|
|
|
|||
|
|
@ -514,7 +514,7 @@ $(document).ready(function(){
|
|||
[% IF ( SEARCH_RESULT.author ) %]by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% SEARCH_RESULT.author |url %]" title="Search for works by this author" class="author">[% SEARCH_RESULT.author %]</a>
|
||||
[% ELSE %]
|
||||
[% END %]
|
||||
<span class="results_summary"><span class="label">Publication:</span>
|
||||
<span class="results_summary publisher"><span class="label">Publication:</span>
|
||||
[% IF ( SEARCH_RESULT.place ) %][% SEARCH_RESULT.place %] [% END %][% IF ( SEARCH_RESULT.publishercode ) %][% SEARCH_RESULT.publishercode|html %][% END %][% IF ( SEARCH_RESULT.publicationyear ) %] [% SEARCH_RESULT.publicationyear %]
|
||||
[% ELSE %][% IF ( SEARCH_RESULT.copyrightdate ) %] [% SEARCH_RESULT.copyrightdate %][% END %][% END %]
|
||||
[% IF ( SEARCH_RESULT.pages ) %]. [% SEARCH_RESULT.pages %][% END %]
|
||||
|
|
@ -527,9 +527,9 @@ $(document).ready(function(){
|
|||
[% SEARCH_RESULT.summary %]
|
||||
</span>
|
||||
[% END %]
|
||||
[% IF ( SEARCH_RESULT.copyrightdate ) %]<span class="results_summary"><span class="label">Date:</span>[% SEARCH_RESULT.copyrightdate %]</span>[% END %]
|
||||
[% IF ( SEARCH_RESULT.copyrightdate ) %]<span class="results_summary date"><span class="label">Date:</span>[% SEARCH_RESULT.copyrightdate %]</span>[% END %]
|
||||
|
||||
<span class="results_summary">
|
||||
<span class="results_summary availability">
|
||||
<span class="label">Availability:</span>
|
||||
[% IF ( SEARCH_RESULT.available_items_loop.size() ) %]
|
||||
<span class="available"><strong>Copies available:</strong>
|
||||
|
|
@ -591,7 +591,7 @@ $(document).ready(function(){
|
|||
[% IF ( LibraryThingForLibrariesID ) %]<div class="ltfl_reviews"></div>[% END %]
|
||||
[% IF ( TagsShowEnabled ) %]
|
||||
[% IF ( SEARCH_RESULT.TagLoop.size ) %]
|
||||
<div class="results_summary"><span class="label">Tags:</span>
|
||||
<div class="results_summary tags"><span class="label">Tags:</span>
|
||||
<ul style="display: inline; list-style: none;">[% FOREACH TagLoo IN SEARCH_RESULT.TagLoop %]<li style="display: inline; list-style: none;"><a href="/cgi-bin/koha/opac-search.pl?tag=[% TagLoo.term |url %]&q=[% TagLoo.term |url %]">[% TagLoo.term %]</a> <span class="weight">([% TagLoo.weight_total %])</span></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
|
|
@ -604,7 +604,7 @@ $(document).ready(function(){
|
|||
|
||||
|
||||
[% IF ( OpacStarRatings == 'all' ) %]
|
||||
<div class="results_summary">
|
||||
<div class="results_summary ratings">
|
||||
|
||||
[% FOREACH i IN [ 1 2 3 4 5 ] %]
|
||||
|
||||
|
|
|
|||
|
|
@ -509,7 +509,7 @@
|
|||
</p>
|
||||
|
||||
<xsl:if test="marc:datafield[@tag=250]">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary edition">
|
||||
<span class="label">Edition: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=250]">
|
||||
<xsl:call-template name="subfieldSelect">
|
||||
|
|
@ -522,7 +522,7 @@
|
|||
<xsl:if test="marc:datafield[@tag=773]">
|
||||
<xsl:for-each select="marc:datafield[@tag=773]">
|
||||
<xsl:if test="marc:subfield[@code='t']">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary source">
|
||||
<span class="label">Source: </span>
|
||||
<xsl:value-of select="marc:subfield[@code='t']"/>
|
||||
</span>
|
||||
|
|
@ -531,7 +531,7 @@
|
|||
</xsl:if>
|
||||
|
||||
<xsl:if test="$DisplayOPACiconsXSLT!='0'">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary type">
|
||||
<xsl:if test="$typeOf008!=''">
|
||||
<span class="label">Type: </span>
|
||||
<xsl:choose>
|
||||
|
|
@ -881,7 +881,7 @@
|
|||
<xsl:call-template name="m880Select">
|
||||
<xsl:with-param name="basetags">260</xsl:with-param>
|
||||
<xsl:with-param name="codes">abcg</xsl:with-param>
|
||||
<xsl:with-param name="class">results_summary</xsl:with-param>
|
||||
<xsl:with-param name="class">results_summary publisher</xsl:with-param>
|
||||
<xsl:with-param name="label">Publisher: </xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
|
@ -918,13 +918,13 @@
|
|||
<xsl:call-template name="m880Select">
|
||||
<xsl:with-param name="basetags">246</xsl:with-param>
|
||||
<xsl:with-param name="codes">ab</xsl:with-param>
|
||||
<xsl:with-param name="class">results_summary</xsl:with-param>
|
||||
<xsl:with-param name="label">Other Title: </xsl:with-param>
|
||||
<xsl:with-param name="class">results_summary other_title</xsl:with-param>
|
||||
<xsl:with-param name="label">Other title: </xsl:with-param>
|
||||
</xsl:call-template>
|
||||
</xsl:if>
|
||||
|
||||
<xsl:if test="marc:datafield[@tag=246]">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary other_title">
|
||||
<span class="label">Other title: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=246]">
|
||||
<xsl:call-template name="subfieldSelect">
|
||||
|
|
@ -935,7 +935,7 @@
|
|||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:datafield[@tag=242]">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary translated_title">
|
||||
<span class="label">Title translated: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=242]">
|
||||
<xsl:call-template name="subfieldSelect">
|
||||
|
|
@ -946,7 +946,7 @@
|
|||
</span>
|
||||
</xsl:if>
|
||||
<xsl:if test="marc:datafield[@tag=856]">
|
||||
<span class="results_summary">
|
||||
<span class="results_summary online_resources">
|
||||
<span class="label">Online Access: </span>
|
||||
<xsl:for-each select="marc:datafield[@tag=856]">
|
||||
<xsl:variable name="SubqText"><xsl:value-of select="marc:subfield[@code='q']"/></xsl:variable>
|
||||
|
|
|
|||
Loading…
Reference in New Issue