Bugzilla – Attachment 153415 Details for
Bug 33956
opac-user.pl should use Koha::Biblio->opac_summary_html
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33956: Use Koha::Biblio->opac_summary_html from opac-user.pl
Bug-33956-Use-KohaBiblio-opacsummaryhtml-from-opac.patch (text/plain), 4.80 KB, created by
Nick Clemens (kidclamp)
on 2023-07-13 16:11:31 UTC
(
hide
)
Description:
Bug 33956: Use Koha::Biblio->opac_summary_html from opac-user.pl
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-07-13 16:11:31 UTC
Size:
4.80 KB
patch
obsolete
>From 0aae32196277b53a3d40aecf93936b5652e5c097 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 5 Jul 2023 11:07:35 +0200 >Subject: [PATCH] Bug 33956: Use Koha::Biblio->opac_summary_html from > opac-user.pl > >This code is currently duplicated in controllers opac-readingrecord.pl >and opac-user.pl. > >After bug 33949 it will be removed from opac-readingrecord.pl, and bug >33956 aims to remove it from opac-user.pl. > >Final situation will be: we have the code in a module, covered by tests >\o/ > >Test plan: >Check an item out >Setup OPACMySummaryHTML ("biblionumber: {BIBLIONUMBER}" for instance) >Go to the "Your summary" at the OPAC and notice the "Links" column >Everything should work identically before and after this patch > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 6 +++--- > opac/opac-user.pl | 11 ----------- > 2 files changed, 3 insertions(+), 14 deletions(-) > >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 a3729933c5..2a82506693 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt >@@ -344,7 +344,7 @@ > [% IF ( OPACFinesTab ) %] > <th>Fines</th> > [% END %] >- [% IF ( OPACMySummaryHTML ) %] >+ [% IF Koha.Preference('OPACMySummaryHTML') %] > <th class="nosort">Links</th> > [% END %] > [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] >@@ -525,8 +525,8 @@ > [% END %] > </td> > [% END %] >- [% IF ( OPACMySummaryHTML ) %] >- <td class="links">[% ISSUE.MySummaryHTML | $raw %]</td> >+ [% IF Koha.Preference('OPACMySummaryHTML') %] >+ <td class="links">[% ISSUE.biblio_object.opac_summary_html| $raw %]</td> > [% END %] > [% IF ( Koha.Preference('AllowCheckoutNotes') ) %] > <td> >diff --git a/opac/opac-user.pl b/opac/opac-user.pl >index bc04c520a8..f5588c0aa3 100755 >--- a/opac/opac-user.pl >+++ b/opac/opac-user.pl >@@ -178,7 +178,6 @@ $template->param( > amountoutstanding => $amountoutstanding, > borrowernumber => $borrowernumber, > patron_flagged => $borr->{flagged}, >- OPACMySummaryHTML => (C4::Context->preference("OPACMySummaryHTML")) ? 1 : 0, > surname => $borr->{surname}, > RENEW_ERROR => $renew_error, > borrower => $borr, >@@ -306,16 +305,6 @@ if ( $pending_checkouts->count ) { # Useless test > $issue->{normalized_upc} = GetNormalizedUPC( $marcrecord, C4::Context->preference('marcflavour') ); > $issue->{normalized_oclc} = GetNormalizedOCLCNumber( $marcrecord, C4::Context->preference('marcflavour') ); > } >- # My Summary HTML >- if (my $my_summary_html = C4::Context->preference('OPACMySummaryHTML')){ >- $issue->{author} ? $my_summary_html =~ s/{AUTHOR}/$issue->{author}/g : $my_summary_html =~ s/{AUTHOR}//g; >- $issue->{title} =~ s/\/+$//; # remove trailing slash >- $issue->{title} =~ s/\s+$//; # remove trailing space >- $issue->{title} ? $my_summary_html =~ s/{TITLE}/$issue->{title}/g : $my_summary_html =~ s/{TITLE}//g; >- $issue->{isbn} ? $my_summary_html =~ s/{ISBN}/$isbn/g : $my_summary_html =~ s/{ISBN}//g; >- $issue->{biblionumber} ? $my_summary_html =~ s/{BIBLIONUMBER}/$issue->{biblionumber}/g : $my_summary_html =~ s/{BIBLIONUMBER}//g; >- $issue->{MySummaryHTML} = $my_summary_html; >- } > > if ( C4::Context->preference('UseRecalls') ) { > my $maybe_recalls = Koha::Recalls->search({ biblio_id => $issue->{biblionumber}, item_id => [ undef, $issue->{itemnumber} ], completed => 0 }); >-- >2.30.2
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 33956
:
153042
|
153074
| 153415