Bug 7960: Add class to item type descriptions so they can be hidden with CSS

This patch adds the class "itypetext" around item type descriptions so
they can easily be hidden with CSS.

To test:
1. Navigate to the pages listed below to confirm that the text
descriptions do show.
2. Add
.itypetext { display:none; }
to IntranetUserCSS and OPACUserCSS system preferences and save.
3. Go back to the pages listed below and confirm that the text
descriptions DO NOT show.

= STAFF CLIENT =
 - catalogue/advsearch.tt
 - catalogue/detail.tt
 - catalogue/results.tt
 - reserve/request.tt
 - virtualshelves/shelves.tt
= OPAC =
 - opac-advsearch.tt
 - opac-detail.tt
 - opac-readingrecord.tt
 - opac-reserve.tt
 - opac-shelves.tt
 - opac-user.tt

Refer to David Nind's test notes from Comment 23 for a more detailed
plan for acessing these pages.

Sponsored-by: Catalyst IT

Signed-off-by: Charles Farmer <charles.farmer@inLibro.com>

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Aleisha Amohia 2018-07-01 23:33:07 +00:00 committed by Tomas Cohen Arazi
parent eeead6443f
commit ffe47b2cb0
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F
11 changed files with 19 additions and 19 deletions

View file

@ -238,7 +238,7 @@
[% END %] [% END %]
&nbsp; &nbsp;
[% END %] [% END %]
[% itemtypeloo.description | html %] <span class="itypetext">[% itemtypeloo.description | html %]</span>
</label> </label>
</td> </td>
[% IF ( loop.last ) %] [% IF ( loop.last ) %]

View file

@ -150,9 +150,9 @@
<img src="[% imageurl | html %]" alt="" /> <img src="[% imageurl | html %]" alt="" />
[% END %] [% END %]
[% IF ( description ) %] [% IF ( description ) %]
[% description | html %] <span class="itypetext">[% description | html %]</span>
[% ELSE %] [% ELSE %]
[% itemtype | html %] <span class="itypetext">[% itemtype | html %]</span>
[% END %] [% END %]
</span> </span>
[% END %] [% END %]
@ -406,7 +406,7 @@
[% IF !noItemTypeImages && itemtype.image_location %] [% IF !noItemTypeImages && itemtype.image_location %]
<img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" /> <img src="[% itemtype.image_location | html %]" alt="[% itemtype.translated_description | html %]" title="[% itemtype.translated_description | html %]" />
[% END %] [% END %]
<span class="itypedesc">[% itemtype.translated_description | html %]</span> <span class="itypedesc itypetext">[% itemtype.translated_description | html %]</span>
</td> </td>
[% END %] [% END %]
<td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td> <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.holdingbranch ) | html %] [% END %]</td>
@ -987,7 +987,7 @@ Note that permanent location is a code, and location may be an authval.
<div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4> <div role="tabpanel" class="tab-pane" id="editions"><h4>Editions</h4>
<table> <table>
[% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn | html %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %] [% FOREACH XISBN IN XISBNS %]<tr>[% IF ( AmazonCoverImages ) %]<td><a href="http://www.amazon.com/gp/reader/[% XISBN.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img src="https://images-na.ssl-images-amazon.com/images/P/[% XISBN.normalized_isbn | html %].01._AA75_PU_PU-5_.jpg" /></a></td>[% END %]
[% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %]<td>[% IF ( noItemTypeImages ) %][% XISBN.description | html %][% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %] [% IF ( !item_level_itypes || Koha.Preference('BiblioItemtypeInfo') ) %]<td>[% IF ( noItemTypeImages ) %]<span class="itypetext">[% XISBN.description | html %]</span>[% ELSE %]<img src="[% XISBN.imageurl | html %]" alt="[% XISBN.description | html %]" title="[% XISBN.description | html %]">[% END %]</td>[% END %]
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> <span>by</span> [% XISBN.author | html %] &copy;[% XISBN.copyrightdate | html %] <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% XISBN.biblionumber | uri %]">[% XISBN.title | html %]</a> <span>by</span> [% XISBN.author | html %] &copy;[% XISBN.copyrightdate | html %]
[% IF ( XISBN.publishercode ) %] [% IF ( XISBN.publishercode ) %]
[% XISBN.publishercode | html %] [% IF ( XISBN.place ) %]([% XISBN.place | html %])[% END %] [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear | html %][% END %] [% IF ( XISBN.editionstatement ) %][% XISBN.editionstatement | html %][% END %] [% IF ( XISBN.editionresponsibility ) %][% XISBN.editionresponsibility | html %][% END %] [% XISBN.publishercode | html %] [% IF ( XISBN.place ) %]([% XISBN.place | html %])[% END %] [% IF ( XISBN.publicationyear ) %], [% XISBN.publicationyear | html %][% END %] [% IF ( XISBN.editionstatement ) %][% XISBN.editionstatement | html %][% END %] [% IF ( XISBN.editionresponsibility ) %][% XISBN.editionresponsibility | html %][% END %]

View file

@ -530,7 +530,7 @@
[% IF !noItemTypeImages && SEARCH_RESULT.imageurl %] [% IF !noItemTypeImages && SEARCH_RESULT.imageurl %]
<img src="[% SEARCH_RESULT.imageurl | html %]" alt="[% SEARCH_RESULT.description | html %]" /> <img src="[% SEARCH_RESULT.imageurl | html %]" alt="[% SEARCH_RESULT.description | html %]" />
[% END %] [% END %]
[% SEARCH_RESULT.description | html %] <span class="itypetext">[% SEARCH_RESULT.description | html %]</span>
</div> </div>
[% END %] [% END %]
@ -659,7 +659,7 @@
[% END %] [% END %]
[% IF item_level_itypes && items_loo.description %] [% IF item_level_itypes && items_loo.description %]
<span class="item-itype-desc">[% items_loo.description | html %]</span> <span class="item-itype-desc itypetext">[% items_loo.description | html %]</span>
[% END %] [% END %]
</li> </li>
[% END # /FOREACH other_items_loo %] [% END # /FOREACH other_items_loo %]

View file

@ -761,7 +761,7 @@
[% UNLESS ( noItemTypeImages ) %] [% UNLESS ( noItemTypeImages ) %]
[% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %] [% IF ( itemloo.itemtype.image_location) %]<img src="[% itemloo.itemtype.image_location | html %]" alt="" /> <br /> [% END %]
[% END %] [% END %]
[% itemloo.itemtype.translated_description | html %] <span class="itypetext">[% itemloo.itemtype.translated_description | html %]</span>
</td> </td>
[% END %] [% END %]
<td> <td>

View file

@ -330,7 +330,7 @@
[% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %] [% UNLESS ( noItemTypeImages || !itemsloo.imageurl ) %]
<img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" /> <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
[% END %] [% END %]
[% itemsloo.description | html %] <span class="itypetext">[% itemsloo.description | html %]</span>
</td> </td>
[% END %] [% END %]
<td> <td>

View file

@ -191,7 +191,7 @@
[% END %] [% END %]
&nbsp; &nbsp;
[% END %] [% END %]
[% itemtypeloo.description | html %] <span class="itypetext">[% itemtypeloo.description | html %]</span>
</label> </label>
</div> </div>
[% IF ( loop.last ) %]</div>[% ELSE %][% UNLESS ( loop.count % 4 ) %]</div><div class="row">[% END %][% END %] [% IF ( loop.last ) %]</div>[% ELSE %][% UNLESS ( loop.count % 4 ) %]</div><div class="row">[% END %][% END %]

View file

@ -171,9 +171,9 @@
<img src="[% imageurl | html %]" alt="" /> <img src="[% imageurl | html %]" alt="" />
[% END %] [% END %]
[% IF ( description ) %] [% IF ( description ) %]
[% description | html %] <span class="itypetext">[% description | html %]</span>
[% ELSE %] [% ELSE %]
[% itemtype | html %] <span class="itypetext">[% itemtype | html %]</span>
[% END %] [% END %]
</span> </span>
[% END %] [% END %]
@ -1242,7 +1242,7 @@
<img src="[% ITEM_RESULT.imageurl | html %]" title="[% ITEM_RESULT.description | html %]" alt="[% ITEM_RESULT.description | html %]" /> <img src="[% ITEM_RESULT.imageurl | html %]" title="[% ITEM_RESULT.description | html %]" alt="[% ITEM_RESULT.description | html %]" />
[% END %] [% END %]
[% END %] [% END %]
[% ITEM_RESULT.description | html %] <span class="itypetext">[% ITEM_RESULT.description | html %]</span>
</td> </td>
[% END %] [% END %]
[% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %] [% IF ( OpacLocationBranchToDisplay == 'holding' || OpacLocationBranchToDisplay == 'both' ) %]

View file

@ -161,8 +161,8 @@
<img src="[% issue.imageurl | html %]" alt="" /> <img src="[% issue.imageurl | html %]" alt="" />
[% END %] [% END %]
[% END %] [% END %]
<span class="tdlabel">Item type:</span> <span class="itypetext"><span class="tdlabel">Item type:</span>
[% issue.translated_description | html %]</td> [% issue.translated_description | html %]</span></td>
<td> <td>
<span class="tdlabel">Call number:</span> <span class="tdlabel">Call number:</span>
[% issue.itemcallnumber | html %] [% issue.itemcallnumber | html %]

View file

@ -231,7 +231,7 @@
<li class="itype"> <li class="itype">
<span class="label">Item type: </span> <span class="label">Item type: </span>
[% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %] [% IF ( bibitemloo.imageurl ) %]<img src="[% bibitemloo.imageurl | html %]" alt="" />[% END %]
[% bibitemloo.translated_description | html %] <span class="itypetext">[% bibitemloo.translated_description | html %]</span>
</li> </li>
[% END %] [% END %]
@ -406,7 +406,7 @@
<img src="[% itemLoo.imageurl | html %]" alt="" /> <img src="[% itemLoo.imageurl | html %]" alt="" />
[% END %] [% END %]
[% END %] [% END %]
[% itemLoo.itemtype.translated_description | html %] <span class="itypetext">[% itemLoo.itemtype.translated_description | html %]</span>
</td> </td>
[% END %] [% END %]

View file

@ -399,7 +399,7 @@
[% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %] [% UNLESS ( Koha.Preference('OpacNoItemTypeImages') ) %]
<img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" /> <img src="[% itemsloo.imageurl | html %]" alt="[% itemsloo.description | html %]" title="[% itemsloo.description | html %]" />
[% END %] [% END %]
[% itemsloo.description | html %] <span class="itypetext">[% itemsloo.description | html %]</span>
</td> </td>
[% END %] [% END %]
<td> <td>

View file

@ -381,7 +381,7 @@
<span class="tdlabel">Item type:</span> <span class="tdlabel">Item type:</span>
[% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %] [% IF ( ISSUE.imageurl && !Koha.Preference('OpacNoItemTypeImages') ) %]
<img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" /> <img src="[% ISSUE.imageurl | html %]" title="[% ISSUE.description | html %]" alt="[% ISSUE.description | html %]" />
[% END %] [% ISSUE.description | html %] [% END %] <span class="itypetext">[% ISSUE.description | html %]</span>
</td> </td>
[% END %] [% END %]
[% IF ( show_barcode ) %] [% IF ( show_barcode ) %]