Bugzilla – Attachment 116911 Details for
Bug 21225
Add Syndetics cover images to staff client
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21225: Add Syndetics cover images to staff client.
Bug-21225-Add-Syndetics-cover-images-to-staff-clie.patch (text/plain), 9.10 KB, created by
Andreas Jonsson
on 2021-02-16 10:23:28 UTC
(
hide
)
Description:
Bug 21225: Add Syndetics cover images to staff client.
Filename:
MIME Type:
Creator:
Andreas Jonsson
Created:
2021-02-16 10:23:28 UTC
Size:
9.10 KB
patch
obsolete
>From b1c163d7400a3592f570ee4785c5062a9c48a5b3 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Tue, 16 Feb 2021 11:21:54 +0100 >Subject: [PATCH] Bug 21225: Add Syndetics cover images to staff client. > >--- > catalogue/detail.pl | 14 ++++++++++++++ > catalogue/search.pl | 9 +++++++++ > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 11 +++++++++-- > .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 11 +++++++++-- > 4 files changed, 41 insertions(+), 4 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 037012d6fb..3b9adcde75 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -165,12 +165,17 @@ my $upc = GetNormalizedUPC($record,$marcflavour); > my $ean = GetNormalizedEAN($record,$marcflavour); > my $oclc = GetNormalizedOCLCNumber($record,$marcflavour); > my $isbn = GetNormalizedISBN(undef,$record,$marcflavour); >+my $content_identifier_exists; >+if ( $isbn or $ean or $oclc or $upc ) { >+ $content_identifier_exists = 1; >+} > > $template->param( > normalized_upc => $upc, > normalized_ean => $ean, > normalized_oclc => $oclc, > normalized_isbn => $isbn, >+ content_identifier_exists => $content_identifier_exists > ); > > my $marcnotesarray = GetMarcNotes( $record, $marcflavour ); >@@ -472,6 +477,15 @@ $template->param( > searchid => scalar $query->param('searchid'), > ); > >+if ( C4::Context->preference("SyndeticsEnabled") ) { >+ $template->param(SyndeticsEnabled => 1, >+ SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"), >+ SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"), >+ SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize") >+ >+ ); >+} >+ > # $debug and $template->param(debug_display => 1); > > # Lists >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 9b37755983..a58874638e 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -186,6 +186,15 @@ my ($template, $borrowernumber, $cookie) = get_template_and_user({ > } > ); > >+if ( C4::Context->preference("SyndeticsEnabled") ) { >+ $template->param(SyndeticsEnabled => 1, >+ SyndeticsClientCode => C4::Context->preference("SyndeticsClientCode"), >+ SyndeticsCoverImages => C4::Context->preference("SyndeticsCoverImages"), >+ SyndeticsCoverImageSize => C4::Context->preference("SyndeticsCoverImageSize") >+ >+ ); >+} >+ > my $lang = C4::Languages::getlanguage($cgi); > > if (C4::Context->preference("marcflavour") eq "UNIMARC" ) { >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >index e1f3bc1595..149ead3292 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -81,7 +81,7 @@ > <span class="Z3988" title="[% ocoins | html %]"></span> > [% END %] > >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || ( SyndeticsEnabled && SyndeticsCoverImages ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > [% IF ( XSLTDetailsDisplay ) %] > <div id="catalogue_detail_biblio" class="col-xs-9"> > [% ELSE %] >@@ -137,7 +137,7 @@ > </span> > [% END %] > >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || ( SyndeticsEnabled && SyndeticsCoverImages ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > </div><div class="col-xs-3" id="bookcoverimg"> > [% IF ( LocalCoverImages ) %] > <div title="[% biblionumber |url %]" class="[% biblionumber | html %]" id="local-thumbnail-preview"></div> >@@ -151,6 +151,13 @@ > <img src="https://images-na.ssl-images-amazon.com/images/P/[% normalized_isbn | html %].01.MZZZZZZZ.jpg" alt="" /> > </a></div> > [% END %] >+ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] >+ [% IF ( content_identifier_exists ) %] >+ <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% SyndeticsCoverImageSize | html %].GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% normalized_upc | html %]&oclc=[% normalized_oclc | html %]" alt="" class="thumbnail" /> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] > [% IF ( IntranetCoce && CoceProviders ) %] > [% coce_id = normalized_ean || normalized_isbn %] > <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% biblionumber | url %]"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >index e79d39284a..faea7f2548 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -411,7 +411,7 @@ > <!-- TABLE RESULTS START --> > <table> > <tr> >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || ( SyndeticsEnabled && SyndeticsCoverImages ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > <th> </th> > [% END %] > <th colspan="2">Results</th> >@@ -421,7 +421,7 @@ > [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %] > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <tr> >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || ( SyndeticsEnabled && SyndeticsCoverImages ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > <td> > [% IF ( LocalCoverImages) %] > <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >@@ -441,6 +441,13 @@ > [% END %] > </a> > [% END # /IF AmazonCoverImages %] >+ [% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %] >+ [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %] >+ <span title="[% img_title | html %]" id="syndetics-thumbnail[% loop.count | html %]"><img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&client=[% SyndeticsClientCode | html %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc | html %]&oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="" class="item-thumbnail" /></span> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] > [% IF ( IntranetCoce && CoceProviders ) %] > [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %] > <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber | url %]"> >-- >2.11.0
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 21225
:
116911
|
123581
|
130638
|
130640
|
130689
|
130690
|
130696
|
130697
|
130698
|
132357
|
132366
|
132367
|
132368
|
132369
|
132370