In the staff client, if an item has a long shelving location description, it displays on the same line as the Home Library, which doesn't look very good. It ought to be on the next line. https://snipboard.io/YzSTDH.jpg
Created attachment 104746 [details] [review] Bug 25462: Shelving location should be on a new line in holdings table This patch moves the shelving location a new line after the Home library in the holdings table. To test: 1) Assign a shelving location with a long description to an item. 2) See that it displays on the same line as the Home Library in /cgi-bin/koha/catalogue/detail.pl 3) Apply the patch 4) Check that the shelving location is now on a new line
I think instead of hardcoding a <br> here this cold be possibly solved by CSS instead (display:block?) With your patch there would always be a new line, even if there is no location. It might be something got lost there at some point as we definitely have a new line in our older versions. I am adding Owen - he might have an idea what changed.
(In reply to Katrin Fischer from comment #2) > I think instead of hardcoding a <br> here this cold be possibly solved by > CSS instead (display:block?) With your patch there would always be a new > line, even if there is no location. > > It might be something got lost there at some point as we definitely have a > new line in our older versions. I am adding Owen - he might have an idea > what changed. My knowledge of CSS isn't good enough to do that, sadly! I take your point about the permanent new line though. Perhaps something like this might work instead (I haven't tested this, it's just an idea at the moment!) [% IF (item.location) %] <br /> <span class="shelvingloc"> [% END %]
Created attachment 104772 [details] [review] Bug 25462: Show shelving location on a new line after home library (staff client) This patch updates the staff client CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the staff client which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information.
Created attachment 104773 [details] [review] Bug 25462: Show shelving location on a new line after home library (OPAC) This patch updates the OPAC CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the OPAC which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information.
I've attached an alternate solution that uses CSS, also including a fix for the OPAC.
Careful, class "shelvingloc" is used in a lot of places : git grep -l 'class="shelvingloc' 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/tools/inventory.tt koha-tmpl/intranet-tmpl/prog/en/modules/virtualshelves/shelves.tt 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 I suggest you add "display: block" most specificly on items table : intranet : td.homebranch .shelvingloc opac : td.location .shelvingloc
Created attachment 112996 [details] [review] Bug 25462: Shelving location should be on a new line in holdings table This patch moves the shelving location a new line after the Home library in the holdings table. To test: 1) Assign a shelving location with a long description to an item. 2) See that it displays on the same line as the Home Library in /cgi-bin/koha/catalogue/detail.pl 3) Apply the patch 4) Check that the shelving location is now on a new line Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 112997 [details] [review] Bug 25462: Show shelving location on a new line after home library (staff client) This patch updates the staff client CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the staff client which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 112998 [details] [review] Bug 25462: Show shelving location on a new line after home library (OPAC) This patch updates the OPAC CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the OPAC which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Tested on a sandbox on live testing youtube. All works as expected.
Careful, class "shelvingloc" is used in a lot of places, see comment 7 And should we not remove patch adding <br/> ? "Bug 25462: Shelving location should be on a new line in holdings table"
Created attachment 113092 [details] [review] Bug 25462: (follow-up) Remove <br /> as it is no longer needed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
I've swung back around to this to do a bit more due diligence.. I've checked all pages with the related class and confirmed that they all look good with the updated styling... I've also added a followup to revert the first patch (added as a followup to retain David's contribution, but I'll leave it up to the RM to decide whether to squash/remove entirely the pair).
In the end this boils down to a nice small change. Found no regressions looking at a lot of pages that use the shelvingloc class.
Created attachment 114770 [details] [review] Bug 25462: Shelving location should be on a new line in holdings table This patch moves the shelving location a new line after the Home library in the holdings table. To test: 1) Assign a shelving location with a long description to an item. 2) See that it displays on the same line as the Home Library in /cgi-bin/koha/catalogue/detail.pl 3) Apply the patch 4) Check that the shelving location is now on a new line Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 114771 [details] [review] Bug 25462: Show shelving location on a new line after home library (staff client) This patch updates the staff client CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the staff client CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the staff client which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 114772 [details] [review] Bug 25462: Show shelving location on a new line after home library (OPAC) This patch updates the OPAC CSS to move the shelving location a new line after the 'Home library' in list of holdings on the bibliographic detail page. To test, apply the patch and rebuild the OPAC CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Locate a title in the OPAC which has items with a shelving location. - View the detail page for that title. In the table of holdings, confirm that the shelving location information is on a separate line from the home library information. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 114773 [details] [review] Bug 25462: (follow-up) Remove <br /> as it is no longer needed Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Pushed to master for 21.05, thanks to everybody involved!
Small but really useful enhancement, I choose to backport. Pushed to 20.11.x for 20.11.02
Pushed to 20.05.x for 20.05.08
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.