From 9a6de5dee52d8ac439a283e1911f9f0218c40173 Mon Sep 17 00:00:00 2001 From: Martin Persson Date: Thu, 8 Oct 2015 09:12:27 +0200 Subject: [PATCH] Bug 8630 - Adlibris covers (intranet templates) Changes to staff interface (intranet) templates. Depends on new CSS clases defined in separate patch. Test plan: To test this particular patch (intranet templates) you need: * The syspref patch applied * The intranet CSS patch applied To test: * Apply this patch * Enable covers (if not done already) * Go to staff interface, log in as a priviliged user. * Select "More" -> "Administration" -> "Global system preferences" -> "Enhanced content". * Set ""AdlibrisCoversEnabled" to "Show" under "Adlibris". * Save changes * Add a book with a known cover/ISBN (if none exists) * Set MARC field 020 a, "INTERNATIONAL STANDARD BOOK NUMBER" to: 9780451524935 * Set MARC field 245 a, "Title" to: 1984 * Save changes * Test results.tt * From the main intranet page, select "Search the catalog" and enter the title we added, "1984" and press "Search". * You should end up with the url: http://127.0.1.1:8080/cgi-bin/koha/catalogue/search.pl?q=1984 * The cover image should be shown in the leftmost column. * If cover is clicked, the full cover image should be shown. * Test detail.tt (continue from the search results used in prev. test) * Click on the title text, you should be sent to: http://127.0.1.1:8080/cgi-bin/koha/catalogue/detail.pl?biblionumber=2 * The cover image should be shown on the right. * If clicked, the full cover should be shown. Sponsored-By: Halland County Library Signed-off-by: Owen Leonard --- .../intranet-tmpl/prog/en/modules/catalogue/detail.tt | 7 ++++++- .../intranet-tmpl/prog/en/modules/catalogue/results.tt | 15 ++++++++++++--- 2 files changed, 18 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 d3b12b4..7c8b361 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt @@ -3,6 +3,8 @@ [% USE AuthorisedValues %] [% USE Branches %] [% USE Biblio %] +[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] +[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] [% IF Koha.Preference('AmazonAssocTag') %] [% AmazonAssocTag = '?tag=' _ Koha.Preference('AmazonAssocTag') %] @@ -125,11 +127,14 @@ [% END %] - [% IF ( AmazonCoverImages || LocalCoverImages ) %] + [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %]
[% IF ( LocalCoverImages ) %]
[% END %] + [% IF ( AdlibrisEnabled && normalized_isbn ) %] + Adlibris cover image + [% END %] [% IF ( AmazonCoverImages ) %]
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 459bc08..ba374e3 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -2,6 +2,12 @@ [% USE Biblio %] [% USE KohaDates %] [% SET footerjs = 1 %] +[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] +[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] +[% INCLUDE 'doc-head-open.inc' %] +Koha › Catalog › [% IF ( searchdesc ) %]Results of search [% IF ( query_desc ) %]for '[% query_desc | html %]'[% END %][% IF ( limit_desc ) %] with limit(s): '[% limit_desc | html %]'[% END %][% ELSE %]You did not specify any search criteria[% END %] +[% INCLUDE 'doc-head-close.inc' %] +[% INCLUDE 'browser-strings.inc' %] [% IF BiblioDefaultViewmarc %] [% SET DetailPage="MARCdetail.pl" %] [% ELSIF BiblioDefaultViewlabeled_marc %] @@ -351,21 +357,24 @@ - [% IF ( AmazonCoverImages || LocalCoverImages ) %][% END %] + [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %][% END %] [% SET MaxSearchResultsItemsPerRecordStatusCheck = Koha.Preference('MaxSearchResultsItemsPerRecordStatusCheck') %] [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %] - - [% IF ( AmazonCoverImages || LocalCoverImages ) %] + [% IF ( loop.odd ) %][% ELSE %][% END %] + [% IF ( AmazonCoverImages || LocalCoverImages || AdlibrisEnabled ) %]
  Results Location
[% IF ( LocalCoverImages) %] [% END %] + [% IF ( AdlibrisEnabled && SEARCH_RESULT.normalized_isbn ) %] + Adlibris cover image + [% END %] [% IF ( AmazonCoverImages ) %] [% IF ( SEARCH_RESULT.normalized_isbn ) %] -- 2.1.4