Bug 22422 - improve item location display with class "shelvingloc"
Summary: improve item location display with class "shelvingloc"
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 22475
  Show dependency treegraph
 
Reported: 2019-02-27 16:01 UTC by Fridolin Somers
Modified: 2020-11-30 21:45 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Expands CSS class "shelvingloc" to additional pages in both intranet and OPAC.
Version(s) released in:
19.05,18.11.04


Attachments
Bug 22422: improve item location display with class "shelvingloc" (24.19 KB, patch)
2019-02-28 12:49 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 22422: improve item location display with class "shelvingloc" (24.24 KB, patch)
2019-03-07 16:02 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22422: improve item location display with class "shelvingloc" (24.39 KB, patch)
2019-03-08 07:18 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Fridolin Somers 2019-02-27 16:01:28 UTC
In record detail page, item location is displayed with CSS using class "shelvingloc".
Use this class in virtual shelves and cataloguing search.
Comment 1 Fridolin Somers 2019-02-28 12:39:47 UTC
In fact many places at intranet and OPAC can use this class
Comment 2 Fridolin Somers 2019-02-28 12:49:28 UTC
Created attachment 85861 [details] [review]
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
Comment 3 Owen Leonard 2019-03-07 16:02:20 UTC
Created attachment 86280 [details] [review]
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>
Comment 4 Katrin Fischer 2019-03-08 07:18:35 UTC
Created attachment 86338 [details] [review]
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>
Comment 5 Nick Clemens 2019-03-11 13:13:40 UTC
Awesome work all!

Pushed to master for 19.05
Comment 6 Martin Renvoize 2019-03-12 09:20:09 UTC
Pushed to 18.11.x for 18.11.04
Comment 7 Lucas Gass 2019-03-15 20:12:10 UTC
cant rebase for 18.05.x

deleted by us:   ../../../css/src/staff-global.scss
../../../../../opac-tmpl/bootstrap/css/src/opac.scss
Comment 8 Fridolin Somers 2019-03-26 11:19:55 UTC
(In reply to Lucas Gass from comment #7)
> cant rebase for 18.05.x
> 
> deleted by us:   ../../../css/src/staff-global.scss
> ../../../../../opac-tmpl/bootstrap/css/src/opac.scss

Ah indeed, use of SCSS is new.
I think its not worth creating a rebased patch
Comment 9 Katrin Fischer 2020-05-15 16:07:58 UTC
The translation trick used here doesn't appear to work in 18.11:

                                            [% tnx('{count} item', '{count} items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) | html %][% IF ( SEARCH_RESULT.availablecount ) %], [% SEARCH_RESULT.availablecount | html %] available:[% ELSE %], None available[% END %]

This appears untranslated for us still in 18.11.16 and the po file is there and transalted, I think it's not used maybe?

It means availability in staff results is now showing partially in English - which is quite prominent :(

I filed a new bug 25517.
Comment 10 Katrin Fischer 2020-05-15 16:12:16 UTC
(In reply to Katrin Fischer from comment #9)
> The translation trick used here doesn't appear to work in 18.11:
> 
>                                             [% tnx('{count} item', '{count}
> items', SEARCH_RESULT.items_count, {count = SEARCH_RESULT.items_count}) |
> html %][% IF ( SEARCH_RESULT.availablecount ) %], [%
> SEARCH_RESULT.availablecount | html %] available:[% ELSE %], None
> available[% END %]
> 
> This appears untranslated for us still in 18.11.16 and the po file is there
> and transalted, I think it's not used maybe?
> 
> It means availability in staff results is now showing partially in English -
> which is quite prominent :(
> 
> I filed a new bug 25517.

I was wrong, this line comes from Bug 21789: Example usage of I18N Template::Toolkit plugin. Sorry.