From fe8562151fb0ad9c4dfc0916065803a80b3904b7 Mon Sep 17 00:00:00 2001 From: David Roberts <david@koha-ptfs.co.uk> Date: Sat, 9 May 2020 22:14:10 +0000 Subject: [PATCH] Bug 12093: Add CSS classes to item statuses in detail view This patch adds classes where necessary to detail.pl To test: 1) Apply patch 2) View source of /cgi-bin/koha/catalogue/detail.pl to check that there are no orphaned statuses without classes. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> --- .../prog/en/modules/catalogue/detail.tt | 36 ++++++++++++---------- 1 file changed, 19 insertions(+), 17 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt index 95af8c679c..071aa8b078 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -33,9 +33,9 @@ [% INCLUDE 'doc-head-open.inc' %] <title>Koha › Catalog › [% IF ( unknownbiblionumber ) %] - Unknown record + <span class="unknownrecord">Unknown record</span> [% ELSE %] - Details for [% INCLUDE 'biblio-title-head.inc' %] + <span class="titledetails">Details for [% INCLUDE 'biblio-title-head.inc' %]</span> [% END %] </title> [% INCLUDE 'doc-head-close.inc' %] @@ -48,9 +48,9 @@ <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a> › [% IF ( unknownbiblionumber ) %] - Unknown record + <span class="unknownrecord">Unknown record</span> [% ELSE %] - Details for <i>[% INCLUDE 'biblio-title.inc' %]</i> + <span class="titledetails">Details for <i>[% INCLUDE 'biblio-title.inc' %]</i></span> [% END %] </div> @@ -71,8 +71,9 @@ [% INCLUDE 'cat-toolbar.inc' %] [% IF decoding_error %] <div> - There is an error with this bibliographic record, the view may be degraded. - <br/> Error: [% decoding_error | html %] + <span class="biberror"> + There is an error with this bibliographic record, the view may be degraded.</span> + <span class="error"><br/> Error: [% decoding_error | html %]</span> </div> [% END %] [% IF ( ocoins ) %] @@ -268,12 +269,12 @@ [% IF !noItemTypeImages && item.imageurl %] <img src="[% item.imageurl | html %]" alt="[% item.translated_description | html %]" title="[% item.translated_description | html %]" /> [% END %] - [% item.translated_description | html %] + <span class="itypedesc">[% item.translated_description | html %]</span> </td> [% END %] <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td> <td class="homebranch"> - [% Branches.GetName(item.homebranch) | html %] + <span class="homebranchdesc">[% Branches.GetName(item.homebranch) | html %]</span> <span class="shelvingloc"> <!-- If permanent location is defined, show description or code and display current location in parentheses. If not, display current location. @@ -373,26 +374,27 @@ Note that permanent location is a code, and location may be an authval. [% END %] [% IF ( item.itemnotforloan || item.notforloan_per_itemtype ) %] - Not for loan + <span class="noteforloan">Not for loan [% IF ( item.notforloanvalue ) %] - ([% item.notforloanvalue | html %]) + <span class="reason">([% item.notforloanvalue | html %])</span> [% END %] + </span> [% END %] [% SET hold = item.first_hold %] [% IF hold %] [% IF hold.waitingdate %] - Waiting at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %]. + <span class="waitingat">Waiting at [% Branches.GetName( hold.branchcode ) | html %] since [% hold.waitingdate | $KohaDates %].</span> [% IF canreservefromotherbranches AND ( hold.waitingdate OR hold.priority == 1 ) %] - Hold for: + <span class="heldfor">Hold for:</span> [% INCLUDE 'patron-title.inc' patron=hold.borrower hide_patron_infos_if_needed=1 %] [% END %] [% ELSE %] - There is an item level hold on this item (priority = [% hold.priority | html %]). + <span class="holdonitem">There is an item level hold on this item (priority = [% hold.priority | html %]).</span> [% END %] [% END %] [% UNLESS ( item.itemnotforloan || item.notforloan_per_itemtype || item.onloan || item.itemlost || item.withdrawn || item.damaged || item.transfertwhen || hold ) %] - Available + <span class="available">Available</span> [% END %] [% IF ( item.restricted ) %] @@ -528,7 +530,7 @@ Note that permanent location is a code, and location may be an authval. [% IF (otheritemloop.size) %] [% PROCESS items_table tab="otherholdings" items=otheritemloop %] [% ELSE %] - No other items. + <span class="nootheritems">No other items.</span> [% END %] </div> [% END %] @@ -696,7 +698,7 @@ Note that permanent location is a code, and location may be an authval. </tbody> </table> [% ELSE %] - There is no order for this biblio. + <span class="noorder">There is no order for this biblio.</span> [% END %] </div> [% END %] @@ -807,7 +809,7 @@ Note that permanent location is a code, and location may be an authval. [% END %] </ul> [% ELSE # - No image passed JavaScript takes care %] - No images have been uploaded for this bibliographic record yet. + <span class="noimagesuploaded">No images have been uploaded for this bibliographic record yet.</span> [% END %] [% IF ( CAN_user_tools_upload_local_cover_images ) %] <p>Upload an image file: <a class="btn btn-default btn-xs" href="/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber | uri %]&filetype=image"><i class="fa fa-upload" aria-hidden="true"></i> Upload</a> -- 2.11.0