Bugzilla – Attachment 82992 Details for
Bug 18798
Use Koha.Preference in OPAC Reading Record
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18798: Use Koha.Preference in OPAC Reading Record
Bug-18798-Use-KohaPreference-in-OPAC-Reading-Recor.patch (text/plain), 7.30 KB, created by
Owen Leonard
on 2018-12-07 17:53:06 UTC
(
hide
)
Description:
Bug 18798: Use Koha.Preference in OPAC Reading Record
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2018-12-07 17:53:06 UTC
Size:
7.30 KB
patch
obsolete
>From 03172a4f58bb7d706552ea59ad5f330631f92253 Mon Sep 17 00:00:00 2001 >From: Aleisha Amohia <aleishaamohia@hotmail.com> >Date: Tue, 13 Jun 2017 22:15:13 +0000 >Subject: [PATCH] Bug 18798: Use Koha.Preference in OPAC Reading Record > >This patch uses the Koha.Preference plugin method for the following >sysprefs: > - OPACMySummaryHTML > - OPACAmazonCoverImages > - SyndeticsEnabled > - SyndeticsCoverImages > - SyndeticsClientCode > - GoogleJackets > - BakerTaylorEnabled (Bug 17896) > - BakerTaylorBookstoreURL (Bug 17896) > >To test, apply the patch from Bug 17896 and confirm that enabling and >disabling the above sysprefs does not break anything. > >Sponsored-by: Catalyst IT >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >I'm not able to test Syndetics and BakerTaylor, but everything else >works correctly. >--- > .../bootstrap/en/modules/opac-readingrecord.tt | 19 ++++++++++--------- > opac/opac-readingrecord.pl | 7 ------- > 2 files changed, 10 insertions(+), 16 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >index d03d5185..741fad6 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt >@@ -63,7 +63,7 @@ > </p> > [% END %] > >- [% IF Koha.Preference( 'OnSiteCheckouts' ) == 1 %] >+ [% IF ( Koha.Preference( 'OnSiteCheckouts' ) == 1 ) %] > <div id="tabs" class="toptabs"> > <ul> > <li><a href="#tabs-container" id="tab_all">All</a></li> >@@ -81,7 +81,7 @@ > <th>Item type</th> > <th>Call no.</th> > <th class="title-string">Date</th> >- [% IF ( OPACMySummaryHTML ) %] >+ [% IF ( Koha.Preference('OPACMySummaryHTML') ) %] > <th>Links</th> > [% END %] > </tr> >@@ -106,7 +106,8 @@ > [% END %] > <img src="[% AdlibrisURL | html %]?isbn=[% issue.normalized_isbn | html %]" class="adlibris-cover" alt="Adlibris cover image" /></a> > [% END %] >- [% IF OPACAmazonCoverImages %] >+ >+ [% IF ( Koha.Preference('OPACAmazonCoverImages') ) %] > [% IF issue.normalized_isbn %] > <a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn | uri %][% AmazonAssocTag | uri %]#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn | html %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a> > [% ELSE %] >@@ -131,13 +132,13 @@ > [% END %] > [% END %] > >- [% IF SyndeticsEnabled && SyndeticsCoverImages %] >- <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% issue.normalized_upc | html %]&oclc=[% issue.normalized_oclc | html %]" alt="" class="item-thumbnail" /> >+ [% IF ( Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') ) %] >+ <img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn | uri %]/SC.GIF&client=[% Koha.Preference('SyndeticsClientCode') %]&type=xw10&upc=[% issue.normalized_upc | uri %]&oclc=[% issue.normalized_oclc | uri %]" alt="" class="item-thumbnail" /> > [% END %] > </td> > <td> >- [% IF issue.BiblioDefaultViewmarc %] >- <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> >+ [% IF issue.BiblioDefaultViewmarc %] >+ <a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> > [% ELSIF issue.BiblioDefaultViewisbd %] > <a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title | html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield | html %][% END %][% END %]</a> > [% ELSE %] >@@ -165,7 +166,7 @@ > <span title="Checked out"><em>(Checked out)</em></span> > [% END %] > </td> >- [% IF OPACMySummaryHTML %] >+ [% IF ( Koha.Preference('OPACMySummaryHTML') ) %] > <td>[% issue.MySummaryHTML | $raw %]</td> > [% END %] > </tr> >@@ -190,7 +191,7 @@ > <script> > //<![CDATA[ > $(document).ready(function(){ >- [% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %] >+ [% IF ( Koha.Preference('GoogleJackets') ) %]KOHA.Google.GetCoverFromIsbn();[% END %] > $('#sortsubmit').hide(); > $('#order').change(function() { > $('#sortform').submit(); >diff --git a/opac/opac-readingrecord.pl b/opac/opac-readingrecord.pl >index 49348ad..04f4fed 100755 >--- a/opac/opac-readingrecord.pl >+++ b/opac/opac-readingrecord.pl >@@ -140,17 +140,10 @@ BEGIN { > } > } > >-for(qw(AmazonCoverImages GoogleJackets)) { # BakerTaylorEnabled handled above >- C4::Context->preference($_) or next; >- $template->param($_=>1); >- $template->param(JacketImages=>1); >-} >- > $template->param( > READING_RECORD => $issues, > limit => $limit, > readingrecview => 1, >- OPACMySummaryHTML => $opac_summary_html ? 1 : 0, > ); > > output_html_with_http_headers $query, $cookie, $template->output, undef, { force_no_caching => 1 }; >-- >2.1.4
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 18798
:
64272
|
64273
|
65955
| 82992 |
82994
|
83003