]> git.koha-community.org Git - koha.git/commit
Bug 33946: Do not display link to non-existing bibliographic record
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 8 Jun 2023 07:48:42 +0000 (09:48 +0200)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Tue, 18 Jul 2023 14:23:21 +0000 (14:23 +0000)
commitc0b92a6a30876d5f68dc86b1022ca297a3989c68
tree0bdda3eeb1baf943defd067d8a6426a21b916167
parentd001745d69527003d897317ba293d25d50c067d9
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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit f3e0abddffb8927a48dcf798f8934b5565a9b3b4)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit b1ae28e5009824212bcb37073047ceb4bf754dc1)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
koha-tmpl/intranet-tmpl/prog/en/includes/biblio-title.inc
koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc