Koha/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-user.tt
Owen Leonard eb92d94be1 Bug 10309 - New OPAC theme based on Bootstrap
The goal of this theme is to provide a fully-responsive OPAC which
offers a high level of functionality across multiple devices with varied
viewport sizes. Its style is based on the CCSR theme, with elements of
the Bootstrap framework providing default styling of buttons, menus,
modals, etc.

The Bootstrap grid is used everywhere, but Bootstrap's default
responsive breakpoints have been expanded to allow for better
flexibility for our needs.

All non-translation-depended files are in the root directory of this new
theme:

css, images, itemtypeimg, js, less, and lib. Languages.pm has been
modified to ignore the new directories when parsing the theme language
directories.

This theme introduces the use of LESS (http://lesscss.org/) to build
CSS. Three LESS files can be found in the "less" directory: mixins.less,
opac.less, and responsive.less. These three files are compiled into one
CSS file for production: opac.css. "Base" theme styles are found in
opac.less. A few "mixins" (http://lesscss.org/#-mixins) are found in
mixins.less. Any CSS which is conditional on specific media queries is
found in responsive.less.

At the template level some general sturctural changes have been made.
For the most part JavaScript is now at the end of each template as is
recommended for performance reasons. JavaScript formerly in
doc-head-close.inc is now in opac-bottom.inc.

In order to be able to maintain this structure and accommodate
page-specific scripts at the same time the use of BLOCK and PROCESS are
added. By default opac-bottom.inc will PROCESS a "jsinclude" block:

[% PROCESS jsinclude %]

Each page template in the theme must contain this block, even if it is
empty:

[% BLOCK jsinclude %][% END %]

Pages which require that page-specific JavaScript be inserted can add it
to the jsinclude block and it will appear correctly at the bottom of the
rendered page.

The same is true for page-specific CSS. Each page contains a cssinclude
block:

[% BLOCK cssinclude %][% END %]

...which is processed in doc-head-close.inc:

[% PROCESS cssinclude %]

Using these methods helps us maintain a strict separation of CSS links
and blocks (at the top of each page) and JavaScript (at the bottom). A
few exceptions are made for some JavaScript which must be processed
sooner: respond.js (https://github.com/scottjehl/Respond, conditionally
applied to Internet Explorer versions < 9 to allow for layout
responsiveness), the _() function required for JS translatability, and
Modernizr (http://modernizr.com/, a script which detects browser
features and allows us to conditionally load JavaScript based on
available features--or lack thereof).

Another new JavaScript dependency in this theme is enquire.js
(http://wicky.nillia.ms/enquire.js/), which lets us trigger JavaScript
events based on viewport size.

I have made an effort to re-indent the templates in a sane way,
eliminating trailing spaces and tabs. However, I have not wrapped lines
at a specific line length. In order to improve template legibility I
have also tried to insert comments indicating the origin of closing tags
like <div> or template directives like [% END %]:

</div> <!-- / .container-fluid -->

[% END # / IF ( OpacBrowseResults && busc ) %]

TESTING

Proper testing of this theme is no easy task: Every template has been
touched. Each page should work reasonable well at a variety of screen
dimensions. Pages should be tested under many conditions which are
controlled by toggling OPAC system preferences on and off. A variety of
devices, platforms, and browsers should be tested.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2013-10-14 23:13:05 +00:00

651 lines
No EOL
47 KiB
Text

[% USE Koha %]
[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
[% IF ( LibraryNameTitle ) %][% LibraryNameTitle %][% ELSE %]Koha online[% END %] catalog &rsaquo; Your library home
[% INCLUDE 'doc-head-close.inc' %]
[% BLOCK cssinclude %][% END %]
</head>
<body id="opac-user" class="scrollto">
[% INCLUDE 'masthead.inc' %]
<div class="main">
<ul class="breadcrumb">
<li><a href="/cgi-bin/koha/opac-main.pl">Home</a> <span class="divider">&rsaquo;</span></li>
<li>[% FOREACH BORROWER_INF IN BORROWER_INFO %]<a href="/cgi-bin/koha/opac-user.pl">[% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a>[% END %] <span class="divider">&rsaquo;</span></li>
<li><a href="#">Your summary</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="userdetails" class="maincontent">
[% IF ( bor_messages ) %]
<div class="alert alert-info">
<h3>Messages for you</h3>
<ul>
[% FOREACH bor_messages_loo IN bor_messages_loop %]
<li>
<strong>[% bor_messages_loo.message %]</strong><br>
&nbsp;&nbsp;&nbsp;<i>Written on [% bor_messages_loo.message_date | $KohaDates %] by [% bor_messages_loo.branchname %]</i>
</li>
[% END %]
[% IF ( opacnote ) %]<li>[% opacnote %]</li>[% END %]
</ul>
</div>
[% END # / IF bor_messages %]
[% FOREACH BORROWER_INF IN BORROWER_INFO %]
<h2>Hello, [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]
</h2>
<p><a href="/cgi-bin/koha/opac-main.pl?logout.x=1">Click here if you're not [% BORROWER_INF.title %] [% INCLUDE 'patron-title.inc' category_type = BORROWER_INF.category_type firstname = BORROWER_INF.firstname surname = BORROWER_INF.surname othernames = BORROWER_INF.othernames cardnumber = BORROWER_INF.cardnumber %]</a></p>
[% IF ( patronupdate ) %]<div class="alert alert-info"><h3>Thank you!</h3><p>Your corrections have been submitted to the library, and a staff member will update your record as soon as possible.</p></div>[% END %]
[% IF ( BORROWER_INF.warndeparture ) %]
<div class="alert" id="warndeparture">
<strong>Please note:</strong><span> Your card will expire on <span id="warndeparture_date">[% BORROWER_INF.warndeparture | $KohaDates %]</span>. Please contact the library for more information.</span>
[% IF ( BORROWER_INF.returnbeforeexpiry ) %]<span id="warndeparture_returnbeforeexpiry"> Also note that you must return all checked out items before your card expires.</span>[% END %]
</div>
[% END %]
[% IF ( BORROWER_INF.warnexpired ) %]
<div class="alert" id="warnexpired">
<strong>Please note:</strong><span> Your card has expired. Please contact the library for more information.</span>
</div>
[% END %]
[% IF ( patron_flagged ) %]
<div class="alert">
<ul>
[% IF ( userdebarred ) %]
<li id="userdebarred"><strong>Please note:</strong> Your account has been frozen[% IF ( BORROWER_INF.userdebarreddate ) %] until <span id="userdebarred_date">[% BORROWER_INF.userdebarreddate | $KohaDates %]</span>[% END %][% IF ( BORROWER_INF.debarredcomment ) %] with the comment <span id="userdebarred_comment">"[% BORROWER_INF.debarredcomment %]"</span>[% END %]. Usually the reason for freezing an account is old overdues or damage fees. If <a href="/cgi-bin/koha/opac-user.pl">your account page</a> shows your account to be clear, please contact the library.</li>
[% END %]
[% IF ( BORROWER_INF.gonenoaddress ) %]
<li id="gonenoaddress"><strong>Please note:</strong> According to our records, we don't have up-to-date [% UNLESS ( BORROWER_INF.OPACPatronDetails ) %]<a href="/cgi-bin/koha/opac-userupdate.pl">contact information</a>[% ELSE %]contact information[% END %] on file. Please contact the library[% IF ( BORROWER_INF.OPACPatronDetails ) %] or use the <a href="/cgi-bin/koha/opac-userupdate.pl">online update form</a> to submit current information (<em>Please note:</em> there may be a delay in restoring your account if you submit online)[% END %].</li>
[% END %]
[% IF ( BORROWER_INF.lost ) %]
<li id="lost"><strong>Please note: </strong> Your library card has been marked as lost or stolen. If this is an error, please contact the library.</li>
[% END %]
[% IF ( renewal_blocked_fines ) && ( OpacRenewalAllowed ) %]
<li id="renewal_blocked_fines"><strong>Please note: </strong> Since you have <a href="/cgi-bin/koha/opac-account.pl">[% IF renewal_blocked_fines != "0.00" %] more than <span id="renewal_blocked_fines_amount">[% renewal_blocked_fines %]</span> in [% END %] fines</a>, you cannot renew your books online. Please pay your fines if you wish to renew your books.</li>
[% END %]
</ul>
</div>
[% END # / IF patron_flagged %]
<div id="opac-user-views" class="toptabs">
<ul>
<li><a href="#opac-user-checkouts">Checked out</a></li>
[% IF ( overdues_count ) %]<li><a href="#opac-user-overdues">Overdue</a></li>[% END %]
[% IF ( OPACFinesTab ) %]
[% IF ( BORROWER_INF.amountoverfive ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
[% IF ( BORROWER_INF.amountoverzero ) %]<li><a href="#opac-user-fines">Fines</a></li>[% END %]
[% IF ( BORROWER_INF.amountlessthanzero ) %]<li><a href="#opac-user-fines">Credits</a></li>[% END %]
[% END %]
[% IF ( waiting_count ) %][% IF ( BORROWER_INF.atdestination ) %]<li><a href="#opac-user-waiting">Waiting</a></li>[% END %][% END %]
[% IF ( reserves_count ) %]<li><a href="#opac-user-holds">Holds</a></li>[% END %]
</ul>
<div id="opac-user-checkouts">
[% IF ( issues_count ) %]
<form id="renewselected" action="/cgi-bin/koha/opac-renew.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]">
<input type="hidden" name="from" value="opac_user" />
<table id="checkoutst" class="table table-bordered table-striped">
<caption>[% issues_count %] Item(s) checked out</caption>
<thead>
<tr>
[% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
<th class="anti-the">Title</th>
<th class="title-string psort">Due</th>
[% UNLESS ( item_level_itypes ) %]
<th>Item type</th>
[% END %]
[% IF ( show_barcode ) %]
<th>Barcode</th>
[% END %]
<th>Call No.</th>
[% IF ( OpacRenewalAllowed ) %]
<th class="nosort">Renew</th>
[% END %]
[% IF ( OPACFinesTab ) %]
<th>Fines</th>
[% END %]
[% IF ( OPACMySummaryHTML ) %]
<th class="nosort">Links</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH ISSUE IN ISSUES %]
[% IF ( ISSUE.overdue ) %]<tr class="overdue">[% ELSE %]<tr>[% END %]
[% IF ( JacketImages ) %]<td class="jacketcell">
[% 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" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/[% ISSUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
[% ELSE %]
<a href="#"><span class="no-image">No cover image available</span></a>
[% END %]
[% END %]
[% IF ( GoogleJackets ) %]
[% IF ( ISSUE.normalized_isbn ) %]
<div style="display:block;" title="Click to view in Google Books" class="[% ISSUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
[% ELSE %]
<a href="http://books.google.com/books?q=[% ISSUE.title |url %]"><span class="no-image">No cover image available</span></a>
[% END %]
[% END %]
[% IF ( BakerTaylorEnabled ) %]
[% IF ( ISSUE.normalized_isbn ) %]
<a href="https://[% BakerTaylorBookstoreURL |html %][% ISSUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% ISSUE.normalized_isbn %]" /></a>
[% ELSE %]
<span class="no-image">No cover image available</span><!-- BakerTaylor needs normalized_isbn! -->
[% END %]
[% END %]
[% IF ( SyndeticsEnabled && SyndeticsCoverImages ) %]
[% IF ( using_https ) %]
<img src="https://secure.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
[% ELSE %]
<img src="http://www.syndetics.com/index.aspx?isbn=[% ISSUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;type=xw10&amp;upc=[% ISSUE.normalized_upc %]&amp;oclc=[% ISSUE.normalized_oclc %]" alt="" class="item-thumbnail" />
[% END %]
[% END %]
</td>[% END # / IF JacketImages %]
<td class="title">
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% ISSUE.biblionumber %]">[% ISSUE.title |html %]</a> <span class="item-details">[% ISSUE.author %]</span>
</td>
[% IF ( ISSUE.overdue ) %]
<td class="date_due overdue">
<span title="[% ISSUE.date_due %]">
<span class="tdlabel">Date due:</span>
[% ISSUE.date_due | $KohaDates %]
</span>
</td>
[% ELSE %]
<td class="date_due">
<span title="[% ISSUE.date_due %]">
<span class="tdlabel">Date due:</span>
[% ISSUE.date_due | $KohaDates %]
</span>
</td>
[% END %]
[% UNLESS ( item_level_itypes ) %]
<td class="itype">
<span class="tdlabel">Item type:</span>
[% IF ( ISSUE.imageurl ) %]
<img src="[% ISSUE.imageurl %]" title="[% ISSUE.description %]" alt="[% ISSUE.description %]" />
[% END %] [% ISSUE.description %]
</td>
[% END %]
[% IF ( show_barcode ) %]
<td class="barcode">
<span class="tdlabel">Barcode:</span>
[% ISSUE.barcode %]
</td>
[% END %]
<td class="call_no">
<span class="tdlabel">Call number:</span>
[% ISSUE.itemcallnumber %]
</td>
[% IF ( OpacRenewalAllowed ) %]
<td class="renew">
[% IF ( ISSUE.status ) %]
[% IF ( canrenew ) %]
<input type="checkbox" name="item" value="[% ISSUE.itemnumber %]"/> <a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% ISSUE.itemnumber %]&amp;borrowernumber=[% ISSUE.borrowernumber %]">Renew</a>
[% END %]
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
[% ELSE %]
Not renewable
[% IF ( ISSUE.too_many ) %]
<span class="renewals">([% ISSUE.renewsleft %] of [% ISSUE.renewsallowed %] renewals remaining)</span>
[% ELSE %]
[% IF ( ISSUE.on_reserve ) %]
<span class="renewals">(On hold)</span>
[% END %]
[% END %]
[% END %]
</td>
[% END %]
[% IF ( OPACFinesTab ) %]
<td class="fines">
<span class="tdlabel">Fines:</span>
[% IF ( ISSUE.charges ) %]
Yes
[% ELSE %]
No
[% END %]
</td>
[% END %]
[% IF ( OPACMySummaryHTML ) %]
<td class="links">[% ISSUE.MySummaryHTML %]</td>
[% END %]
</tr>
[% END # /FOREACH ISSUES %]
</tbody>
</table>
[% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
<input type="submit" class="btn" value="Renew selected" />
[% END %]
</form>
[% IF ( canrenew && !userdebarred && OpacRenewalAllowed ) %]
<form id="renewall" action="/cgi-bin/koha/opac-renew.pl" method="post">
<input type="hidden" name="from" value="opac_user" />
<input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
[% FOREACH ISSUE IN ISSUES %]
<input type="hidden" name="item" value="[% ISSUE.itemnumber %]" />
[% END %]
<input type="submit" class="btn" value="Renew all" />
</form>
[% END %]
[% ELSE %]
<table class="table table-bordered table-striped">
<tr><td>You have nothing checked out</td></tr>
</table>
[% END # IF issues_count %]
</div> <!-- / .opac-user-checkouts -->
[% IF ( OPACFinesTab ) %]
<!-- FINES BOX -->
[% IF ( BORROWER_INF.amountoverfive ) %]
<div id="opac-user-fines"> <h3>Fines and charges</h3>
<table class="table table-bordered table-striped">
<thead><tr><th colspan="2">Amount</th></tr></thead>
<tbody>
<tr>
<td>You currently owe fines and charges amounting to:</td>
<td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
</tr>
</tbody>
</table>
</div>
[% END %]
[% IF ( BORROWER_INF.amountoverzero ) %]
<div id="opac-user-fines"> <h3>Fines and charges</h3>
<table class="table table-bordered table-striped">
<thead><tr><th colspan="2">Amount</th></tr></thead>
<tbody>
<tr>
<td>You currently owe fines and charges amounting to:</td>
<td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
</tr>
</tbody>
</table>
</div>
[% END %]
[% IF ( BORROWER_INF.amountlessthanzero ) %]
<div id="opac-user-fines"> <h3>Credits</h3>
<table class="table table-bordered table-striped">
<thead><tr><th colspan="2">Amount</th></tr></thead>
<tbody>
<tr>
<td>You have a credit of:</td><td><a href="/cgi-bin/koha/opac-account.pl">[% BORROWER_INF.amountoutstanding %]</a></td>
</tr>
</tbody>
</table>
</div>
[% END %]
[% END # / OPACFinesTab %]
[% END # / FOREACH BORROWER_INFO %]
[% IF ( waiting_count && atdestination ) %]
<div id="opac-user-waiting">
<table id="waitingt" class="table table-bordered table-striped">
<caption>Holds waiting</caption>
<thead>
<tr>
<th class="anti-the">Title</th>
<th>Hold date</th>
<th>Pick up library</th>
</tr>
</thead>
<tbody>
[% FOREACH WAITIN IN WAITING %]
<tr>
<td><img src="[% themelang %]/images/[% WAITIN.itemtype %].gif" alt="[% WAITIN.itemtype %]" title="[% WAITIN.itemtype %]" /></td>
<td>
<a class="title" href="opac-detail.pl?biblionumber=[% WAITIN.biblionumber %]">
[% WAITIN.waiting_title %]
</a>
<span class="item-details">
[% WAITIN.author %]
</span></td>
<td>
<span class="tdlabel">Hold date:</span>
[% WAITIN.reservedate | $KohaDates %]</td>
<td>
[% IF ( WAITIN.atdestination ) %]
<strong>Waiting</strong> at [% WAITIN.branch %]
[% ELSE %]
In transit from [% WAITIN.holdingbranch %] to [% WAITIN.branch %]
[% END %]
</td>
</tr>
[% END %]
</tbody>
</table>
</div> <!-- /#opac-user-waiting -->
[% END # waiting_count && atdestination %]
[% IF ( overdues_count ) %]
<div id="opac-user-overdues">
<table id="overduest" class="table table-bordered table-striped">
<caption>Overdues <span class="count">([% overdues_count %] total)</span></caption>
<!-- OVERDUES TABLE ROWS -->
<thead>
<tr>
[% IF ( JacketImages ) %]<th class="nosort">&nbsp;</th>[% END %]
<th class="anti-the">Title</th>
[% UNLESS ( item_level_itypes ) %]<th>Item type</th> [% END %]
[% IF ( show_barcode ) %]<th>Barcode</th>[% END %]
<th>Call no.</th>
<th class="title-string psort">Due</th>
[% IF ( OpacRenewalAllowed ) %]
<th class="nosort">Renew</th>
[% END %]
[% IF ( OPACFinesTab ) %]
<th>Fines</th>
[% END %]
</tr>
</thead>
<tbody>
[% FOREACH OVERDUE IN OVERDUES %]
<tr>
[% IF ( JacketImages ) %]
<td class="jacketcell">
[% IF ( OPACAmazonCoverImages ) %]
[% IF ( OVERDUE.normalized_isbn ) %]
<a href="http://www.amazon.com/gp/reader/[% OVERDUE.normalized_isbn %]/ref=sib_dp_pt/002-7879865-0184864#reader-link" title="View at Amazon.com"><img src="http://images.amazon.com/images/P/[% OVERDUE.normalized_isbn %].01.THUMBZZZ.jpg" alt="" class="item-thumbnail" /></a>
[% ELSE %]
<a href="#"><span class="no-image">No cover image available</span></a>
[% END %]
[% END %]
[% IF ( GoogleJackets ) %]
[% IF ( OVERDUE.normalized_isbn ) %]
<div style="display:block;" title="Click to view in Google Books" class="[% OVERDUE.normalized_isbn %]" id="gbs-thumbnail[% loop.count %]"></div>
[% ELSE %]
<a href="http://books.google.com/books?q=[% OVERDUE.title |url %]"><span class="no-image">No cover image available</span></a>
[% END %]
[% END %]
[% IF ( BakerTaylorEnabled ) %]
[% IF ( OVERDUE.normalized_isbn ) %]
<a href="https://[% BakerTaylorBookstoreURL |html %][% OVERDUE.normalized_isbn %]"><img alt="See Baker &amp; Taylor" src="[% BakerTaylorImageURL |html %][% OVERDUE.normalized_isbn %]" /></a>
[% ELSE %]
<!-- BakerTaylor needs normalized_isbn! --><span class="no-image">No cover image available</span>
[% END %]
[% END %]
[% IF ( SyndeticsCoverImages ) %]
[% IF ( using_https ) %]
<img src="https://secure.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
[% ELSE %]
<img src="http://www.syndetics.com/index.aspx?isbn=[% OVERDUE.normalized_isbn %]/SC.GIF&amp;client=[% SyndeticsClientCode %]&amp;upc=[% OVERDUE.normalized_upc %]&amp;oclc=[% OVERDUE.normalized_oclc %]&amp;type=xw10" alt="" class="item-thumbnail" />
[% END %]
[% END %]
</td>
[% END # /IF jacketcell %]
<td>
<a class="title" href="/cgi-bin/koha/opac-detail.pl?bib=[% OVERDUE.biblionumber %]">[% OVERDUE.title |html %]
</a>
<span class="item-details">[% OVERDUE.author %]</span></td>
[% UNLESS ( item_level_itypes ) %]
<td>
[% IF ( OVERDUE.imageurl ) %]
<img src="[% OVERDUE.imageurl %]" title="[% OVERDUE.description %]" alt="[% OVERDUE.description %]" />
[% END %] [% OVERDUE.description %]
</td>
[% END %]
[% IF ( show_barcode ) %]
<td>
<span class="tdlabel">Barcode:</span>
[% OVERDUE.barcode %]
</td>
[% END %]
<td>
<span class="tdlabel">Call number:</span>
[% OVERDUE.itemcallnumber %]
</td>
<td>
<span title="[% OVERDUE.date_due %]">
<span class="tdlabel">Date due:</span>
[% OVERDUE.date_due | $KohaDates %]
</span>
</td>
[% IF ( OpacRenewalAllowed ) %]
<td>
[% IF ( OVERDUE.debarred ) %]
Account frozen
[% ELSIF ( OVERDUE.status ) %]
[% IF ( canrenew ) %]
<a href="/cgi-bin/koha/opac-renew.pl?from=opac_user&amp;item=[% OVERDUE.itemnumber %]&amp;bornum=[% OVERDUE.borrowernumber %]">Renew</a>
[% END %]
<span class="renewals">([% OVERDUE.renewsleft %] of [% OVERDUE.renewsallowed %] renewals remaining)</span>
[% ELSIF ( OVERDUE.onreserve ) %]
On hold
[% ELSE %]
No renewals left
[% END %]
</td>
[% END %]
[% IF ( OPACFinesTab ) %]
<td>
<span class="tdlabel">Fines:</span>
[% IF ( OVERDUE.charges ) %]
Yes
[% ELSE %]
No
[% END %]
</td>
[% END %]
</tr>
[% END %]
</tbody>
</table>
</div> <!-- / #opac-user-overdues -->
[% END # /overdues_count %]
[% IF ( reserves_count ) %]
<div id="opac-user-holds">
<table id="holdst" class="table table-bordered table-striped">
<caption>Holds <span class="count">([% reserves_count %] total)</span></caption>
<!-- RESERVES TABLE ROWS -->
<thead>
<tr>
<th class="anti-the">Title</th>
<th class="psort">Placed on</th>
<th>Expires on</th>
<th>Pick up location</th>
[% IF ( showpriority ) %]
<th>Priority</th>
[% END %]
<th>Status</th>
<th class="nosort">Modify</th>
</tr>
</thead>
<tbody>
[% FOREACH RESERVE IN RESERVES %]
[% IF ( RESERVE.wait ) %]
[% IF ( RESERVE.atdestination ) %]
[% IF ( RESERVE.found ) %]
<tr class="reserved">
[% ELSE %]
<tr>
[% END %]
[% ELSE %]
<tr class="transfered">
[% END %]
[% ELSE %]
<tr>
[% END %]
<td class="title">
<a class="title" href="/cgi-bin/koha/opac-detail.pl?biblionumber=[% RESERVE.biblionumber %]">[% RESERVE.reserves_title %]</a>
[% RESERVE.author %]
</td>
<td class="reservedate">
<span title="[% RESERVE.reservedate %]">
<span class="tdlabel">Hold date:</span>
[% RESERVE.reservedate | $KohaDates %]
</span>
</td>
<td class="expirationdate">
[% IF ( RESERVE.expirationdate ) %]
<span>
<span class="tdlabel">Expiration:</span>
[% RESERVE.expirationdate | $KohaDates %]
</span>
[% ELSE %]
<span class="tdlabel">Expiration:</span>
Never expires
[% END %]
</td>
<td class="branch">
<span class="tdlabel">Pick up loaction:</span>
[% RESERVE.branch %]
</td>
[% IF ( showpriority ) %]
<td class="priority">
<span class="tdlabel">Priority:</span>
[% RESERVE.priority %]
</td>
[% END %]
<td class="status">
<span class="tdlabel">Status:</span>
[% IF ( RESERVE.wait ) %]
[% IF ( RESERVE.atdestination ) %]
[% IF ( RESERVE.found ) %]
Item waiting at <b> [% RESERVE.wbrname %]</b>[% IF ( RESERVE.waitingdate ) %] since [% RESERVE.waitingdate | $KohaDates %][% END %]
<input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
[% ELSE %]
Item waiting to be pulled from <b> [% RESERVE.wbrname %]</b>
[% END %]
[% ELSE %]
Item in transit to <b> [% RESERVE.wbrname %]</b> <input type="hidden" name="pickup" value="[% RESERVE.wbrcd %]" />
[% END %]
[% ELSE %]
[% IF ( RESERVE.intransit ) %]
Item in transit from <b> [% RESERVE.frombranch %]</b> since
[% RESERVE.datesent | $KohaDates %]
[% ELSIF ( RESERVE.suspend ) %]
Suspended [% IF ( RESERVE.suspend_until ) %] until [% RESERVE.suspend_until %] [% END %]
[% ELSE %]
Pending
[% END %]
[% END %]
</td>
<td class="modify">
[% IF ( RESERVE.cancelable ) %]
<form action="/cgi-bin/koha/opac-modrequest.pl" method="post">
<input type="hidden" name="biblionumber" value="[% RESERVE.biblionumber %]" />
<input type="hidden" name="reserve_id" value="[% RESERVE.reserve_id %]" />
<button type="submit" name="submit" class="btn btn-mini btn-danger" onclick="return confirmDelete(MSG_CONFIRM_DELETE_HOLD);">Cancel</button></form>
[% END %]
</td>
</tr>
[% END # /FOREACH RESERVES %]
</tbody>
</table>
[% IF SuspendHoldsOpac %]
<div>
<form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
<input type="submit" name="submit" class="btn" value="Suspend all holds" onclick="return confirmDelete(MSG_CONFIRM_SUSPEND_HOLDS);" />
<input type="hidden" name="suspend" value="1" />
[% IF AutoResumeSuspendedHolds %]
<label for="suspend_until"> until </label>
<input name="suspend_until" id="suspend_until" readonly="readonly" size="10" />
<a href="#" style="font-size:85%;text-decoration:none;" onclick="document.getElementById('suspend_until').value='';return false;">Clear date</a>
[% END %]
</form>
</div>
<div>
<form action="/cgi-bin/koha/opac-modrequest-suspend.pl" method="post">
<input type="submit" name="submit" class="btn" value="Resume all suspended holds" onclick="return confirmDelete(MSG_CONFIRM_RESUME_HOLDS);" />
<input type="hidden" name="suspend" value="0" />
</form>
</div>
[% END %]
</div> <!-- / #opac-user-holds -->
[% END # / #reserves_count %]
</div> <!-- /#opac-user-views -->
</div> <!-- /#userdetails -->
</div> <!-- /.span10 -->
</div> <!-- /.row-fluid -->
</div> <!-- /.container-fluid -->
</div> <!-- /#main -->
[% INCLUDE 'opac-bottom.inc' %]
[% BLOCK jsinclude %]
[% INCLUDE 'calendar.inc' %]
[% INCLUDE 'datatables.inc' %]
<script type="text/JavaScript">
//<![CDATA[
var MSG_CONFIRM_DELETE_HOLD = _("Are you sure you want to cancel this hold?");
var MSG_CONFIRM_SUSPEND_HOLDS = _("Are you sure you want to suspend all holds?");
var MSG_CONFIRM_RESUME_HOLDS = _("Are you sure you want to resume all suspended holds?");
$(function() {
$('#opac-user-views').tabs();
var dTables = $("#checkoutst,#holdst,#overduest");
dTables.each(function(){
var thIndex = $(this).find("th.psort").index();
$(this).dataTable($.extend(true, {}, dataTablesDefaults, {
"aaSorting" : [[ thIndex, 'asc' ]],
"aoColumnDefs": [
{ "aTargets": [ "nosort" ],"bSortable": false,"bSearchable": false },
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
]
}));
});
[% IF ( GoogleJackets ) %]KOHA.Google.GetCoverFromIsbn();[% END %]
[% IF ( OpacRenewalAllowed && canrenew && !userdebarred ) %]
$("#renewselected").submit(function(){
valid = false;
$("input[type=checkbox]").each(function(){
if($(this).is(':checked')){
valid = true;
}
});
if(!valid){
alert(_("Nothing has been selected. Check the box for each item you want to renew"));
}
return valid;
});
$("#renewselected_link").live('click',function(){
$("#renewselected").submit();
});
$("#renewall_link").live('click',function(){
$("#renewall").submit();
});
$("#checkoutst caption").append("<div id=\"renewcontrols\"><a id=\"renewselected_link\" href=\"#\">"+_("Renew selected")+"</a> <a id=\"renewall_link\" href=\"#\">"+_("Renew all")+"</a></div>");
[% END %]
$( "#suspend_until" ).datepicker({ minDate: 1 }); // Require that "until date" be in the future
});
//]]>
</script>
[% END %]