From e7a202ffd896487a55c7bed625d6c50338ab2c0c 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. Signed-off-by: David Nind Signed-off-by: Jonathan Druart Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 3bd3ec4805047412f25a93712dd06ea2de70608b) Signed-off-by: Lucas Gass --- .../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 1e956323c1..8280c1e904 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 8b8cb42576..25b997f3ec 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 %]
    [% FOREACH biblio IN biblios %] -
  • [% INCLUDE 'biblio-title.inc' %] - [% IF ( biblio.author ) %] [% biblio.author | html %] [% END %] +
  • [% INCLUDE 'biblio-title.inc' %] + [% IF ( biblio.author ) %] [% biblio.author | html %][% END %]
  • [% 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 24d521d383..d42eb7f18f 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