View | Details | Raw Unified | Return to bug 1633
Collapse All | Expand All

(-)a/catalogue/image.pl (-1 / +1 lines)
Lines 29-35 use C4::Images; Link Here
29
29
30
$|=1;
30
$|=1;
31
31
32
my $DEBUG = 1;
32
my $DEBUG = 0;
33
my $data = new CGI;
33
my $data = new CGI;
34
my $imagenumber;
34
my $imagenumber;
35
35
(-)a/catalogue/imageviewer.pl (-2 / +28 lines)
Lines 23-30 use warnings; Link Here
23
use CGI;
23
use CGI;
24
use C4::Auth;
24
use C4::Auth;
25
use C4::Biblio;
25
use C4::Biblio;
26
use C4::Items;
26
use C4::Output;
27
use C4::Output;
27
use C4::Images;
28
use C4::Images;
29
use C4::Search;
28
30
29
my $query = new CGI;
31
my $query = new CGI;
30
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
32
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
Lines 38-51 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
38
);
40
);
39
41
40
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
42
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
43
my $imagenumber = $query ->param('imagenumber');
41
my ($count, $biblio) = GetBiblio($biblionumber);
44
my ($count, $biblio) = GetBiblio($biblionumber);
45
my $itemcount = GetItemsCount($biblionumber);
46
47
my @items = GetItemsInfo( $biblionumber );
48
49
my $norequests = 1;
50
foreach my $item (@items) {
51
    # can place holds defaults to yes
52
    $norequests = 0 unless ( ( $item->{'notforloan_per_itemtype'} > 0 ) || ( $item->{'itemnotforloan'} > 0 ) );
53
}
54
55
if($query->cookie("holdfor")){
56
    my $holdfor_patron = GetMember('borrowernumber' => $query->cookie("holdfor"));
57
    $template->param(
58
        holdfor => $query->cookie("holdfor"),
59
        holdfor_surname => $holdfor_patron->{'surname'},
60
        holdfor_firstname => $holdfor_patron->{'firstname'},
61
        holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
62
    );
63
}
42
64
43
if (C4::Context->preference("LocalCoverImages")) {
65
if (C4::Context->preference("LocalCoverImages")) {
44
    my @images = ListImagesForBiblio($biblionumber);
66
    my @images = ListImagesForBiblio($biblionumber);
45
    $template->{VARS}->{'LocalCoverImages'} = 1;
67
    $template->{VARS}->{'LocalCoverImages'} = 1;
46
    $template->{VARS}->{'images'} = \@images;
68
    $template->{VARS}->{'images'} = \@images;
69
    $template->{VARS}->{'imagenumber'} = $imagenumber || $images[0] || '';
47
}
70
}
48
71
    $template->{VARS}->{'count'} = $itemcount;
49
$template->{VARS}->{'biblio'} = $biblio;
72
    $template->{VARS}->{'biblionumber'} = $biblionumber;
73
    $template->{VARS}->{'norequests'} = $norequests;
74
    $template->param( C4::Search::enabled_staff_search_views );
75
    $template->{VARS}->{'biblio'} = $biblio;
50
76
51
output_html_with_http_headers $query, $cookie, $template->output;
77
output_html_with_http_headers $query, $cookie, $template->output;
(-)a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css (-3 / +6 lines)
Lines 2133-2138 div.pager input.pagedisplay { Link Here
2133
	font-weight: bold;
2133
	font-weight: bold;
2134
	text-align : center;
2134
	text-align : center;
2135
}
2135
}
2136
.localimage {
2136
2137
    padding: .3em;
2137
a.localimage img {
2138
}
2138
	border : 1px solid #0000CC;
2139
	margin : 0 .5em;
2140
	padding : .3em;
2141
}
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/biblio-view-menu.inc (-1 / +1 lines)
Lines 23-29 Link Here
23
    [% IF ( CAN_user_reserveforothers ) %]
23
    [% IF ( CAN_user_reserveforothers ) %]
24
    [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Holds</a></li>
24
    [% IF ( holdsview ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% IF ( object ) %][% object %][% ELSE %][% biblionumber %][% END %]">Holds</a></li>
25
    [% END %]
25
    [% END %]
26
    [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&analyze=1[% ELSE %][% biblionumber %]&analyze=1[% END %]">Analytics</a></li>[% END %]
26
    [% IF ( EasyAnalyticalRecords ) %][% IF ( analyze ) %]<li class="active">[% ELSE %]<li>[% END %]<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% IF ( object ) %][% object %]&amp;analyze=1[% ELSE %][% biblionumber %]&amp;analyze=1[% END %]">Analytics</a></li>[% END %]
27
27
28
    [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;biblionumber=[% biblionumber %]">Subscription(s)</a></li>[% END %]
28
    [% IF ( subscriptionsnumber ) %]<li><a href="/cgi-bin/koha/serials/serials-home.pl?searched=1&amp;biblionumber=[% biblionumber %]">Subscription(s)</a></li>[% END %]
29
</ul>
29
</ul>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/detail.tt (-5 / +5 lines)
Lines 515-521 function verify_images() { Link Here
515
<ul>
515
<ul>
516
[% FOREACH AMAZON_SIMILAR_PRODUCT IN AMAZON_SIMILAR_PRODUCTS %]
516
[% FOREACH AMAZON_SIMILAR_PRODUCT IN AMAZON_SIMILAR_PRODUCTS %]
517
[% FOREACH similar_biblionumber IN AMAZON_SIMILAR_PRODUCT.similar_biblionumbers %]
517
[% FOREACH similar_biblionumber IN AMAZON_SIMILAR_PRODUCT.similar_biblionumbers %]
518
<li><img alt="img" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
518
<li><img alt="" src="http://images.amazon.com/images/P/[% similar_biblionumber.ASIN %].01._SS50_.jpg" /> <a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% similar_biblionumber.biblionumber %]">[% similar_biblionumber.title |html %]</a> </li>
519
[% END %]
519
[% END %]
520
[% END %]
520
[% END %]
521
</ul>
521
</ul>
Lines 524-539 function verify_images() { Link Here
524
524
525
[% IF ( LocalCoverImages ) %]
525
[% IF ( LocalCoverImages ) %]
526
<div id="images">
526
<div id="images">
527
[% IF ( localimages ) %]
527
[% IF ( localimages.0 ) %]
528
<div>Click on an image to view it in the image viewer</div>
528
<p>Click on an image to view it in the image viewer</p>
529
[% FOREACH image IN localimages %]
529
[% FOREACH image IN localimages %]
530
[% IF image %]
530
[% IF image %]
531
<span class="localimage"><a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="img" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&imagenumber=[% image %]" /></a></span>
531
<a class="localimage" href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/catalogue/image.pl?thumbnail=1&amp;imagenumber=[% image %]" /></a>
532
[% END %]
532
[% END %]
533
[% END %]
533
[% END %]
534
[% ELSE %]
534
[% ELSE %]
535
[% IF ( CAN_user_tools_upload_local_cover_images ) %]
535
[% IF ( CAN_user_tools_upload_local_cover_images ) %]
536
<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&filetype=image'>upload</a> one.</p>
536
<p>No images have been uploaded for this bibliographic record yet. Please <a href='/cgi-bin/koha/tools/upload-cover-image.pl?biblionumber=[% biblionumber %]&amp;filetype=image'>upload</a> one.</p>
537
[% END %]
537
[% END %]
538
[% END %]
538
[% END %]
539
</div>
539
</div>
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/imageviewer.tt (-22 / +81 lines)
Lines 1-11 Link Here
1
[% INCLUDE 'doc-head-open.inc' %]
1
[% INCLUDE 'doc-head-open.inc' %]
2
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Images for: [% biblio.title |html %]
2
<title>Koha &rsaquo; Catalog &rsaquo; Details for [% biblio.title |html %] [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</title>
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/JavaScript" language="JavaScript">
4
[% IF ( LocalCoverImages == 1 ) %]
5
<script type="text/JavaScript">
5
//<![CDATA[
6
//<![CDATA[
6
7
7
$(document).ready(function(){
8
$(document).ready(function(){
8
    showCover($('.thumbnail').attr('id'));
9
    showCover([% imagenumber %]);
9
});
10
});
10
11
11
function showCover(img) {
12
function showCover(img) {
Lines 16-43 function showCover(img) { Link Here
16
//]]>
17
//]]>
17
</script>
18
</script>
18
<style type="text/css">
19
<style type="text/css">
20
#largeCoverImg {
21
	border : 1px solid #CCCCCC;
22
	display : block;
23
	margin : auto;
24
	padding : 1em;
25
}
26
#thumbnails {
27
	text-align : center;
28
}
29
#thumbnails a img {
30
	border : 1px solid #0000CC;
31
}
19
img.thumbnail {
32
img.thumbnail {
20
    border-style: solid;
33
	display : block;
21
    border-width: 3px;
34
    float : none;
22
    border-color: white;
35
    margin: 0 5px 5px 0;
36
    padding : .5em;
23
}
37
}
24
38
25
img.selected {
39
#thumbnails a img.selected {
26
    border-color: black;
40
    border-color: black;
41
    cursor : default;
42
    opacity:0.4;
43
	filter:alpha(opacity=40); /* For IE8 and earlier */
27
}
44
}
28
</style>
45
</style>[% END %]
29
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
46
</head>
30
<body id="imageviewer">
47
31
<div id="largeCover"><img id="largeCoverImg" alt="Large view" /></div>
48
<body>
32
[% IF LocalCoverImages == 1 %]
49
33
[% FOREACH img IN images %]
50
[% INCLUDE 'header.inc' %]
34
[% IF img %]
51
[% INCLUDE 'cat-search.inc' %]
35
<a href='#' onclick='showCover([% img %])'><img class='thumbnail' id='[% img %]' src='/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&thumbnail=1' alt='Image'/></a>
52
36
[% END %]
53
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/catalogue/search.pl">Catalog</a>  &rsaquo; Images for <i>[% biblio.title |html %]  [% FOREACH subtitl IN subtitle %] [% subtitl.subfield %][% END %]</i></div>
37
[% END %]
54
38
[% biblio.title %] [% biblio.author %]
55
<div id="doc3" class="yui-t1">
56
57
<div id="bd">
58
	<div id="yui-main">
59
	<div class="yui-b">
60
	<div class="yui-ge">
61
62
[% INCLUDE 'cat-toolbar.inc' %]
63
64
<h3>Images for <i>[% biblio.title |html %]</i></h3>
65
<h4>[% biblio.author %]</h4>
66
67
[% IF ( LocalCoverImages == 1 ) %]
68
	[% IF ( images.size > 0 ) %]
69
		<div class="yui-u first">
70
		<div id="largeCover">
71
			<img id="largeCoverImg" alt="" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% imagenumber %]" />
72
		</div></div>
73
74
		<div class="yui-u"><div id="thumbnails">
75
76
			[% FOREACH img IN images %]
77
				[% IF img %]
78
				<a href="/cgi-bin/koha/catalogue/imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
79
					[% IF ( imagenumber == img ) %]
80
						<img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&amp;thumbnail=1" alt="Thumbnail" />
81
					[% ELSE %]
82
						<img class="thumbnail" id="[% img %]" src="/cgi-bin/koha/catalogue/image.pl?imagenumber=[% img %]&amp;thumbnail=1" alt="Thumbnail" />
83
					[% END %]
84
				</a>
85
				[% END %]
86
			[% END %]
87
		</div></div>
88
89
	[% ELSE %]
90
		<div class="dialog message">There are no images for this record.</div>
91
	[% END %]
39
[% ELSE %]
92
[% ELSE %]
40
Unfortunately, images are not enabled for this catalog at this time.
93
	<div class="dialog message">Local images have not been enabled by your system administrator.</div>
41
[% END %]
94
[% END %]
42
</body>
95
43
</html>
96
</div>
97
</div>
98
</div>
99
<div class="yui-b">
100
[% INCLUDE 'biblio-view-menu.inc' %]
101
</div>
102
</div>
103
[% INCLUDE 'intranet-bottom.inc' %]
44
- 

Return to bug 1633