Owen Leonard
0716caf2f8
This patch updates several OPAC templates so that they use a new WRAPPER for displaying breadcrumbs. This patch also updates html_helpers.inc to add some logic for handling the case where the "Home" link is the only breadcrumb (on the OPAC main page). The change allows for the link to be disabled in this case. Apply the patch and log in to the OPAC. Test each of the following pages and their variations. Breadcrumbs should look correct, and each link should be correct: - OPAC main page - Course reserves - Course reserves details - Libraries - Follow the link for a specific library - View the details of a bibliographic record - Navigate directly to /cgi-bin/koha/opac-downloadshelf.pl?shelfnumber=X where X is the id of an existing list. (I don't think this page is ever seen unless the user has JavaScript disabled). - Locate a serial record and click the "More details" link under the "Subscriptions" tab. - Click the "Full history" tab. - Log into the OPAC as a user with checkouts. Navigate directly to /cgi-bin/koha/opac-issue-note.pl?issue_id=X where X is the id (issue_id) of one of the user's checkouts. (Another page which is only accessed directly if the user has JS disabled). - From the logged-in user summary page, click "Change password" - Submit a password change. - With "UseRecalls" enabled, locate a bibliographic record you can place a recall request for. - Place a recall. - With "OPACLocalCoverImages" enabled, locate a bibliographic record which has a local cover image attached. - Under the "Images" tab, click the image thumbnail. - If you have no custom OPAC pages, go to Tools -> Pages in the staff interface anc create one. - View the page in the OPAC. - With "OPACReportProblem" enabled, click the "Report a problem" link at the bottom of any OPAC page. - Submit a report. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
123 lines
5.4 KiB
Text
123 lines
5.4 KiB
Text
[% USE raw %]
|
|
[% USE Koha %]
|
|
[% USE AdditionalContents %]
|
|
[% SET OpacNav = AdditionalContents.get( location => "OpacNav", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% SET OpacNavBottom = AdditionalContents.get( location => "OpacNavBottom", lang => lang, library => logged_in_user.branchcode || default_branch, blocktitle => 0 ) %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Images for: [% INCLUDE 'biblio-title-head.inc' %] › [% IF ( LibraryNameTitle ) %][% LibraryNameTitle | html %][% ELSE %]Koha online[% END %] catalog</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<style>
|
|
#largeCoverImg {
|
|
border : 1px solid #CCCCCC;
|
|
display : block;
|
|
margin : auto;
|
|
padding : 1em;
|
|
}
|
|
#thumbnails {
|
|
text-align : center;
|
|
}
|
|
#thumbnails a img {
|
|
border : 2px solid #8EB3E7;
|
|
}
|
|
img.thumbnail {
|
|
display : block;
|
|
float : none;
|
|
margin : .3em 0;
|
|
padding : .5em;
|
|
}
|
|
|
|
#thumbnails a img.selected {
|
|
border-color: black;
|
|
cursor : default;
|
|
opacity:0.4;
|
|
filter:alpha(opacity=40); /* For IE8 and earlier */
|
|
}
|
|
</style>
|
|
[% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-imageviewer' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
[% WRAPPER breadcrumbs %]
|
|
[% WRAPPER breadcrumb_item %]
|
|
[% INCLUDE 'biblio-title.inc' link = 1 %]
|
|
[% END %]
|
|
[% WRAPPER breadcrumb_item bc_active= 1 %]
|
|
<span>Images</span>
|
|
[% END %]
|
|
[% END #/ WRAPPER breadcrumbs %]
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
[% IF ( OpacNav || OpacNavBottom ) %]
|
|
<div class="col-lg-2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' %]
|
|
</div>
|
|
</div>
|
|
<div class="col-10 order-first order-md-first order-lg-2">
|
|
[% ELSE %]
|
|
<div class="col order-first order-md-first order-lg-2">
|
|
[% END %]
|
|
|
|
<div class="row">
|
|
<div class="col-lg-9 maincontent">
|
|
<h1 class="title">Images for [% INCLUDE 'biblio-title.inc' link=> 1 %] [% biblio.author | html %]
|
|
</h1>
|
|
</div> <!-- / col-lg-9 -->
|
|
</div> <!-- / .row -->
|
|
|
|
<div class="row">
|
|
<div class="col-lg-9">
|
|
<div id="imageviewer">
|
|
<div id="largeCover">
|
|
<img id="largeCoverImg" alt="" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% imagenumber | url %]" />
|
|
</div>
|
|
</div> <!-- / #imageviewer -->
|
|
</div> <!-- / .span12 -->
|
|
|
|
[% IF OPACLocalCoverImages == 1 %]
|
|
[% IF images.size %]
|
|
<div class="col-lg-3">
|
|
<div id="thumbnails">
|
|
[% FOREACH image IN images %]
|
|
<a class="cover_thumbnail" data-imagenumber="[% image.imagenumber| html %]" href="#">
|
|
[% IF loop.first %]
|
|
<img class="thumbnail selected" id="[% image.imagenumber| html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail"/>
|
|
[% ELSE %]
|
|
<img class="thumbnail" id="[% image.imagenumber | html %]" src="/cgi-bin/koha/opac-image.pl?imagenumber=[% image.imagenumber | html %]&thumbnail=1" alt="Thumbnail"/>
|
|
[% END %]
|
|
</a>
|
|
[% END %]
|
|
</div> <!-- /#thumbnails -->
|
|
</div> <!-- /.col-lg-3 -->
|
|
[% END %]
|
|
[% ELSE %]
|
|
Unfortunately, images are not enabled for this catalog at this time.
|
|
[% END %]
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .col-lg-10/12 -->
|
|
</div> <!-- / .row -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
<script>
|
|
$(document).ready(function(){
|
|
$("#largeCoverImg").attr("src","[% interface | html %]/[% theme | html %]/images/loading.gif");
|
|
showCover([% imagenumber | html %]);
|
|
$("a.cover_thumbnail").on('click',function(){
|
|
showCover(this.dataset.imagenumber);
|
|
});
|
|
});
|
|
|
|
function showCover(img) {
|
|
$('.thumbnail').attr('class', 'thumbnail');
|
|
$('#largeCoverImg').attr('src', '/cgi-bin/koha/opac-image.pl?imagenumber=' + img);
|
|
$('#' + img + '.thumbnail').attr('class', 'thumbnail selected');
|
|
}
|
|
</script>
|
|
[% END %]
|