From 85bd5ae2d21ac231fd5c98ed6a726cc5b25502c1 Mon Sep 17 00:00:00 2001 From: Martin Persson Date: Thu, 8 Oct 2015 09:13:00 +0200 Subject: [PATCH] Bug 8630 - Adlibris covers (OPAC templates) Changes to OPAC 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 opac-results.tt * Search library catalog from OPAC for "1984". * You should be sent to: http://127.0.1.1/cgi-bin/koha/opac-search.pl?idx=&q=1984 * Cover image should be shown to the right of each title with CSS class: "adlibris-cover" * Test opac-detail.tt (continued from previous test's location) * Click on the title with cover (1984, ISBN: 9780451524935) * Cover should be displayed to the left in full size. * If clicked, should link to the full-size image. Test opac-results-grouped.tt * This template is only used if an external "grouping" server is setup and the syspref "OPACGroupResults" is set to "Use". * Personally I did not test this, b/c: terminally lazy * Test opac-showreviews.tt * Could not find any links to this location, manually enter it: http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl * Image should be shown to the right in full size. * If clicked it should take you to the detail view with the comments tab opened. * Test opac-showreviews-rss.tt * Click on the RSS icon from previous test's start location. URL should be: http://127.0.1.1/cgi-bin/koha/opac-showreviews.pl?format=rss * An image tag linking to the full-size image without any styling class should be present. * Test opac-user.tt * Click on your username to open: http://127.0.1.1/cgi-bin/koha/opac-user.pl * Covers should be shown for checked out items with CSS class: adlibris-cover * When clicked the destination should be the same as clicking the title column entry: opac-details.pl * Test opac-opensearch.tt * Click on "Advanced search" and enter "1984" then press "Search" * This search screen uses a different template. * Cover image should be shown to the right of each title with CSS class: "adlibris-cover" * If clicked, should link to the OPAC detail view. * Test opac-readingrecord.tt * Click on your logged-in name to go to your personal page. * Click on "Your reading history" tab on the left. http://127.0.1.1/cgi-bin/koha/opac-readingrecord.pl * Covers should be shown in leftmost column with CSS class: adlibris-cover * If clicked, should link to the same as the 'Title' link. Sponsored-By: Halland County Library --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt | 7 +++++++ .../opac-tmpl/bootstrap/en/modules/opac-opensearch.tt | 6 ++++++ .../opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 12 ++++++++++++ .../opac-tmpl/bootstrap/en/modules/opac-results-grouped.tt | 5 +++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 9 +++++++++ koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-shelves.tt | 6 +++++- .../opac-tmpl/bootstrap/en/modules/opac-showreviews-rss.tt | 7 ++++++- .../opac-tmpl/bootstrap/en/modules/opac-showreviews.tt | 10 ++++++++-- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt | 14 +++++++++----- 9 files changed, 67 insertions(+), 9 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt index e4fb61f..9f36683 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-detail.tt @@ -5,6 +5,8 @@ [% USE AuthorisedValues %] [% SET TagsShowEnabled = ( ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsShowOnDetail ) %] [% SET TagsInputEnabled = ( ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) && TagsInputOnDetail ) %] +[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] +[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] [% ShowCourseReservesHeader = 0 %] [% IF Koha.Preference( 'UseCourseReserves' ) == 1 %] @@ -53,6 +55,11 @@ [% IF ( OPACLocalCoverImages ) %]
[% END %] + + [% IF ( AdlibrisEnabled && normalized_isbn ) %] + Cover image + [% END %] + [% IF ( OPACAmazonCoverImages ) %] [% IF ( OPACURLOpenInNewWindow ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt index 09f1a72..2c5dbc4 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-opensearch.tt @@ -1,5 +1,8 @@ [% USE Koha %] +[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] +[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %] + [% IF ( opensearchdescription ) %] [% LibraryName |html %] Search @@ -37,6 +40,9 @@ ISBN [% SEARCH_RESULT.isbn |html %] [% IF ( SEARCH_RESULT.BiblioDefaultViewmarc ) %][% OPACBaseURL %]/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% IF ( SEARCH_RESULT.BiblioDefaultViewisbd ) %][% OPACBaseURL %]/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% ELSE %][% OPACBaseURL %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% SEARCH_RESULT.biblionumber %][% END %][% END %] +[% END %] [% IF ( OPACAmazonCoverImages ) %][% IF ( SEARCH_RESULT.normalized_isbn ) %][% END %][% END %] [% IF ( SyndeticsEnabled ) %][% IF ( SyndeticsCoverImages ) %][% IF ( SEARCH_RESULT.content_identifier_exists ) %] [% ELSE %] 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 c4a7419..539bbce 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -9,6 +9,8 @@ [% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %] [% INCLUDE 'masthead.inc' %] +[% SET AdlibrisEnabled = Koha.Preference('AdlibrisCoversEnabled') %] +[% SET AdlibrisURL = Koha.Preference('AdlibrisCoversURL') %]