Summary: | OPAC holdings table shows instead of blank | ||
---|---|---|---|
Product: | Koha | Reporter: | Mark Alexander <marka> |
Component: | OPAC | Assignee: | Katrin Fischer <katrin.fischer> |
Status: | CLOSED FIXED | QA Contact: | Tomás Cohen Arazi <tomascohen> |
Severity: | normal | ||
Priority: | P5 - low | CC: | fridolin.somers, jesse, katrin.fischer, martin.renvoize, nick, tomascohen |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21279 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | 13618 | ||
Bug Blocks: | |||
Attachments: |
OPAC MARC view holding detail in 18.11
Bug 22058: Fix display of empty table cells in OPAC MARC view holdings Bug 22058: Fix display of empty table cells in OPAC MARC view holdings Bug 22058: Fix display of empty table cells in OPAC MARC view holdings |
It's line 320 in opac-MARCDetail.pl: $item_data->{$subfield_code} ||= " " If you change that to " " or "" it will display correctly. But: I compared the display to staff and there we actually use a $raw filter on the template which will also display correctly. It has the added benefit that HTML used in note fields (I know, we do that) will display correctly. So I will propose a patch making staff and OPAC match. Created attachment 83609 [details] [review] Bug 22058: Fix display of empty table cells in OPAC MARC view holdings I compared the template logic to the MARC detail page in staff. We use $raw there instead of html, which will also make notes and other fields with HTML in them display correctly. I am proposing to use the $raw filter in OPAC as well. To test: - Go to the OPAC - Search for a record with items - Switch to the MARC view - Verify empty cells show (html entity for space) - Apply patch - Repeat test - Verify empty table cells now show as empty Created attachment 83621 [details] [review] Bug 22058: Fix display of empty table cells in OPAC MARC view holdings I compared the template logic to the MARC detail page in staff. We use $raw there instead of html, which will also make notes and other fields with HTML in them display correctly. I am proposing to use the $raw filter in OPAC as well. To test: - Go to the OPAC - Search for a record with items - Switch to the MARC view - Verify empty cells show (html entity for space) - Apply patch - Repeat test - Verify empty table cells now show as empty Signed-off-by: Owen Leonard <oleonard@myacpl.org> This one probably deserves a t/db_dependent/selenium/regressions.t test. Specially if we allow HTML in note fields. Created attachment 83736 [details] [review] Bug 22058: Fix display of empty table cells in OPAC MARC view holdings I compared the template logic to the MARC detail page in staff. We use $raw there instead of html, which will also make notes and other fields with HTML in them display correctly. I am proposing to use the $raw filter in OPAC as well. To test: - Go to the OPAC - Search for a record with items - Switch to the MARC view - Verify empty cells show (html entity for space) - Apply patch - Repeat test - Verify empty table cells now show as empty Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Awesome work all! Pushed to master for 19.05 Pushed to 18.11.x for 18.11.03 Merge conflicts with 18.05. Will not be backported. (In reply to Jesse Maseto from comment #9) > Merge conflicts with 18.05. Will not be backported. This patch is not needed for 18.05.x since the var is not escaped : [% item.$sf_code %] |
Created attachment 83573 [details] OPAC MARC view holding detail in 18.11 In the OPAC, when looking at the MARC view for an item, there is a table at the bottom of the page showing some holding information. Those table fields that used to be blank in 18.05 are now displaying as " " (without the quotes) in 18.11. In my particular case, the fields that are displayed this way are: * Withdrawn status * Lost status * Damaged status * Not for loan