Bug 22422: improve item location display with class "shelvingloc"

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>
This commit is contained in:
Fridolin Somers 2019-02-28 13:37:40 +01:00 committed by Nick Clemens
parent c91c1a69a2
commit bc2d9f869a
16 changed files with 29 additions and 24 deletions

View File

@ -2168,7 +2168,6 @@ i {
// style for shelving location in catalogsearch
.shelvingloc {
display: block;
font-style: italic;
}

View File

@ -185,7 +185,7 @@
<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>

View File

@ -224,7 +224,8 @@
[% 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 %]
@ -299,7 +300,7 @@
<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 %]

View File

@ -392,7 +392,10 @@
</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 ) %]

View File

@ -508,7 +508,7 @@
<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 %]
@ -530,7 +530,7 @@
<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 %]
@ -552,7 +552,7 @@
<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 %]

View File

@ -103,15 +103,13 @@
<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>

View File

@ -188,7 +188,7 @@
<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>

View File

@ -711,7 +711,7 @@
<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>

View 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 %]

View File

@ -238,7 +238,9 @@
<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 %]

View File

@ -2439,7 +2439,6 @@ input {
/* style for shelving location in catalogsearch */
.shelvingloc {
display: block;
font-style: italic;
}

View File

@ -219,7 +219,8 @@
<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 %]
@ -273,7 +274,8 @@
</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 %]

View File

@ -1288,7 +1288,7 @@
[% 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">

View File

@ -212,7 +212,7 @@
[% 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 %]),

View File

@ -397,13 +397,13 @@
[% 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 %]),

View File

@ -415,7 +415,7 @@
[% 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 %])