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

(-)a/koha-tmpl/opac-tmpl/prog/en/css/opac.css (+5 lines)
Lines 2289-2291 a.koha_url { Link Here
2289
2289
2290
.nav_results  #listResults li a { color:#FFFFFF; font-weight:normal;}
2290
.nav_results  #listResults li a { color:#FFFFFF; font-weight:normal;}
2291
2291
2292
a.localimage img {
2293
	border : 1px solid #8EB3E7;
2294
	margin : 0 .5em;
2295
	padding : .3em;
2296
}
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt (-2 / +2 lines)
Lines 991-1000 YAHOO.util.Event.onContentReady("furtherm", function () { Link Here
991
991
992
[% IF ( OPACLocalCoverImages ) %]
992
[% IF ( OPACLocalCoverImages ) %]
993
<div id="images">
993
<div id="images">
994
<div>Click on an image to view it in the image viewer</div>
994
<p>Click on an image to view it in the image viewer</p>
995
[% FOREACH image IN localimages %]
995
[% FOREACH image IN localimages %]
996
[% IF image %]
996
[% IF image %]
997
<span class="localimage"><a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&imagenumber=[% image %]"><img alt="img" src="/cgi-bin/koha/opac-image.pl?thumbnail=1&imagenumber=[% image %]" /></a></span>
997
<a class="localimage" href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% image %]"><img alt="" src="/cgi-bin/koha/opac-image.pl?thumbnail=1&amp;imagenumber=[% image %]" /></a>
998
[% END %]
998
[% END %]
999
[% END %]
999
[% END %]
1000
</div>
1000
</div>
(-)a/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt (-17 / +65 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
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog &rsaquo; Images for: [% biblio.title |html %]
3
[% INCLUDE 'doc-head-close.inc' %]
3
[% INCLUDE 'doc-head-close.inc' %]
4
<script type="text/JavaScript" language="JavaScript">
4
<script type="text/javascript">
5
//<![CDATA[
5
//<![CDATA[
6
6
7
$(document).ready(function(){
7
$(document).ready(function(){
8
    showCover($('.thumbnail').attr('id'));
8
	$("#largeCoverImg").attr("src","/opac-tmpl/prog/images/loading.gif");
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 : 2px solid #8EB3E7;
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
    padding : .5em;
23
}
36
}
24
37
25
img.selected {
38
#thumbnails a img.selected {
26
    border-color: black;
39
    border-color: black;
40
    cursor : default;
41
    opacity:0.4;
42
	filter:alpha(opacity=40); /* For IE8 and earlier */
27
}
43
}
28
</style>
44
</style>
29
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
45
</head>
30
<body id="opac-imageviewer">
46
<body id="opac-imageviewer">
31
<div id="largeCover"><img id="largeCoverImg" alt="Large view" /></div>
47
[% IF ( OpacNav ) %]<div id="doc3" class="yui-t1">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
32
[% IF OPACLocalCoverImages == 1 %]
48
   <div id="bd">
33
[% FOREACH img IN images %]
49
[% INCLUDE 'masthead.inc' %]
34
[% IF img %]
50
	<div id="yui-main">
35
<a href='#' onclick='showCover([% img %])'><img class='thumbnail' id='[% img %]' src='/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&thumbnail=1' alt='Image'/></a>
51
	<div class="yui-b">
36
[% END %]
52
	<div class="yui-ge">
37
[% END %]
53
	<div class="container">
38
[% biblio.title %] [% biblio.author %]
54
	<h1 class="title">Images for 				[% IF ( BiblioDefaultViewmarc ) %]<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
55
                                [% ELSE %]
56
                                [% IF ( BiblioDefaultViewisbd ) %]<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
57
                                [% ELSE %]<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber |url %]" title="View details for this title">
58
                                [% END %]
59
                                [% END %][% biblio.title %]</a> [% biblio.author %]</h1>
60
	<div class="yui-u first">
61
62
		<div id="largeCover"><img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber %]" /></div></div>
63
64
	[% IF OPACLocalCoverImages == 1 %]
65
	<div class="yui-u"><div id="thumbnails">
66
			[% FOREACH img IN images %]
67
				[% IF img %]
68
				<a href="/cgi-bin/koha/opac-imageviewer.pl?biblionumber=[% biblionumber %]&amp;imagenumber=[% img %]" onclick="showCover([% img %]); return false;">
69
				[% IF ( imagenumber == img ) %]<img class="thumbnail selected" id="[% img %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&amp;thumbnail=1" alt="Thumbnail"/>
70
				[% ELSE %]
71
				<img class="thumbnail" id="[% img %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% img %]&amp;thumbnail=1" alt="Thumbnail"/>
72
				[% END %]
73
				</a>
74
				[% END %]
75
			[% END %]
76
		</div></div>
77
	</div>
39
[% ELSE %]
78
[% ELSE %]
40
Unfortunately, images are not enabled for this catalog at this time.
79
Unfortunately, images are not enabled for this catalog at this time.
41
[% END %]
80
[% END %]
42
</body>
81
43
</html>
82
</div>
83
</div>
84
</div>
85
[% IF ( OpacNav ) %]
86
<div class="yui-b"><div id="leftmenus" class="container">
87
[% INCLUDE 'navigation.inc' %]
88
</div></div>
89
[% END %]
90
</div>
91
[% INCLUDE 'opac-bottom.inc' %]
(-)a/opac/opac-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/opac/opac-imageviewer.pl (-1 / +3 lines)
Lines 38-49 my ( $template, $borrowernumber, $cookie ) = get_template_and_user( Link Here
38
);
38
);
39
39
40
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
40
my $biblionumber = $query->param('biblionumber') || $query->param('bib');
41
my $imagenumber = $query->param('imagenumber');
41
my ($count, $biblio) = GetBiblio($biblionumber);
42
my ($count, $biblio) = GetBiblio($biblionumber);
42
43
43
if (C4::Context->preference("OPACLocalCoverImages")) {
44
if (C4::Context->preference("OPACLocalCoverImages")) {
44
    my @images = ListImagesForBiblio($biblionumber);
45
    my @images = ListImagesForBiblio($biblionumber);
45
    $template->{VARS}->{'OPACLocalCoverImages'} = 1;
46
    $template->{VARS}->{'OPACLocalCoverImages'} = 1;
46
    $template->{VARS}->{'images'} = \@images;
47
    $template->{VARS}->{'images'} = \@images;
48
    $template->{VARS}->{'biblionumber'} = $biblionumber;
49
    $template->{VARS}->{'imagenumber'} = $images[0] || '';
47
}
50
}
48
51
49
$template->{VARS}->{'biblio'} = $biblio;
52
$template->{VARS}->{'biblio'} = $biblio;
50
- 

Return to bug 1633