Owen Leonard
3657a6fca1
This patch updates the staff interface catalog search results to use a new reusable BLOCK for displaying item information: Available items, checked-out items, and unavailable items. Some style has been updated, and an old GIF image has been replaced with an SVG. The hold ratios template has been updated to accommodate this change. To test, apply the patch and rebuild the staff interface CSS (https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client). - Perform a catalog search in the staff interface which will return multiple results with multiple items each. For thorough testing, some records should have items which are checked out, available, or lost/notforloan. - On the search results page, confirm that item information is accurate and readable. - Test with item-level_itypes on and off. - Test with noItemTypeImages on and off. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
209 lines
7.4 KiB
Text
209 lines
7.4 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% USE ItemTypes %]
|
|
[% USE TablesSettings %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Hold ratios › Circulation › Koha</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
<style>
|
|
.sql { display: none; }
|
|
.ulined { text-decoration: underline; }
|
|
#holdst ul li { list-style: outside url("[% interface | html %]/[% theme | html %]/img/item-bullet.svg") disc; }
|
|
</style>
|
|
</head>
|
|
|
|
<body id="circ_reserveratios" class="circ">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'circ-search.inc' %]
|
|
|
|
<nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
|
|
<ol>
|
|
<li>
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a>
|
|
</li>
|
|
<li>
|
|
<a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
|
|
</li>
|
|
<li>
|
|
<a href="#" aria-current="page">
|
|
Hold ratios
|
|
</a>
|
|
</li>
|
|
</ol>
|
|
</nav>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
<h1>Hold ratios to calculate items needed</h1>
|
|
<h3>Calculated on [% todaysdate | $KohaDates %]. From [% from | $KohaDates %]
|
|
to [% to | $KohaDates %]</h3>
|
|
<p>These items have a hold ratio ≥ [% ratio | html %].</p>
|
|
<div class="sql">[% sql | html %]</div>
|
|
|
|
[% IF ( reserveloop ) %]
|
|
<table id="holdst">
|
|
<thead>
|
|
<tr>
|
|
<th>Holds</th>
|
|
<th>Items</th>
|
|
<th>Hold ratio</th>
|
|
<th>Title</th>
|
|
<th>Home libraries</th>
|
|
<th>Holding libraries</th>
|
|
<th>Location</th>
|
|
<th>Itype</th>
|
|
<th>Call numbers</th>
|
|
<th>Items needed</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH reserveloo IN reserveloop %]
|
|
<tr>
|
|
<td><p>[% reserveloo.reservecount | html %]</p></td>
|
|
<td><p>[% reserveloo.itemcount | html %]</p></td>
|
|
<td><a href="/cgi-bin/koha/reserve/request.pl?biblionumber=[% reserveloo.biblionumber | uri %]" >[% reserveloo.thisratio | html %]</a></td>
|
|
<td>
|
|
[% INCLUDE 'biblio-title.inc' biblio=reserveloo link = 1 %][% IF ( reserveloo.author ) %] by [% reserveloo.author | html %][% END %]
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
[% FOREACH homebranch IN reserveloo.homebranch_list %]
|
|
<li>[% Branches.GetName ( homebranch ) | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
[% FOREACH holdingbranch IN reserveloo.holdingbranch_list %]
|
|
<li>[% Branches.GetName ( holdingbranch ) | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
[% FOREACH location IN reserveloo.location %]
|
|
<li>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => location ) | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
[% FOREACH itype IN reserveloo.itype %]
|
|
<li>[% ItemTypes.GetDescription( itype ) | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
</td>
|
|
<td>
|
|
<ul>
|
|
[% FOREACH listcall IN reserveloo.listcall %]
|
|
<li>[% listcall | html %]</li>
|
|
[% END %]
|
|
</ul>
|
|
</td>
|
|
<td class="actions">
|
|
<p>
|
|
[% IF ( reserveloo.thisratio_atleast1 ) %]
|
|
[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]<!-- [% reserveloo.copies_to_buy | html %] -->
|
|
<a href="/cgi-bin/koha/acqui/neworderempty.pl?biblionumber=[% reserveloo.biblionumber | uri %]&booksellerid=[% booksellerid | uri %]&basketno=[% basketno | uri %]&rr_quantity_to_order=[% reserveloo.copies_to_buy | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> [% reserveloo.copies_to_buy | html %] to order</a>
|
|
[% ELSE %]
|
|
<strong>[% reserveloo.copies_to_buy | html %] to order</strong>
|
|
[% END %]
|
|
[% IF ( reserveloo.pendingorders ) %]<br><strong>[% reserveloo.pendingorders | html %] pending</strong>[% END %]
|
|
[% ELSE %]
|
|
0 to order
|
|
[% END %]
|
|
</p>
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
[% ELSE %]
|
|
<strong>No items found.</strong>
|
|
[% END %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
|
|
<form action="/cgi-bin/koha/circ/reserveratios.pl" method="post" >
|
|
<fieldset class="brief">
|
|
<h4>Refine results:</h4>
|
|
<ol>
|
|
<li>
|
|
<label for="ratio">Hold ratio (greater than or equal to):</label>
|
|
<input type="text" size="5" id="ratio" name="ratio" value="[% ratio | html %]" />
|
|
</li>
|
|
|
|
<li class="checkbox">
|
|
[% IF include_ordered %]
|
|
<input id="include_ordered" name="include_ordered" type="checkbox" checked="checked"/>
|
|
[% ELSE %]
|
|
<input id="include_ordered" name="include_ordered" type="checkbox"/>
|
|
[% END %]
|
|
<label for="include_ordered">Include ordered</label>
|
|
</li>
|
|
|
|
<li class="checkbox">
|
|
[% IF include_suspended %]
|
|
<input id="include_suspended" name="include_suspended" type="checkbox" checked="checked"/>
|
|
[% ELSE %]
|
|
<input id="include_suspended" name="include_suspended" type="checkbox"/>
|
|
[% END %]
|
|
<label for="include_suspended">Include suspended</label>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="from">Start date:</label>
|
|
<input type="text" size="10" id="from" name="from" value="[% from | $KohaDates %]" class="flatpickrfrom" />
|
|
</li>
|
|
|
|
<li>
|
|
<label for="to">End date:</label>
|
|
<input size="10" id="to" name="to" value="[% to | $KohaDates %]" type="text" class="flatpickrto" />
|
|
</li>
|
|
</ol>
|
|
(inclusive)
|
|
|
|
<fieldset class="action"><input type="submit" value="Go" class="submit"/></fieldset>
|
|
</fieldset>
|
|
[% IF ( CAN_user_acquisition && basketno && booksellerid ) %]
|
|
<input type="hidden" name="booksellerid" value="[% booksellerid | html %]" />
|
|
<input type="hidden" name="basketno" value="[% basketno | html %]" />
|
|
[% END %]
|
|
</form>
|
|
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'calendar.inc' %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% INCLUDE 'columns_settings.inc' %]
|
|
<script>
|
|
var columns_settings = [% TablesSettings.GetColumns( 'circ', 'holdsratios', 'holds-ratios', 'json' ) | $raw %];
|
|
$(document).ready(function() {
|
|
KohaTable("holdst", {
|
|
"aaSorting": [ [2,'desc'], [3,'asc'] ],
|
|
"aoColumnDefs": [
|
|
{ "aTargets": [ 0,1,2,8 ], "sType": "natural" },
|
|
{ "aTargets": [ 3 ], "sType": "anti-the" },
|
|
],
|
|
"sPaginationType": "full",
|
|
"autoWidth": false
|
|
}, columns_settings);
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|