f7d31f3916
This patch introduces the code lost in bug 10860 for the OPAC side. Test plan: Go on opac-readingrecord.pl and verify the tabs work as expected and the "show all items" and "show 50 items" links. Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
192 lines
12 KiB
Text
192 lines
12 KiB
Text
[% USE Koha %]
|
|
[% USE KohaDates %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog › Your checkout history
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
[% BLOCK cssinclude %]
|
|
<style type="text/css">ul.ui-tabs-nav li a, ul.ui-tabs-nav li span.a { padding:0.6em 1em; }</style>
|
|
[% END %]
|
|
</head>
|
|
[% INCLUDE 'bodytag.inc' bodyid='opac-readingrecord' %]
|
|
[% INCLUDE 'masthead.inc' %]
|
|
|
|
<div class="main">
|
|
<ul class="breadcrumb">
|
|
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">›</span></li>
|
|
<li><a href="/cgi-bin/koha/opac-user.pl">[% firstname %] [% surname %]</a> <span class="divider">›</span></li>
|
|
<li><a href="#">Your checkout history</a></li>
|
|
</ul>
|
|
|
|
<div class="container-fluid">
|
|
<div class="row-fluid">
|
|
<div class="span2">
|
|
<div id="navigation">
|
|
[% INCLUDE 'navigation.inc' IsPatronPage=1 %]
|
|
</div>
|
|
</div>
|
|
<div class="span10">
|
|
<div id="userreadingrecord">
|
|
<h3>Checkout history</h3>
|
|
|
|
[% IF READING_RECORD.size == 0 %]
|
|
You have never borrowed anything from this library.
|
|
[% ELSE %]
|
|
<div id="opac-user-readingrec" class="statictabs2">
|
|
<div class="resultscontrol resort">
|
|
<form id="sortform" action="/cgi-bin/koha/opac-readingrecord.pl" method="get">
|
|
[% UNLESS ( limit ) %]<input type="hidden" name="limit" value="full" />[% END %]
|
|
<select name="order" id="order">
|
|
[% IF ( orderbydate ) %]<option value="" selected="selected">Order by date</option>[% ELSE %]<option value="">Order by date</option>[% END %]
|
|
[% IF ( orderbytitle ) %]<option value="title" selected="selected">Order by title</option>[% ELSE %]<option value="title">Order by title</option>[% END %]
|
|
</select>
|
|
<input type="submit" value="Go" id="sortsubmit" class="submit clearfix" />
|
|
</form>
|
|
</div>
|
|
|
|
[% IF limit %]
|
|
<a href="/cgi-bin/koha/opac-readingrecord.pl?limit=full[% IF ( orderbytitle ) %]&order=title[% END %]">Show all items</a>
|
|
[% ELSE %]
|
|
<a href="/cgi-bin/koha/opac-readingrecord.pl?limit=50[% IF ( orderbytitle ) %]&order=title[% END %]">Showing last 50 items</a>
|
|
[% END %]
|
|
|
|
<div id="tabs" class="toptabs">
|
|
<ul>
|
|
<li><a href="#tabs-container" id="tab_all">All</a></li>
|
|
<li><a href="#tabs-container" id="tab_checkout">Checkouts</a></li>
|
|
<li><a href="#tabs-container" id="tab_onsite_checkout">On-site checkouts</a></li>
|
|
</ul>
|
|
<div id="tabs-container" style="overflow:hidden">
|
|
<table id="readingrec" class="table table-bordered table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th style="display:none;">Type</th>
|
|
<th></th>
|
|
<th>Title</th>
|
|
<th>Item type</th>
|
|
<th>Call no.</th>
|
|
<th>Date</th>
|
|
[% IF ( OPACMySummaryHTML ) %]
|
|
<th>Links</th>
|
|
[% END %]
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH issue IN READING_RECORD %]
|
|
<tr>
|
|
<td style="display:none;">
|
|
[% IF issue.onsite_checkout %]
|
|
onsite
|
|
[% ELSE %]
|
|
checkout
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF OPACAmazonCoverImages %]
|
|
[% IF issue.normalized_isbn %]
|
|
<a href="http://www.amazon.com/gp/reader/[% issue.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link"><img border="0" src="https://images-na.ssl-images-amazon.com/images/P/[% issue.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF GoogleJackets %]
|
|
[% IF issue.normalized_isbn %]
|
|
<div title="[% issue.biblionumber |url %]" class="[% issue.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF BakerTaylorEnabled %]
|
|
[% IF issue.normalized_isbn %]
|
|
<a href="https://[% BakerTaylorBookstoreURL |html %][% issue.normalized_isbn %]"><img alt="See Baker & Taylor" src="[% BakerTaylorImageURL |html %][% issue.normalized_isbn %]" /></a>
|
|
[% ELSE %]
|
|
<span class="no-image">No cover image available</span>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF SyndeticsEnabled && SyndeticsCoverImages %]
|
|
[% IF using_https %]
|
|
<img src="https://secure.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% issue.normalized_upc %]&oclc=[% issue.normalized_oclc %]" alt="" class="item-thumbnail" />
|
|
[% ELSE %]
|
|
<img src="http://www.syndetics.com/index.aspx?isbn=[% issue.normalized_isbn %]/SC.GIF&client=[% SyndeticsClientCode %]&type=xw10&upc=[% issue.normalized_upc %]&oclc=[% issue.normalized_oclc %]" alt="" class="item-thumbnail" />
|
|
[% END %]
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF issue.BiblioDefaultViewmarc %]
|
|
<a class="title" href="/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
|
|
[% ELSIF issue.BiblioDefaultViewisbd %]
|
|
<a class="title" href="/cgi-bin/koha/opac-ISBDdetail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
|
|
[% ELSE %]
|
|
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% issue.biblionumber |url %]">[% issue.title |html %] [% IF issue.subtitle %][% FOREACH subtitl IN issue.subtitle %][% subtitl.subfield %][% END %][% END %]</a>
|
|
[% END %]
|
|
<span class="item-details">[% issue.author %]</span>
|
|
</td>
|
|
<td>
|
|
[% UNLESS ( noItemTypeImages ) %]
|
|
[% IF ( issue.imageurl ) %]
|
|
<img src="[% issue.imageurl %]" alt="" />
|
|
[% END %]
|
|
[% END %]
|
|
<span class="tdlabel">Item type:</span>
|
|
[% issue.description %]</td>
|
|
<td>
|
|
<span class="tdlabel">Call number:</span>
|
|
[% issue.itemcallnumber %]
|
|
</td>
|
|
<td>
|
|
[% IF issue.returndate %]
|
|
<span class="tdlabel">Check-in date:</span>
|
|
[% issue.returndate | $KohaDates %]
|
|
[% ELSE %]
|
|
<em>(Checked out)</em>
|
|
[% END %]
|
|
</td>
|
|
[% IF OPACMySummaryHTML %]
|
|
<td>[% issue.MySummaryHTML %]</td>
|
|
[% END %]
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div> <!-- / .tabs-container -->
|
|
</div> <!-- / .opac-user-readingrec -->
|
|
[% END %]
|
|
</div> <!-- / .userreadingrecord -->
|
|
</div> <!-- / .span10 -->
|
|
</div> <!-- / .row-fluid -->
|
|
</div> <!-- / .container-fluid -->
|
|
</div> <!-- / .main -->
|
|
|
|
[% INCLUDE 'opac-bottom.inc' %]
|
|
[% BLOCK jsinclude %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script type="text/javascript">
|
|
//<![CDATA[
|
|
$(document).ready(function(){
|
|
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
|
|
$('#sortsubmit').hide();
|
|
$('#order').change(function() {
|
|
$('#sortform').submit();
|
|
});
|
|
|
|
var table = $("#readingrec").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"sPaginationType": "four_button",
|
|
}));
|
|
var tabs = $("#tabs").tabs({
|
|
select: function(e, ui) {
|
|
var id = $(ui.tab).attr("id");
|
|
if ( id == "tab_checkout" ) {
|
|
table.fnFilter("checkout", 0);
|
|
} else if ( id == "tab_onsite_checkout" ) {
|
|
table.fnFilter("onsite", 0);
|
|
} else { // all
|
|
table.fnFilter('', 0);
|
|
}
|
|
}
|
|
});
|
|
});
|
|
//]]>
|
|
</script>
|
|
[% END %]
|