@@ -, +, @@ - Revised OPAC imageviewer template to match structure of other OPAC pages (with masthead search, footer, etc) - Added link back to detail page (controlled by BiblioDefaultView preference) - Added link style to thumbnails on opac-detail to add a sense of "clickability" to them - Revised OPAC imageviewer template to allow it to function with JavaScript turned off. Now even without JS main image will load, thumbnails will be properly styled, and thumbnail links will work. - Changes to the script are only to pass missing variables to the template --- koha-tmpl/opac-tmpl/prog/en/css/opac.css | 5 + koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt | 4 +- .../opac-tmpl/prog/en/modules/opac-imageviewer.tt | 82 ++++++++++++++++---- opac/opac-image.pl | 2 +- opac/opac-imageviewer.pl | 3 + 5 files changed, 76 insertions(+), 20 deletions(-) --- a/koha-tmpl/opac-tmpl/prog/en/css/opac.css +++ a/koha-tmpl/opac-tmpl/prog/en/css/opac.css @@ -2289,3 +2289,8 @@ a.koha_url { .nav_results #listResults li a { color:#FFFFFF; font-weight:normal;} +a.localimage img { + border : 1px solid #8EB3E7; + margin : 0 .5em; + padding : .3em; +} --- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ -987,10 +987,10 @@ YAHOO.util.Event.onContentReady("furtherm", function () { [% IF ( OPACLocalCoverImages ) %]
-
Click on an image to view it in the image viewer
+

Click on an image to view it in the image viewer

[% FOREACH image IN localimages %] [% IF image %] -img + [% END %] [% END %]
--- a/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt +++ a/koha-tmpl/opac-tmpl/prog/en/modules/opac-imageviewer.tt @@ -1,11 +1,12 @@ [% INCLUDE 'doc-head-open.inc' %] [% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha Online[% END %] Catalog › Images for: [% biblio.title |html %] [% INCLUDE 'doc-head-close.inc' %] - - + -
Large view
-[% IF OPACLocalCoverImages == 1 %] -[% FOREACH img IN images %] -[% IF img %] -Image -[% END %] -[% END %] -[% biblio.title %] [% biblio.author %] +[% IF ( OpacNav ) %]
[% ELSE %]
[% END %] +
+[% INCLUDE 'masthead.inc' %] +
+
+
+
+

Images for [% IF ( BiblioDefaultViewmarc ) %] + [% ELSE %] + [% IF ( BiblioDefaultViewisbd ) %] + [% ELSE %] + [% END %] + [% END %][% biblio.title %] [% biblio.author %]

+
+ +
+ + [% IF OPACLocalCoverImages == 1 %] +
+ [% FOREACH img IN images %] + [% IF img %] + + [% IF ( imagenumber == img ) %]Thumbnail + [% ELSE %] + Thumbnail + [% END %] + + [% END %] + [% END %] +
+
[% ELSE %] Unfortunately, images are not enabled for this catalog at this time. [% END %] - - + +
+
+
+[% IF ( OpacNav ) %] +
+[% INCLUDE 'navigation.inc' %] +
+[% END %] +
+[% INCLUDE 'opac-bottom.inc' %] --- a/opac/opac-image.pl +++ a/opac/opac-image.pl @@ -29,7 +29,7 @@ use C4::Images; $|=1; -my $DEBUG = 1; +my $DEBUG = 0; my $data = new CGI; my $imagenumber; --- a/opac/opac-imageviewer.pl +++ a/opac/opac-imageviewer.pl @@ -38,12 +38,15 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( ); my $biblionumber = $query->param('biblionumber') || $query->param('bib'); +my $imagenumber = $query->param('imagenumber'); my ($count, $biblio) = GetBiblio($biblionumber); if (C4::Context->preference("OPACLocalCoverImages")) { my @images = ListImagesForBiblio($biblionumber); $template->{VARS}->{'OPACLocalCoverImages'} = 1; $template->{VARS}->{'images'} = \@images; + $template->{VARS}->{'biblionumber'} = $biblionumber; + $template->{VARS}->{'imagenumber'} = $images[0] || ''; } $template->{VARS}->{'biblio'} = $biblio; --