Bugzilla – Attachment 65521 Details for
Bug 19044
Add BDS integration
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Add BDS code to staff client
Add-BDS-code-to-staff-client.patch (text/plain), 7.18 KB, created by
David Roberts
on 2017-08-04 23:15:43 UTC
(
hide
)
Description:
Add BDS code to staff client
Filename:
MIME Type:
Creator:
David Roberts
Created:
2017-08-04 23:15:43 UTC
Size:
7.18 KB
patch
obsolete
>From c46c64b9158d05ca022e1155b88082998fd217bd Mon Sep 17 00:00:00 2001 >From: David Roberts <david.roberts@ptfs-europe.com> >Date: Fri, 4 Aug 2017 23:55:18 +0100 >Subject: [PATCH] Add BDS code to staff client > >https://bugs.koha-community.org/show_bug.cgi?id=19044 >--- > catalogue/detail.pl | 8 ++++++++ > catalogue/search.pl | 8 ++++++++ > .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 18 ++++++++++++++---- > .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 9 +++++++-- > 4 files changed, 37 insertions(+), 6 deletions(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index 221532f..cfd891d 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -447,6 +447,14 @@ if ( C4::Context->preference("LocalCoverImages") == 1 ) { > $template->{VARS}->{localimages} = \@images; > } > >+# BDS Cover images >+if( C4::Context->preference('BDSStaffEnable') == 1) >+{ >+$template->param(DBMCode => >+C4::Context->preference('DBMCode') ); >+} >+ >+ > # HTML5 Media > if ( (C4::Context->preference("HTML5MediaEnabled") eq 'both') or (C4::Context->preference("HTML5MediaEnabled") eq 'staff') ) { > $template->param( C4::HTML5Media->gethtml5media($record)); >diff --git a/catalogue/search.pl b/catalogue/search.pl >index 7a8cf12..d059df1 100755 >--- a/catalogue/search.pl >+++ b/catalogue/search.pl >@@ -512,6 +512,14 @@ for my $this_cgi ( split('&',$limit_cgi) ) { > $template->param ( LIMIT_INPUTS => \@limit_inputs ); > > ## II. DO THE SEARCH AND GET THE RESULTS >+ >+# BDS Cover images >+if( C4::Context->preference('BDSStaffEnable') == 1) >+{ >+$template->param(DBMCode => >+C4::Context->preference('DBMCode') ); >+} >+ > my $total; # the total results for the whole set > my $facets; # this object stores the faceted results that display on the left-hand of the results page > my $results_hashref; >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 1c26c37..d7cd6ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt >@@ -229,7 +229,7 @@ function verify_images() { > > }); > >- [% IF ( AmazonCoverImages || LocalCoverImages ) %]$(window).load(function() { >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable ) %]$(window).load(function() { > verify_images(); > });[% END %] > //]]> >@@ -372,7 +372,7 @@ function verify_images() { > <span class="Z3988" title="[% ocoins %]"></span> > [% END %] > >- [% IF ( AmazonCoverImages || LocalCoverImages ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable) %] > [% IF ( XSLTDetailsDisplay ) %] > <div class="yui-gc"> > <div id="catalogue_detail_biblio" class="yui-u first"> >@@ -433,11 +433,16 @@ function verify_images() { > </span> > [% END %] > >- [% IF ( AmazonCoverImages || LocalCoverImages ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable) %] > </div><div class="yui-u" id="bookcoverimg"> > [% IF ( LocalCoverImages ) %] > <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> > [% END %] >+ [% IF ( BDSStaffEnable ) %] >+ <span class="bds_resultscovers"><a href="http://www.bibdsl.co.uk/xmla/image-service.asp?ISBN=[% normalized_isbn %]&SIZE=l&DBM=[% DBMCode %]" /> >+ <img src="http://www.bibdsl.co.uk/xmla/image-service.asp?ISBN=[% normalized_isbn %]&SIZE=s&DBM=[% DBMCode %]" /> >+ </a></span> >+ [% END %] > [% IF ( AmazonCoverImages ) %] > <div id="amazon-bookcoverimg"> > <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %][% AmazonAssocTag %]#reader-link"> >@@ -507,11 +512,16 @@ function verify_images() { > </ul> > </div> > >- [% IF ( AmazonCoverImages || LocalCoverImages ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable ) %] > <div class="yui-u" id="bookcoverimg"> > [% IF ( LocalCoverImages ) %] > <div title="[% biblionumber |url %]" class="[% biblionumber %]" id="local-thumbnail-preview"></div> > [% END %] >+ [% IF ( BDSStaffEnable ) %] >+ <span class="bds_coverimage"><a href="http://www.bibdsl.co.uk/xmla/image-service.asp?ISBN=[% normalized_isbn %]&SIZE=l&DBM=[% DBMCode %]" /> >+ <img src="http://www.bibdsl.co.uk/xmla/image-service.asp?ISBN=[% normalized_isbn %]&SIZE=s&DBM=[% DBMCode %]" /> >+ </a></span> >+ [% END %] > [% IF ( AmazonCoverImages ) %] > <div id="amazon-bookcoverimg"> > <a href="http://www.amazon[% AmazonTld %]/gp/reader/[% normalized_isbn %][% AmazonAssocTag %]#reader-link"> >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 fc212d9..60e643e 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt >@@ -498,7 +498,7 @@ var holdForPatron = function () { > <!-- TABLE RESULTS START --> > <table> > <tr> >- [% IF ( AmazonCoverImages || LocalCoverImages ) %]<th> </th>[% END %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable ) %]<th> </th>[% END %] > <th colspan="2">Results</th> > <th>Location</th> > </tr> >@@ -506,13 +506,18 @@ var holdForPatron = function () { > [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %] > [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] > <tr> >- [% IF ( AmazonCoverImages || LocalCoverImages ) %] >+ [% IF ( AmazonCoverImages || LocalCoverImages || BDSStaffEnable ) %] > <td> > [% IF ( LocalCoverImages) %] > <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> > <span title="[% SEARCH_RESULT.biblionumber |url %]" class="[% SEARCH_RESULT.biblionumber %]" id="local-thumbnail[% loop.count %]"></span> > </a> > [% END %] >+ [% IF ( BDSStaffEnable ) %] >+ <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >+ <img src="http://www.bibdsl.co.uk/xmla/image-service.asp?ISBN=[% SEARCH_RESULT.normalized_isbn %]&SIZE=s&DBM=[% DBMCode %]" /> >+ </a></span> >+ [% END %] > [% IF ( AmazonCoverImages ) %] > [% IF ( SEARCH_RESULT.normalized_isbn ) %] > <a class="p1" href="/cgi-bin/koha/catalogue/[% DetailPage %]?biblionumber=[% SEARCH_RESULT.biblionumber |url %]"> >-- >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 19044
:
65519
|
65520
| 65521