Bugzilla – Attachment 136170 Details for
Bug 30566
Incorporate link handling in OPAC's biblio-title include
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30566: Incorporate link handling in OPAC's biblio-title include
Bug-30566-Incorporate-link-handling-in-OPACs-bibli.patch (text/plain), 14.09 KB, created by
Jonathan Druart
on 2022-06-16 14:13:27 UTC
(
hide
)
Description:
Bug 30566: Incorporate link handling in OPAC's biblio-title include
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-16 14:13:27 UTC
Size:
14.09 KB
patch
obsolete
>From d8a1713a3df12ba61db4004abd62273c7a8d19cd Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >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 <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > .../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 3bf0b488aa3..bc8d70e0e99 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 ) %] >+ <a href="[% PROCESS biblio_a_href biblionumber => biblio.biblionumber %]" class="title"> >+[% END %] >+ > [% IF ( biblio.title ) %] > <span class="biblio-title">[% biblio.title | html %]</span> > [% ELSE %] >@@ -18,3 +22,7 @@ > [% END %] > [% i = i + 1 %] > [% END %] >+ >+[% IF ( link ) %] >+ </a> >+[% 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 2263737ec88..d155fd6a833 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 %] > <td class="title"> > [% IF ! onlyinfo %] >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% HOLD.biblionumber | html %]"> >- [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio %] >- [% HOLD.item.enumchron | html %] >- </a> >+ [% INCLUDE 'biblio-title.inc' biblio=HOLD.biblio link=> 1 %] >+ [% HOLD.item.enumchron | html %] > [% ELSE %] > <strong> > [% 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 87f783ef659..9fd5910b1f5 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 %] > <ul> > [% FOREACH biblio IN biblios %] >- <li> <span class="title">[% INCLUDE 'biblio-title.inc' %]</span> >- [% IF ( biblio.author ) %]<span class="author"> [% biblio.author | html %] </span>[% END %] >+ <li>[% INCLUDE 'biblio-title.inc' %] >+ [% IF ( biblio.author ) %]<span class="author"> [% biblio.author | html %][% END %] > </li> > [% END %] > </ul> >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 837775ef022..894452c4d9c 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 @@ > <tbody> > [% FOREACH hold IN holds %] > <tr> >- <td><a href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% hold.biblio.biblionumber | uri %]">[% INCLUDE 'biblio-title.inc' biblio=hold.biblio %]</a></td> >+ <td>[% INCLUDE 'biblio-title.inc' biblio=hold.biblio link=>1 %]</td> > <td>[% hold.biblio.author | html %]</td> > <td>[% hold.item.barcode | html %]</td> > <td>[% Branches.GetName( hold.branchcode ) | html %]</td> >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 33ba901cda5..597d88c360e 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 @@ > <a href="/cgi-bin/koha/opac-main.pl">Home</a> > </li> > <li class="breadcrumb-item"> >- <a href="[% PROCESS biblio_a_href biblionumber => biblionumber %]"> >- [% INCLUDE 'biblio-title.inc' %]</a> >+ [% INCLUDE 'biblio-title.inc' %] > </li> > <li class="breadcrumb-item active"> > <a href="#" aria-current="page">Images</a> >@@ -69,9 +68,7 @@ > > <div class="row"> > <div class="col-lg-9 maincontent"> >- <h1 class="title">Images for >- <a class="title" href="[% PROCESS biblio_a_href biblionumber => biblionumber %]" title="View details for this title"> >- [% INCLUDE 'biblio-title.inc' %]</a> [% biblio.author | html %] >+ <h1 class="title">Images for [% INCLUDE 'biblio-title.inc' link=> 1 %] [% biblio.author | html %] > </h1> > </div> <!-- / col-lg-9 --> > </div> <!-- / .row --> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >index 4e8b2d1ba2d..cb1b9d6f3af 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-reserve.tt >@@ -189,9 +189,8 @@ > </span> > [% END # / bibitemloo.holdable %] > >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% bibitemloo.biblionumber | html %]"> >- [% INCLUDE 'biblio-title.inc' biblio=bibitemloo %] >- </a> >+ [% INCLUDE 'biblio-title.inc' biblio=bibitemloo link=> 1%] >+ > [% IF ( bibitemloo.author ) %], by [% bibitemloo.author | html %][% END %] > </p> > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >index 5404864f453..5784cf134de 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-showreviews.tt >@@ -44,9 +44,7 @@ > <tr> > <td> > <p> >- <a class="title" href="[% PROCESS biblio_a_href biblionumber => review.biblionumber %]" title="View details for this title"> >- [% INCLUDE 'biblio-title.inc' biblio=review %] >- </a> >+ [% INCLUDE 'biblio-title.inc' biblio=review link=> 1 %] > [% IF ( review.author ) %] > by <a href="/cgi-bin/koha/opac-search.pl?q=au:[% review.author |url %]" title="Search for works by this author" class="author">[% review.author | html %]</a> > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >index 8953297ab78..c78f7352971 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-tags.tt >@@ -163,9 +163,7 @@ > [% MY_TAG.XSLTBloc | $raw %] > [% ELSE %] > <span class="tdlabel">Title:</span> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% MY_TAG.biblionumber | html %]"> >- [% INCLUDE 'biblio-title.inc' biblio=MY_TAG %] >- </a> >+ [% INCLUDE 'biblio-title.inc' biblio=MY_TAG link=> 1 %] > [% IF ( MY_TAG.author ) %] > by [% MY_TAG.author | html %] > [% END %] >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >index bbca73317d5..65311a5d9c9 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -312,7 +312,7 @@ > </td>[% END # / IF JacketImages %] > > <td class="title"> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=ISSUE %]</a> >+ [% INCLUDE 'biblio-title.inc' biblio=ISSUE link=> 1 %] > [% IF ( ISSUE.enumchron ) %] [% ISSUE.enumchron | html %][% END %] > > [% IF ( ISSUE.onsite_checkout ) %] <em class="onsite_checkout">(On-site checkout)</em>[% END %] >@@ -682,7 +682,7 @@ > [% END # /IF jacketcell %] > > <td> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber | html %]">[% INCLUDE 'biblio-title.inc' biblio=OVERDUE %]</a> >+ [% INCLUDE 'biblio-title.inc' biblio=OVERDUE link=> 1 %] > <span class="item-details">[% OVERDUE.author | html %]</span> > </td> > >@@ -767,7 +767,7 @@ > [% FOREACH RECALL IN RECALLS %] > <tr> > <td class="title"> >- <a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RECALL.biblio_id | html %]">[% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio %]</a> [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %] >+ [% INCLUDE 'biblio-title.inc' biblio=RECALL.biblio link=> 1 %] [% IF RECALL.item_level %]<p class="hint">Item recalled: [% RECALL.item.barcode | html %]</p>[% END %] > </td> > <td class="recalldate" data-order="[% RECALL.created_date | html %]"> > <span title="[% RECALL.created_date | html %]"> >@@ -849,10 +849,8 @@ > <tbody> > [% FOREACH ar IN current_article_requests %] > <td class="article-request-record-title"> >- <a class="article-request-title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ar.biblionumber | html %]"> >- [% INCLUDE 'biblio-title.inc' biblio=ar.biblio %] >- [% ar.item.enumchron | html %] >- </a> >+ [% INCLUDE 'biblio-title.inc' biblio=ar.biblio link=> 1 %] >+ [% ar.item.enumchron | html %] > [% ar.biblio.author | html %] > [% IF ar.itemnumber %] <em>(only [% ar.item.barcode | html %])</em>[% END %] > </td> >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30566
:
133405
|
135733
|
135738
| 136170