Koha/koha-tmpl/intranet-tmpl/prog/en/includes/doc-head-close.inc
Koustubha Kale 585a0024a1 Bug 1633: [SIGNED-OFF] Display local cover images
This patch adds display of local cover images in the following places:
1. OPAC Results page
2. OPAC Details page
3. Separate image viewer page for the OPAC
4. Intranet Details page
5. Separate image viewer page for the Intranet

Display in the Details and (OPAC) Results pages is handled via Javascript
rather than via direct embedding, to better handle the situation where most
records have local cover images, but a few do not.

Local cover images do not currently display in the Intranet Results page

How to use/test :
Assign user permission to the user Tools > (upload_local_cover_images Upload
local cover images).  In order to upload local  images, login to the staff
client. Go to Home > Tools > Upload Cover Images. Here you can upload cover
images either singly or in bulk in the form of a zip file.  If uploading
singly, click on image file, browse the image from your local disk, type in
the biblio number of the catalogue entry and press upload.  If uploading in
bulk as a zip file, the zip file must contain (in addition to cover images)
one text file named either datalink.txt OR idlink.txt. This file should
have mapping of biblionumber to image file name in the zip one per line
with comma or tab as delimiters. For example:

1, scanned_cover_image_of_bib_no_1.jpg
2, scanned_cover_image_of_bib_no_1.jpg

Cover images will be resized to a large image of 800x600 and a thumbnail of
200x140. Depending on the setting of AllowMultipleCovers, it is possible to
upload multiple images for a single bibliographic record. However, even if
multiple covers are permitted, you have the option of replacing the existing
covers by checking the "Replace existing covers" option on the upload screen.

1. The patch adds a menu link in Tools from where you can upload local cover
   images
2. It adds a user permission to enable access control to this menu item under
   Tools
3. It adds a system preference OPACLocalCoverImages under Enhanced Content.
   This needs to be turned on to show local cover images in OPAC.

Once you have uploaded local images, if you search for the biblio, the local
cover should show up in search as well as search detail pages in the OPAC, and
the details view in the Intranet.

Koustubha Kale is working on another patch which will allow us to set a cover
image source priority in system preferences, and which will then gracefully
fail over to the next source if image is not available from the first choice
source.

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Signed-off-by: Koustubha Kale <kmkale@anantcorp.com>

Rebased the patch because it was failing with koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css due to changes pushed in master.
Applies cleanly now.
2012-01-24 11:16:04 +01:00

109 lines
4.9 KiB
HTML

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="shortcut icon" href="[% IF ( IntranetFavicon ) %][% IntranetFavicon %][% ELSE %][% themelang %]/includes/favicon.ico[% END %]" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="[% themelang %]/lib/jquery/plugins/ui.tabs.css" />
<link rel="stylesheet" type="text/css" media="print" href="[% themelang %]/css/print.css" />
[% IF ( intranetstylesheet ) %]
<link rel="stylesheet" type="text/css" href="[% intranetstylesheet %]" />
[% ELSE %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/staff-global.css" />
[% END %]
[% IF ( css_libs ) %]
[% FOREACH css_lib IN css_libs %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/[% css_lib.lib %]" />
[% END %]
[% END %]
[% IF ( css_module ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/modules/[% css_module %]" />
[% END %]
[% IF ( css_page ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/pages/[% css_page %]" />
[% END %]
[% IF ( css_widgets ) %]
[% FOREACH css_widget IN css_widgets %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/[% css_widget.widget %]" />
[% END %]
[% END %]
[% IF ( IntranetUserCSS ) %]<style type="text/css">[% IntranetUserCSS %]</style>[% END %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/jquery.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/ui.tabs.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.hotkeys.min.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.cookie.min.js"></script>
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.highlight-3.js"></script>
[% IF ( js_libs ) %]
[% FOREACH js_lib IN js_libs %]
<script type="text/javascript" src="[% themelang %]/[% js_lib.lib %]"></script>
[% END %]
[% END %]
[% IF ( js_module ) %]
<script type="text/javascript" src="[% themelang %]/js/modules/[% js_module %]"></script>
[% END %]
[% IF ( js_page ) %]
<script type="text/javascript" src="[% themelang %]/js/pages/[% js_page %]"></script>
[% END %]
[% IF ( js_widgets ) %]
[% FOREACH js_widget IN js_widgets %]
<script type="text/javascript" src="[% themelang %]/[% js_widget.widget %]"></script>
[% END %]
[% END %]
[% IF ( login ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/login.css" />
[% END %]
[% IF ( wizard ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/wizard.css" />
[% END %]
<!-- local colors -->
[% IF ( intranetcolorstylesheet ) %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/[% intranetcolorstylesheet %]" />
[% END %]
<!-- yui js -->
<script type="text/javascript" src="[% yuipath %]/utilities/utilities.js"></script>
<script type="text/javascript" src="[% yuipath %]/datasource/datasource-min.js"></script>
[% IF ( CircAutocompl ) %]
<script type="text/javascript" src="[% yuipath %]/autocomplete/autocomplete-min.js"></script>
[% END %]
<script type="text/javascript" src="[% yuipath %]/button/button-min.js"></script>
<script type="text/javascript" src="[% yuipath %]/container/container_core-min.js"></script>
<script type="text/javascript" src="[% yuipath %]/menu/menu-min.js"></script>
<!-- koha core js -->
<script type="text/javascript" src="[% themelang %]/js/staff-global.js"></script>
[% IF ( intranetuserjs ) %]
<script type="text/javascript">
//<![CDATA[
[% intranetuserjs %]
//]]>
</script>
[% END %]
<script type="text/javascript" language="javascript">
//<![CDATA[
[% IF ( intranetbookbag ) %]var MSG_BASKET_EMPTY = _("Your cart is currently empty");
var MSG_RECORD_IN_BASKET = _("This item is already in your cart");
var MSG_RECORD_ADDED = _("This item has been added to your cart");
var MSG_NRECORDS_ADDED = _(" item(s) added to your cart");
var MSG_NRECORDS_IN_BASKET = _("already in your cart");
var MSG_NO_RECORD_SELECTED = _("No item was selected");
var MSG_NO_RECORD_ADDED = _("No item was added to your cart");
var MSG_CONFIRM_DEL_BASKET = _("Are you sure you want to empty your cart?");
var MSG_CONFIRM_DEL_RECORDS = _("Are you sure you want to remove the selected items?");
var MSG_NON_RESERVES_SELECTED = _("One or more selected items cannot be reserved.");
[% END %]
//]]>
</script>
[% IF ( virtualshelves || intranetbookbag ) %]
<script type="text/javascript" language="javascript" src="[% themelang %]/js/basket.js"></script>
[% END %]
[% IF LocalCoverImages %]
<script type="text/javascript" language="javascript" src="[% themelang %]/js/localcovers.js"></script>
<script type="text/javascript" language="javascript">
//<![CDATA[
var NO_LOCAL_JACKET = _("No cover image available");
//]]>
</script>
[% END %]