Main Koha release repository https://koha-community.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

230 lines
9.8 KiB

[% USE Branches %]
[% SET footerjs = 1 %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Reports &rsaquo; Most-circulated items[% IF ( do_it ) %] &rsaquo; Results[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="rep_cat_issues_top" class="rep">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'cat-search.inc' %]
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> &rsaquo; [% IF ( do_it ) %]<a href="/cgi-bin/koha/reports/cat_issues_top.pl">Most-circulated items</a> &rsaquo; Results[% ELSE %]Most-Circulated Items[% END %]</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% IF ( do_it ) %]
[% FOREACH mainloo IN mainloop %]
<h1>Top [% mainloo.limit | html %] Most-circulated items</h1>
[% IF ( mainloo.loopfilter ) %]
<p>Filtered on:</p>
[% FOREACH loopfilte IN mainloo.loopfilter %]
<p>[% IF ( loopfilte.err ) %] [% END %] [% loopfilte.crit | html %] =[% loopfilte.filter | html %][% IF ( loopfilte.err ) %] [% END %]</p>
[% END %]
[% END %]
<table>
<tr> <th>Rank/Biblioitemnumbers</th>
[% FOREACH loopco IN mainloo.loopcol %]
<th colspan="2">[% loopco.coltitle | html %]</th>
[% END %]</tr>
<tr>
<th>&nbsp;</th>
[% FOREACH loopco IN mainloo.loopcol %]
<th>Item</th>
<th>Count of checkouts</th>
[% END %]
</tr>
[% FOREACH loopro IN mainloo.looprow %]
<tr>
<td>[% loopro.rowtitle | html %]</td>
[% FOREACH loopcel IN loopro.loopcell %]
<td>
[% IF ( loopcel.reference ) %]
[% IF ( loopcel.BiblioDefaultViewmarc ) %]
<a href="/cgi-bin/koha/catalogue/MARCdetail.pl?biblionumber=[% loopcel.reference |url %]">
[% ELSIF ( loopcel.BiblioDefaultViewisbd ) %]
<a href="/cgi-bin/koha/catalogue/ISBDdetail.pl?biblionumber=[% loopcel.reference |url %]">
[% ELSE %]
<a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopcel.reference |url %]">
[% END %]
[% END %]
[% IF ( loopcel.value ) %][% loopcel.value | html %][% END %]
[% IF ( loopcel.reference ) %]</a>[% END %]
</td>
<td>
[% IF ( loopcel.count ) %][% loopcel.count | html %][% END %]
</td>
[% END %]
</tr>
[% END %]
</table>
[% END %]
[% ELSE %]
<h1>Most-circulated items</h1>
<form method="post" action="/cgi-bin/koha/reports/cat_issues_top.pl">
<fieldset class="rows">
<ol>
<li><label for="from">Checkout date from: </label> <input type="text" size="10" id="from" name="Filter" />
<label for="to" class="inline">To:</label> <input size="10" id="to" name="Filter" value="" type="text" />
<span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
<li><label for="fromRO">Check-in date from</label> <input type="text" size="10" id="fromRO" name="Filter" />
<label for="toRO" class="inline">To: </label> <input type="text" size="10" id="toRO" name="Filter" value="" />
<span class="hint">[% INCLUDE 'date-format.inc' %]</span></li>
<li>
<label for="branch">Library: </label>
<select name="Filter" id="branch"><option value="" > Any library</option>
[% PROCESS options_for_libraries libraries => Branches.all() %]
</select>
</li>
<li>
<label for="documenttype">Item type: </label><select name="Filter" id="documenttype"><option value="" > Any item type</option>
[% FOREACH itemtype IN itemtypes %]
<option value="[% itemtype.itemtype | html %]" >[% itemtype.translated_description | html %] </option>
[% END %]
</select>
</li>
<li>
<label for="itemcallnumber">Call number: </label><input type="text" name="Filter" id="itemcallnumber" value="" />
</li>
<li>
<label for="ccode">Collection: </label><select name="Filter" id="ccode"><option value="" > Any collection</option>
[% FOREACH ccodeloo IN ccodeloop %]
<option value="[% ccodeloo.value | html %]" >[% ccodeloo.description | html %] </option>
[% END %]
</select>
</li>
<li>
<label for="shelvingloc">Shelving location: </label><select name="Filter" id="shelvingloc"><option value="" > Any shelving location</option>
[% FOREACH shelvinglocloo IN shelvinglocloop %]
<option value="[% shelvinglocloo.value | html %]" >[% shelvinglocloo.description | html %] </option>
[% END %]
</select>
</li>
<li>
<label for="patroncategory">Patron category: </label><select name="Filter" id="patroncategory"><option value="" > Any category code</option>
[% FOREACH patron_category IN patron_categories %]
<option value="[% patron_category.categorycode | html %]" >[% patron_category.description | html %] </option>
[% END %]
</select>
</li>
<li><label for="day">Day: </label> <input type="text" name="Filter" id="day" value="" /></li>
<li><label for="month">Month: </label> <input type="text" name="Filter" id="month" value="" /></li>
<li><label for="year">Year: </label> <input type="text" name="Filter" id="year" value="" /></li>
</ol>
</fieldset>
<fieldset class="rows">
<legend>Limits</legend>
<ol><li><label for="numberlimit">Limit to:</label><select name="Limit" id="numberlimit">
<option value ="" selected="selected">None</option>
<option value="5" selected="selected"> 5</option>
<option value ="10">10</option>
<option value ="15">15</option>
<option value ="20">20</option>
<option value ="25">25</option>
<option value ="40">40</option>
<option value ="50">50</option>
<option value ="100">100</option>
</select></li>
<li><label for="criteria">By: </label><select name="Criteria" id="criteria">
<option value ="" selected="selected">None</option>
<option value ="branch">Library</option>
<option value ="categorycode">Categorycode</option>
<option value ="itemtype">Itemtype</option>
<option value ="Day">Day</option>
<option value ="Week">Week</option>
<option value ="Month">Month</option>
<option value ="Year">Year</option>
</select></li></ol>
</fieldset>
<fieldset class="rows">
<legend>Output</legend>
<ol>
<li>
<label for="outputscreen">To screen into the browser: </label><input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
</li>
<li>
<label for="outputfile">To a file:</label> <input type="radio" name="output" value="file" id="outputfile" />
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
<label class="inline" for="MIME">Into an application:</label>
<select name="MIME" id="MIME" size="1">
[% FOREACH value IN CGIextChoice %]
<option value="[% value | html %]">[% value | html %]</option>
[% END %]
</select>
<select name="sep" id="sep" size="1">
[% FOREACH value IN CGIsepChoice.values.sort() %]
[% IF ( value == CGIsepChoice.default ) %]
<option value="[% value | html %]" selected="selected">[% value | html %]</option>
[% ELSE %]
<option value="[% value | html %]">[% value | html %]</option>
[% END %]
[% END %]
</select>
</li>
</ol>
</fieldset>
<fieldset class="action">
<input type="submit" value="Submit" />
<input type="hidden" name="report_name" value="[% report_name | html %]" />
<input type="hidden" name="do_it" value="1" />
</fieldset>
</form>
[% END %]
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'reports-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'calendar.inc' %]
<script>
[% UNLESS ( do_it ) %]
$(document).ready(function() {
// http://jqueryui.com/demos/datepicker/#date-range
var dates = $( "#from, #to" ).datepicker({
changeMonth: true,
numberOfMonths: 1,
onSelect: function( selectedDate ) {
var option = this.id == "from" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" );
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
dates.not( this ).datepicker( "option", option, date );
}
});
var datesRO = $( "#fromRO, #toRO" ).datepicker({
changeMonth: true,
numberOfMonths: 1,
onSelect: function( selectedDate ) {
var option = this.id == "fromRO" ? "minDate" : "maxDate",
instance = $( this ).data( "datepicker" );
date = $.datepicker.parseDate(
instance.settings.dateFormat ||
$.datepicker._defaults.dateFormat,
selectedDate, instance.settings );
datesRO.not( this ).datepicker( "option", option, date );
}
});
});
[% END %]
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]