Description
Jonathan Druart
2023-06-08 07:44:59 UTC
I like this idea for improvement. In this case we have no biblionumber at all, right? Created attachment 152145 [details] [review] Bug 33946: Do not display link to non-existing bibliographic record If you use biblio-title.inc on a biblio that does not longer exist, "No title" is shown with a link to catalogue/detail?.pl?biblionumber= We should at least remove the link. We could even do better and display "No bibliographic record" if the biblio does not longer exist. Test plan: Edit mainpage.pl, add $template->param( your_bib => Koha::Biblios->find(42) ); Edit intranet-main.tt, add [% INCLUDE 'biblio-title.inc' biblio=your_bib link = 1 %] Not hit the main page and see what's hapenning. If you have a bibliographic record with biblionumber=42, its info will be displayed. Remove this record and try again => it's replaced with "No bibliographic record" without a link Hmm.. this patch made me digg the opac and intranet includes again.. and they're more different that I would expect again.. mostly chomping values, but also some escaping differences but also intranet includes medium where opac doesn't (assume this is deliberate?) Anyway.. I wonder if we aught to also update js-biblio-format.inc to match this behaviour. The js equivilent include returns an empty string if the biblio is found to be empty. Created attachment 152178 [details] [review] Bug 33946: Do not display link to non-existing bibliographic record If you use biblio-title.inc on a biblio that does not longer exist, "No title" is shown with a link to catalogue/detail?.pl?biblionumber= We should at least remove the link. We could even do better and display "No bibliographic record" if the biblio does not longer exist. Test plan: Edit mainpage.pl, add $template->param( your_bib => Koha::Biblios->find(42) ); Edit intranet-main.tt, add [% INCLUDE 'biblio-title.inc' biblio=your_bib link = 1 %] Not hit the main page and see what's hapenning. If you have a bibliographic record with biblionumber=42, its info will be displayed. Remove this record and try again => it's replaced with "No bibliographic record" without a link Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 152179 [details] [review] Bug 33946: Resync opac/intranet includes This patch resyncs the whitespace chomping in the opac include to match that in the intranet include so aid in diffing between the two. No changes should be visible in the UI but there may be cleaner markup as a result. This is a nice little improvement. Is there any plan to pull the records title from deletedbiblio maybe? Thinking of acq as one of the spots this would really be useful! Created attachment 153297 [details] [review] Bug 33946: Do not display link to non-existing bibliographic record If you use biblio-title.inc on a biblio that does not longer exist, "No title" is shown with a link to catalogue/detail?.pl?biblionumber= We should at least remove the link. We could even do better and display "No bibliographic record" if the biblio does not longer exist. Test plan: Edit mainpage.pl, add $template->param( your_bib => Koha::Biblios->find(42) ); Edit intranet-main.tt, add [% INCLUDE 'biblio-title.inc' biblio=your_bib link = 1 %] Not hit the main page and see what's hapenning. If you have a bibliographic record with biblionumber=42, its info will be displayed. Remove this record and try again => it's replaced with "No bibliographic record" without a link Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Created attachment 153298 [details] [review] Bug 33946: Resync opac/intranet includes This patch resyncs the whitespace chomping in the opac include to match that in the intranet include so aid in diffing between the two. No changes should be visible in the UI but there may be cleaner markup as a result. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 153299 [details] [review] Bug 33946: (QA follow-up) Add spans and classes for styling and translatability Adds back the spans around No title and more spans for 'No bibliographic record' with individual classes for each to allow for styling later. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 23.11. Nice work everyone, thanks! Thanks for all the hard work! Pushed to 23.05.x for the next release Nice work everyone! Pushed to oldstable for 22.11.x |