Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/reserveratios.tt
Owen Leonard 2b74492d7d Bug 8181 [REVISED] Replace DynArch calendar widget with jQueryUI version
All instances of the old DynArch calendar have been replaced with
jQueryUI versions and the old library files have been removed.

calendar.inc has been modified to include jQueryUI localization
strings and global configuration options. Just add a "datepicker"
class to an input field to trigger a datepicker prompt.

If you would like two fields in one from to limit each other (one
is date from, one is date to), add these classes to each:
"datepickerfrom" and "datepickerto." This will prevent an invalid
entry, e.g. a date in the latter which falls before the former.

jQueryUI is now upgraded to the latest verision, 1.8.21.

Edit: Now with proper translatability, date formatting, first day
of the week handling, and RTL support.

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
Signed-off-by: Ian Walls <koha.sekjal@gmail.com>
QA Comment:  rebased on current master; minor merge conflicts with other patches pushed

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
2012-06-25 18:26:26 +02:00

129 lines
4.8 KiB
Text

[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Hold ratios</title>
[% INCLUDE 'doc-head-close.inc' %]
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
<script type="text/javascript">
//<![CDATA[
$.tablesorter.addParser({
id: 'articles',
is: function(s) {return false; },
format: function(s) { return s.toLowerCase().replace(/^(the|an|a) /,''); },
type: 'text'
});
$(document).ready(function() {
$("th a").hide();
$(".ratiolimit").click(function () {
$("#ratio").val($(this).html());
});
$(".ratiolimit").hover(
function () { $(this).toggleClass("ulined") },
function () { $(this).toggleClass("ulined") }
);
$.tablesorter.defaults.widgets = ['zebra'];
$("#holdst:has(tbody tr)").tablesorter({ // only add sort if the table has a body and rows
sortList: [[0,1]],
headers: { 1: { sorter: 'articles' }}
});
});
//]]>
</script>
<style type="text/css">
.sql { display: none; }
.ulined { text-decoration: underline; }
.ratiolimit { color: blue; cursor: pointer; }
</style>
</head>
<body id="circ_reserveratios" class="circ">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'circ-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a> &rsaquo; Hold ratios</div>
<div id="doc3" class="yui-t2">
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<h1>Hold ratios to calculate items needed</h1>
<h3>Calculated on [% todaysdate %]. From [% from %]
to [% to %]</h3>
<p>These items have a hold ratio &ge; [% ratio %].</p>
<div class="sql">[% sql %]</div>
[% IF ( reserveloop ) %]
<table id="holdst">
<thead> <tr>
<th>Holds
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=reservecount&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Items
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=itemcount&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Hold ratio</th>
<th>Title
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=biblio&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Holding libraries
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=branch&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Location
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=location&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Itype
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=itype&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Call numbers
<a href="/cgi-bin/koha/circ/reserveratios.pl?ratio=[% ratio %]&amp;order=callnumber&amp;from=[% from %]&amp;to=[% to %]">Sort</a>
</th>
<th>Items needed
</th>
</tr></thead>
<tbody>[% FOREACH reserveloo IN reserveloop %]
<tr>
<td><p>[% reserveloo.reservecount %]</p></td>
<td><p>[% reserveloo.itemcount %]</p></td>
<td><p class="ratiolimit">[% reserveloo.thisratio %]</p></td>
<td> [% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %][% reserveloo.title |html %] [% IF ( reserveloo.subtitle ) %][% FOREACH subtitl IN reserveloo.subtitle %][% subtitl.subfield %][% END %][% END %]</a>[% IF ( reserveloo.author ) %] by [% reserveloo.author %][% END %]
</td>
<td><p>[% reserveloo.listbranch %]</p></td>
<td><p>[% reserveloo.location %]</p></td>
<td><p>[% reserveloo.itype %]</p></td>
<td><p>[% reserveloo.listcall %]</p></td>
<td>[% IF ( reserveloo.thisratio_atleast1 ) %]<p><b>[% reserveloo.ratiocalc %] to order</b></p>[% END %]</td>
</tr>
[% END %]</tbody>
</table>
[% ELSE %]
<b>No items found.</b>
[% END %]
</div>
</div>
<div class="yui-b">
<form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
<fieldset class="brief">
<h4>Refine results:</h4>
<ol><li><label for="ratio">
Hold ratio:
</label>
<input type="text" size="5" id="ratio" name="ratio" value="[% ratio %]" /></li>
<li><label for="from">
Start date:
</label>
<input type="text" size="10" id="from" name="from" value="[% from %]" class="datepickerfrom" />
</li>
<li><label for="to">
End date:
</label>
<input size="10" id="to" name="to" value="[% to %]" type="text" class="datepickerto" />
</li></ol>
(inclusive)
<fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
</fieldset>
</form>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]