Bugzilla – Attachment 123581 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), 7.72 KB, created by
Nick Clemens
on 2021-08-06 15:36:33 UTC
(
hide
)
Description:
Bug 21225: Add Syndetics cover images to staff client.
Filename:
MIME Type:
Creator:
Nick Clemens
Created:
2021-08-06 15:36:33 UTC
Size:
7.72 KB
patch
obsolete
>From a4a3332a4843d5243bf40ed8cfa2bca3bae4df66 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Fri, 6 Aug 2021 15:36:01 +0000 >Subject: [PATCH] Bug 21225: Add Syndetics cover images to staff client. > >This patch adds support for Syndetics Cover Images to the staff client > >To test: >1 - Enable system preferences: > SyndeticsEnabled > SyndeticsCoverImages > SyndeticsClientCode (you will need a valid code for testing) >2 - Perform a search on the staff client >3 - Check that results have images if upc,oclc number, or isbn existin record >4 - Confirm that dtails paeg displays same image >5 - Confirm size on details page follows syspref SyndeticsCoverImageSize >--- > .../prog/en/modules/catalogue/detail.tt | 18 ++++++++++++++++-- > .../prog/en/modules/catalogue/results.tt | 16 ++++++++++++++-- > 2 files changed, 30 insertions(+), 4 deletions(-) > >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 494e836e26..828aa8bede 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -92,6 +92,7 @@ > [% IntranetCoce = Koha.Preference('IntranetCoce') %] > [% CoceProviders = Koha.Preference('CoceProviders') %] > [% CoceHost = Koha.Preference('CoceHost') %] >+[% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %] > > [% INCLUDE 'cat-toolbar.inc' %] > [% IF decoding_error %] >@@ -106,7 +107,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 || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > [% IF ( XSLTDetailsDisplay ) %] > <div id="catalogue_detail_biblio" class="col-xs-9"> > [% ELSE %] >@@ -198,7 +199,7 @@ > </span> > [% END %] > >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || ( SyndeticsCovers ) || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > </div> > <div class="col-xs-3 bookcoverimg"> > <div id="biblio-cover-slider" class="cover-slider"> >@@ -245,6 +246,19 @@ > </div> > [% END %] > >+ [% IF ( SyndeticsCovers ) %] >+ [% IF ( nomarlized_isbn || normalized_upc || normalized_oclc ) %] >+ <div class="cover-image" id="syndetics-bookcoverimg"> >+ <a title="Syndetics cover image"> >+ <img src="https://secure.syndetics.com/index.aspx?isbn=[% normalized_isbn | html %]/[% Koha.Preference('SyndeticsCoverImageSize') | html %].GIF&client=[% Koha.Preference('SyndeticsClientCode') | html %]&type=xw10&upc=[% normalized_upc | html %]&oclc=[% normalized_oclc | html %]" alt="" class="thumbnail" /> >+ </a> >+ <div class="hint">Image from Syndetics</div> >+ </div> >+ [% ELSE %] >+ <span class="no-image">No cover image available</span> >+ [% END %] >+ [% END %] >+ > [% IF Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL') %] > [% SET custom_cover_image_url = biblio.custom_cover_image_url %] > [% IF custom_cover_image_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 cbaec622ab..503bf25e6a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -31,6 +31,7 @@ > [% IntranetCoce = Koha.Preference('IntranetCoce') %] > [% CoceProviders = Koha.Preference('CoceProviders') %] > [% CoceHost = Koha.Preference('CoceHost') %] >+[% SyndeticsCovers = Koha.Preference('SyndeticsEnabled') && Koha.Preference('SyndeticsCoverImages') %] > > <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb"> > <ol> >@@ -425,7 +426,7 @@ > <!-- TABLE RESULTS START --> > <table> > <tr> >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || SyndeticsCovers || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > <th> </th> > [% END %] > <th colspan="2">Results</th> >@@ -435,7 +436,7 @@ > [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %] > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <tr id="row[% SEARCH_RESULT.biblionumber | html %]"> >- [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled || IntranetCoce || SyndeticsCovers || (Koha.Preference('CustomCoverImages') && Koha.Preference('CustomCoverImagesURL')) ) %] > <td class="bookcoverimg"> > <div id="cover-slides-[% SEARCH_RESULT.biblionumber | html %]" class="cover-slides" data-biblionumber="[% SEARCH_RESULT.biblionumber | html %]"> > [% IF ( LocalCoverImages ) %][% SEARCH_RESULT.localimage | html %] >@@ -463,6 +464,17 @@ > </div> > [% END # /IF AmazonCoverImages %] > >+ [% IF ( SyndeticsCovers ) %] >+ [% IF ( SEARCH_RESULT.normalized_isbn || SEARCH_RESULT.normalized_upc || SEARCH_RESULT.normalized_oclc ) %] >+ <div id="syndetics-bookcoverimg-[% SEARCH_RESULT.biblionumber | html %]" class="cover-image syndetics-bookcoverimg"> >+ <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage | html %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >+ <img src="https://secure.syndetics.com/index.aspx?isbn=[% SEARCH_RESULT.normalized_isbn | html %]/SC.GIF&client=[% Koha.Preference('SyndeticsClientCode') | html %]&type=xw10&upc=[% SEARCH_RESULT.normalized_upc | html %]&oclc=[% SEARCH_RESULT.normalized_oclc | html %]" alt="Cover from Syndetics" /> >+ </a> >+ <div class="hint">Syndetics cover image</div> >+ </div> >+ [% END %] >+ [% END %] >+ > [% IF ( IntranetCoce && CoceProviders && SEARCH_RESULT.normalized_isbn ) %] > [% coce_id = SEARCH_RESULT.normalized_ean || SEARCH_RESULT.normalized_isbn %] > [% IF ( coce_id ) %] >-- >2.20.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 21225
:
116911
|
123581
|
130638
|
130640
|
130689
|
130690
|
130696
|
130697
|
130698
|
132357
|
132366
|
132367
|
132368
|
132369
|
132370