Bug 22422: improve item location display with class "shelvingloc"
authorFridolin Somers <fridolin.somers@biblibre.com>
Thu, 28 Feb 2019 12:37:40 +0000 (13:37 +0100)
committerNick Clemens <nick@bywatersolutions.com>
Mon, 11 Mar 2019 10:40:32 +0000 (10:40 +0000)
In record detail page, item location is displayed with CSS using class "shelvingloc".
Many many places at intranet and OPAC can use this class.
It allows to change display in all places using CSS customisation.

This patch removes the CSS "display:block" for class "shelvingloc".
Some places where using "inline" to correct the display.
I think the display should not be managed in template.
So it will be inline by default and it can be changed by custom CSS, on all places or depending on a selctor.

Test plan :
1) Compile SCSS to CSS
2) Add to preferences IntranetUserCSS and OPACUserCSS : .shelvingloc { color:red }
3) Go to pages impacted by patch, be sure to look at cart with "more details"
4) You see item location italic and red

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

16 files changed:
koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss
koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt
koha-tmpl/intranet-tmpl/prog/en/modules/basket/basket.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt
koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt
koha-tmpl/intranet-tmpl/prog/en/modules/cataloguing/addbooks.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/branchtransfers.tt
koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt
koha-tmpl/intranet-tmpl/prog/en/modules/tags/list.tt
koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt
koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-basket.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt

index ee75489..8ea5458 100644 (file)
@@ -2168,7 +2168,6 @@ i {
 
 // style for shelving location in catalogsearch
 .shelvingloc {
-    display: block;
     font-style: italic;
 }
 
index ef27531..93221d1 100644 (file)
                                 <td>[% Branches.GetName( item.holdingbranch ) | html %]</td>
                                 <td>[% item.notforloan | html %]</td>
                                 <td>[% item.restricted | html %]</td>
-                                <td>[% item.location | html %]</td>
+                                <td><span class="shelvingloc">[% item.location | html %]</span></td>
                                 <td>[% item.itemcallnumber | html %]</td>
                                 <td>[% item.copynumber | html %]</td>
                                 <td>[% item.stocknumber | html %]</td>
index b861a0f..ad0301d 100644 (file)
                                             [% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]
                                                 [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
                                                     <p>
-                                                        [% ITEM_RESULT.branchname | html %] [% ITEM_RESULT.location_description | html %]
+                                                        [% ITEM_RESULT.branchname | html %]
+                                                        <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
                                                         [% IF ( ITEM_RESULT.itemcallnumber ) %]
                                                             ([% ITEM_RESULT.itemcallnumber | html %])
                                                         [% END %]
                                                                 <span class="callnumber">[% ITEM_RESULT.itemcallnumber | html %]</span>
                                                             </strong>
                                                             [% ITEM_RESULT.branchname | html %]
-                                                            <span class="shelvingloc inline">[% ITEM_RESULT.location_description | html %]</span>
+                                                            <span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span>
                                                         </span>
                                                     </div>
                                                 [% END %]
index e555c53..55e52be 100644 (file)
                         </td>
                     [% END %]
                     <td class="location">[% UNLESS ( singlebranchmode ) %][% Branches.GetName( item.branchcode ) | html %] [% END %]</td>
-                    <td class="homebranch">[% Branches.GetName(item.homebranch) | html %]<span class="shelvingloc">[% item.location | html %]</span> </td>
+                    <td class="homebranch">
+                        [% Branches.GetName(item.homebranch) | html %]
+                        <span class="shelvingloc">[% item.location | html %]</span>
+                    </td>
                     [% IF ( itemdata_ccode ) %]<td>[% item.ccode | html %]</td>[% END %]
                     <td class="itemcallnumber">[% IF ( item.itemcallnumber ) %] [% item.itemcallnumber | html %][% END %]</td>
                     [% IF ( volinfo ) %]
index 4bd6402..efab5b0 100644 (file)
                                         <li>
                                         [% END %]
                                         [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname | html %][% END %]
-                                        [% IF ( available_items_loo.location ) %][% available_items_loo.location | html %][% END %]
+                                        [% IF ( available_items_loo.location ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
                                         [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% available_items_loo.itemcallnumber |uri %]%22">[% available_items_loo.itemcallnumber | html %]</a>][% END %]
                                         ([% available_items_loo.count | html %])
                                         [% IF item_level_itypes && available_items_loo.description %]
                                         <li>
                                         [% END %]
                                         [% IF ( onloan_items_loo.branchname ) %][% onloan_items_loo.branchname | html %][% END %]
-                                        [% IF ( onloan_items_loo.location ) %][% onloan_items_loo.location | html %][% END %]
+                                        [% IF ( onloan_items_loo.location ) %]<span class="shelvingloc">[% onloan_items_loo.location | html %]</span>[% END %]
                                         [% IF ( onloan_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% onloan_items_loo.itemcallnumber |uri %]%22">[% onloan_items_loo.itemcallnumber | html %]</a>][% END %]
                                         ([% onloan_items_loo.count | html %][% IF ( onloan_items_loo.longoverdue ) %], [% onloan_items_loo.longoverdue | html %] long overdue[% END %]) date due: [% onloan_items_loo.due_date | $KohaDates %]
                                         [% IF item_level_itypes && onloan_items_loo.description %]
                                         <li>
                                         [% END %]
                                         [% IF ( other_items_loo.branchname ) %][% other_items_loo.branchname | html %][% END %]
-                                        [% IF ( other_items_loo.location ) %][% other_items_loo.location | html %][% END %]
+                                        [% IF ( other_items_loo.location ) %]<span class="shelvingloc">[% other_items_loo.location | html %]</span>[% END %]
                                         [% IF ( other_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% other_items_loo.itemcallnumber |uri %]%22">[% other_items_loo.itemcallnumber | html %]</a>][% END %]
                                         [% IF ( other_items_loo.withdrawn ) %]([% AuthorisedValues.GetByCode( 'WITHDRAWN', other_items_loo.withdrawn ) | html %])[% END %]
                                         [% IF ( other_items_loo.itemlost ) %]([% AuthorisedValues.GetByCode( 'LOST', other_items_loo.itemlost ) | html %])[% END %]
index eef01b8..69071b6 100644 (file)
                         <span class="available">
                         [% FOREACH items_loo IN resultsloo.available_items_loop %]
                             [% items_loo.count | html %] [% items_loo.branchname | html %]
-                            <i>
-                        [% IF ( items_loo.location ) %][% items_loo.location | html %][% END %]
-                        [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %]
+                            [% IF ( items_loo.location ) %]<span class="shelvingloc">[% items_loo.location | html %]</span>[% END %]
+                            [% IF ( items_loo.itemcallnumber ) %][% items_loo.itemcallnumber | html %][% END %]
                             [% IF ( items_loo.classification ) %]
                             <a href="/cgi-bin/koha/catalogue/search.pl?q=callnum:[% items_loo.classification |url %]">
                                 [% items_loo.classification | html %]
                             </a>
                         [% END %]
-                        </i>
                             <br />
                         [% END %]
                         </span>
index 5dcd93b..10c3477 100644 (file)
                     <td class="tf-title"><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]">[% trsfitemloo.title | html %]</a></td>
                     <td class="tf-author">[% trsfitemloo.author | html %]</td>
                     <td class="tf-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% trsfitemloo.biblionumber | uri %]&amp;itemnumber=[% trsfitemloo.itemnumber | uri %]#item[% trsfitemloo.itemnumber | uri %]">[% trsfitemloo.barcode | html %]</a></td>
-                    <td class="tf-location">[% trsfitemloo.location | html %]</td>
+                    <td class="tf-location"><span class="shelvingloc">[% trsfitemloo.location | html %]</span></td>
                     <td class="tf-itemcallnumber">[% trsfitemloo.itemcallnumber | html %]</td>
                     <td class="tf-itemtype">[% ItemTypes.GetDescription( trsfitemloo.itemtype ) | html %]</td>
                     <td class="tf-ccode">[% AuthorisedValues.GetByCode( 'CCODE', trsfitemloo.ccode ) | html %]</td>
index 115039a..2a06845 100644 (file)
             <td class="ci-barcode"><a href="/cgi-bin/koha/catalogue/moredetail.pl?biblionumber=[% riloo.itembiblionumber | uri %]&amp;itemnumber=[% riloo.itemnumber | uri %]#item[% riloo.itemnumber | uri %]">[% riloo.barcode | html %]</a></td>
             <td class="ci-homelibrary">[% Branches.GetName( riloo.homebranch ) | html %]</td>
             <td class="ci-holdinglibrary">[% Branches.GetName( riloo.holdingbranch ) | html %]</td>
-            <td class="ci-shelvinglocation">[% riloo.location | html %]</td>
+            <td class="ci-shelvinglocation"><span class="shelvingloc">[% riloo.location | html %]</span></td>
             <td class="ci-callnumber">[% riloo.itemcallnumber | html %]</td>
             <td class="ci-dateaccessioned">[% riloo.dateaccessioned | $KohaDates %]</td>
             <td class="ci-type">[% ItemTypes.GetDescription( riloo.itemtype ) | html %] [% AuthorisedValues.GetByCode('CCODE', riloo.ccode) | html %]</td>
index 88a770b..dcad244 100644 (file)
@@ -46,7 +46,8 @@ tr.selected { background-color : #FFFFCC; } tr.selected td { background-color :
             </td>
             <td>[% IF ( title.items ) %]<ul style="font-size:80%">[% FOREACH item IN title.items %]
                 <li>
-                    [% item.branchname | html %] [% item.location_description | html %]
+                    [% item.branchname | html %]
+                    <span class="shelvingloc">[% item.location_description | html %]</span>
                     [% IF ( item.itemcallnumber ) %]
                         ([% item.itemcallnumber | html %])
                     [% END %]
index 2e34269..023922a 100644 (file)
             <td>
                 <ul>
                 [% FOREACH result IN itemsloo.ITEM_RESULTS %]
-                    <li>[% result.holdingbranch | html %] [% IF ( result.location_intranet ) %] ([% result.location_intranet | html %]) [% END %]
+                    <li>
+                        [% result.holdingbranch | html %]
+                        [% IF ( result.location_intranet ) %]<span class="shelvingloc">[% result.location_intranet | html %]</span>[% END %]
                         [% IF ( result.itemcallnumber ) %]
                             [<a href="/cgi-bin/koha/catalogue/search.pl?idx=callnum&amp;q=%22[% result.itemcallnumber |uri %]%22">[% result.itemcallnumber | html %]</a>]
                         [% END %]
index 9dee883..0b26283 100644 (file)
@@ -2439,7 +2439,6 @@ input {
 
 /* style for shelving location in catalogsearch */
 .shelvingloc {
-    display: block;
     font-style: italic;
 }
 
index 062a05b..6462889 100644 (file)
                                                     <ul>
                                                         [% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
                                                             <li>
-                                                                <strong>[% ITEM_RESULT.branchname | html %]</strong>[% IF ( ITEM_RESULT.location_opac ) %], [% ITEM_RESULT.location_opac | html %][% END %]
+                                                                <strong>[% ITEM_RESULT.branchname | html %]</strong>
+                                                                [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
                                                                 [% IF ( ITEM_RESULT.itemcallnumber ) %]
                                                                     ([% ITEM_RESULT.itemcallnumber | html %])
                                                                 [% END %]
                                             </td>
                                             <td>[% IF ( BIBLIO_RESULT.ITEM_RESULTS ) %]<ul>[% FOREACH ITEM_RESULT IN BIBLIO_RESULT.ITEM_RESULTS %]
                                                 <li>
-                                                    [% ITEM_RESULT.branchname | html %][% IF ( ITEM_RESULT.location_opac ) %], [% ITEM_RESULT.location_opac | html %][% END %]
+                                                    [% ITEM_RESULT.branchname | html %]
+                                                    [% IF ( ITEM_RESULT.location_opac ) %]<span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>[% END %]
                                                     [% IF ( ITEM_RESULT.itemcallnumber ) %]
                                                         ([% ITEM_RESULT.itemcallnumber | html %])
                                                     [% END %]
index 23e175b..3c5a40c 100644 (file)
                     [% END %]
 
                     [% IF ( Koha.Preference('OpacLocationOnDetail') == 'column' && itemdata_location ) %]
-                        <td class="shelving_location">[% ITEM_RESULT.location_description | html %]</td>
+                        <td class="shelving_location"><span class="shelvingloc">[% ITEM_RESULT.location_description | html %]</span></td>
                     [% END %]
 
                     <td class="call_no" property="sku">
index a5ee7ff..31194b9 100644 (file)
                                                                         [% FOREACH available_items_loo IN GROUP_RESULT.available_items_loop %]
                                                                             [% IF ( available_items_loo.branchname ) %][% available_items_loo.branchname | html %][% END %]
                                                                             [% IF ( OPACItemsResultsDisplay ) %]
-                                                                                [% IF ( available_items_loo.location ) %][% available_items_loo.location | html %][% END %]
+                                                                                [% IF ( available_items_loo.location ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
                                                                                 [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/opac-search.pl?q=callnum:[% available_items_loo.itemcallnumber |url %]">[% available_items_loo.itemcallnumber | html %]</a>][% END %]
                                                                             [% END %]
                                                                             ([% available_items_loo.count | html %]),
index 20f0f1c..501ceb2 100644 (file)
                                                                         [% END %]
 
                                                                         [% IF ( singleBranchMode ) %]
-                                                                            [% available_items_loo.location | html %]
+                                                                            <span class="shelvingloc">[% available_items_loo.location | html %]</span>
                                                                         [% ELSE %]
                                                                             [% available_items_loo.branchname | html %]
                                                                         [% END %]
 
                                                                         [% IF ( OPACItemsResultsDisplay ) %]
-                                                                            [% UNLESS ( singleBranchMode ) %][% available_items_loo.location | html %][% END %]
+                                                                            [% UNLESS ( singleBranchMode ) %]<span class="shelvingloc">[% available_items_loo.location | html %]</span>[% END %]
                                                                             [% IF ( available_items_loo.itemcallnumber ) %][<a href="/cgi-bin/koha/opac-search.pl?q=callnum:%22[% available_items_loo.itemcallnumber |url %]%22">[% available_items_loo.itemcallnumber | html %]</a>][% END %]
                                                                         [% END %]
                                                                         ([% available_items_loo.count | html %]),
index 581adfd..3f97aa6 100644 (file)
                                                                 [% FOREACH ITEM_RESULT IN itemsloo.ITEM_RESULTS %]
                                                                     [% ITEM_RESULT.homebranch | html %]
                                                                     [% IF ( ITEM_RESULT.location_opac ) %]
-                                                                        , [% ITEM_RESULT.location_opac | html %]
+                                                                        <span class="shelvingloc">[% ITEM_RESULT.location_opac | html %]</span>
                                                                     [% END %]
                                                                     [% IF ( ITEM_RESULT.itemcallnumber ) %]
                                                                         ([% ITEM_RESULT.itemcallnumber | html %])