From 83928c2432235260d78e9ca14de1ab226f16cdb3 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Tue, 19 Apr 2022 15:31:41 +0000 Subject: [PATCH] Bug 30566: Incorporate link handling in OPAC's biblio-title include This patch modifies the biblio-title include so that it can be used to link to the bibliographic record using the default biblio view. On pages where the biblio-title include was wrapped in an anchor tag, a link parameter is added: [% INCLUDE 'biblio-title.inc' link=> 1 %] To test, apply the patch and view the following pages in the OPAC to confirm that titles are displayed correctly and that the link to the bibliographic record is correct: - Log in to the OPAC: On the "your summary" page, check checkouts, overdues, holds, and article requests. - Check the "your holds history" page. - Locate a bibliographic record and click "Save to your lists." In the popup, the title should be displayed correctly without a link. - Place a hold, and check the hold confirmation page. - Check the "Recent comments" page. - Locate a record which has a local cover image attached, and view the image. --- .../opac-tmpl/bootstrap/en/includes/biblio-title.inc | 8 ++++++++ .../opac-tmpl/bootstrap/en/includes/holds-table.inc | 6 ++---- .../bootstrap/en/modules/opac-addbybiblionumber.tt | 4 ++-- .../bootstrap/en/modules/opac-holdshistory.tt | 2 +- .../bootstrap/en/modules/opac-imageviewer.tt | 7 ++----- .../opac-tmpl/bootstrap/en/modules/opac-reserve.tt | 5 ++--- .../bootstrap/en/modules/opac-showreviews.tt | 4 +--- .../opac-tmpl/bootstrap/en/modules/opac-tags.tt | 4 +--- .../opac-tmpl/bootstrap/en/modules/opac-user.tt | 12 +++++------- 9 files changed, 24 insertions(+), 28 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc index 3bf0b488aa..bc8d70e0e9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/biblio-title.inc @@ -1,3 +1,7 @@ +[% IF ( link ) %] + +[% END %] + [% IF ( biblio.title ) %] [% biblio.title | html %] [% ELSE %] @@ -18,3 +22,7 @@ [% END %] [% i = i + 1 %] [% END %] + +[% IF ( link ) %] + +[% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc index 2263737ec8..d155fd6a83 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/holds-table.inc @@ -47,10 +47,8 @@ [% END %] [% IF ! onlyinfo %] - - [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %] - [% HOLD.item.enumchron | html %] - + [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio link=> 1 %] + [% HOLD.item.enumchron | html %] [% ELSE %] [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt index 87f783ef65..9fd5910b1f 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-addbybiblionumber.tt @@ -18,8 +18,8 @@ [% END %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt index 837775ef02..894452c4d9 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-holdshistory.tt @@ -118,7 +118,7 @@ [% FOREACH hold IN holds %] - [% INCLUDE 'biblio-title.inc' biblio=hold.biblio %] + [% INCLUDE 'biblio-title.inc' biblio=hold.biblio link=>1 %] [% hold.biblio.author | html %] [% hold.item.barcode | html %] [% Branches.GetName( hold.branchcode ) | html %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt index 33ba901cda..597d88c360 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-imageviewer.tt @@ -45,8 +45,7 @@ Home