Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/waitingreserves.tt
Owen Leonard b17297434c Bug 12692 - Markup improvements to holds awaiting pickup report
This patch makes some minor updates to the output of the holds awaiting
pickup report. To test you should have several holds which are marked as
"waiting," including some which have been waiting longer than the number
of days specified in the ReservesMaxPickUpDelay system preference.

- Go to Circulation -> Holds awaiting pickup
- In both the "waiting" and "over" tabs, confirm that titles display any
  associated subtitle
- Confirm that library name is shown instead of library code
- Confirm that the patron name mailto: link works correctly

Signed-off-by: Frederic Demians <f.demians@tamil.fr>

Works as described: subtitle displayes (if mapping defined), library name
instead of code, and email as clickable mailto.

Remark 1: As for bug 13083, subtitle display is not as good in UNIMARC than in
MARC21, since subtitle is not separated from title by ':'.

Remark 2: 'subtitle' field is retrieved from a field mapping. Taking a look at
C4::Biblio::GetRecordValue, one see that the fieldmapping is directly queried.
There isn't any caching system, like for frameworks.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described and passes tests and QA script.

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
2014-11-10 12:22:13 -03:00

190 lines
9.8 KiB
Text

[% USE KohaDates %]
[% USE Branches %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
$('#resultlist').tabs();
$("th a").hide();
$("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
],
"sPaginationType": "four_button"
}));
});
//]]>
</script>
</head>
<body id="circ_waitingreserves" 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; <a href="/cgi-bin/koha/circ/waitingreserves.pl">Holds awaiting pickup</a>
</div>
<div id="doc3" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-g">
<h2>Holds awaiting pickup for your library on: [% show_date %]
[% IF ( all_branches_link ) %]
<span style="margin-left:20px"><a href="[% all_branches_link %]">
View all libraries</a></span>
[% END %]
</h2>
[% IF ( cancel_result ) %]
[% FOREACH cancel_result %]
[% IF ( messagetransfert ) %]
<div class="dialog message">
<h2>This item is on hold for pick-up at [% branchname %]</h2>
<p><strong>[% nextreservtitle %]</strong> is on hold for <strong> [% nextreservsurname %], [% nextreservfirstname %]</strong>.
Please retain this item and check it in to process the hold.
</p>
<form name="cancelReservewithtransfert" action="waitingreserves.pl" method="post">
<input type="submit" class="submit" value="OK" />
</form>
</div>
[% END %]
[% IF ( waiting ) %]
<div class="dialog message">
<h2>This item is on hold for pick-up at your library</h2>
<p><strong>[% nextreservtitle %]</strong> is on hold for <strong>[% nextreservsurname %], [% nextreservfirstname %]</strong>.
Please retain this item and check it in to process the hold.
</p>
<form name="cancelReservewithwaiting" action="waitingreserves.pl" method="post">
<input type="submit" class="submit" value="OK"/>
</form>
</div>
[% END %]
[% END %]
[% ELSE %]
<div id="resultlist" class="toptabs">
<ul>
<li><a href="#holdswaiting">[% reservecount %] Hold(s) waiting</a></li>
<li><a href="#holdsover">[% overcount %] Hold(s) over</a></li>
</ul>
<div id="holdswaiting">
[% IF ( reserveloop ) %]
<table id="holdst">
<thead><tr>
<th class="title-string">Available since</th>
<th class="anti-the">Title</th>
<th>Patron</th>
<th>Location</th>
<th>Copy number</th>
<th>Enumeration</th>
<th>Action</th>
</tr></thead>
<tbody>[% FOREACH reserveloo IN reserveloop %]
<tr>
<td><span title="[% reserveloo.waitingdate %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
[% reserveloo.title |html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield %][% END %]
</a>
[% UNLESS ( item_level_itypes ) %][% IF ( reserveloo.itemtype ) %]&nbsp; (<b>[% reserveloo.itemtype %]</b>)[% END %][% END %]
<br />Barcode: [% reserveloo.barcode %]
</td>
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.borrowernum %]">[% reserveloo.borrowername %], [% reserveloo.borrowerfirstname %]</a>
[% IF ( reserveloo.borrowerphone ) %]<br />[% reserveloo.borrowerphone %][% END %]
[% IF ( reserveloo.borrowermail ) %]<br /><a href="mailto:[% reserveloo.borrowermail %]?subject=Hold waiting: [% reserveloo.title %]">
[% reserveloo.borrowermail %]</a>[% END %]
</td>
<td>[% Branches.GetName( reserveloo.homebranch ) %]<br />[% reserveloo.itemcallnumber %]</td>
<td>[% reserveloo.copynumber %]</td>
<td>[% reserveloo.enumchron %]</td>
<td>
<form name="cancelReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" />
<input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
<input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" />
<input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" />
[% IF ( reserveloo.dotransfer ) %]
<input type="submit" value="Cancel hold and return to : [% reserveloo.branchname %]" />
[% ELSE %]
<input type="submit" value="Cancel hold" />
[% END %]
</form>
</td>
</tr>
[% END %]</tbody>
</table>
[% ELSE %]
<div class="dialog message">No holds found.</div>
[% END %]
</div>
<div id="holdsover">
[% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %]
[% IF ( overloop ) %]
<form name="cancelAllReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="cancelall" value="1" />
<input type="hidden" name="allbranches" value="[% allbranches %]" />
<input type="submit" value="Cancel [% IF TransferWhenCancelAllWaitingHolds %]and Transfer [% END %]All" />
</form>
[% UNLESS TransferWhenCancelAllWaitingHolds %]
Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref)
[% END %]
<table id="holdso">
<thead><tr>
<th class="title-string">Available since</th>
<th class="anti-the">Title</th>
<th>Patron</th>
<th>Location</th>
<th>Copy number</th>
<th>Enumeration</th>
<th>Action</th>
</tr></thead>
<tbody>[% FOREACH overloo IN overloop %]
<tr>
<td><p><span title="[% overloo.waitingdate %]">[% overloo.waitingdate | $KohaDates %]</span></p></td>
<td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %]
[% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield %][% END %]
</a>
[% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %]&nbsp; (<b>[% overloo.itemtype %]</b>)[% END %][% END %]
<br />Barcode: [% overloo.barcode %]
</td>
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overloo.borrowernum %]">[% overloo.borrowername %], [% overloo.borrowerfirstname %]</a><br />[% overloo.borrowerphone %]<br />
[% IF ( overloo.borrowermail ) %]<a href="mailto:[% overloo.borrowermail %]?subject=Reservation: [% overloo.title |url %]">
[% overloo.borrowermail %]</a>[% END %]
</td>
<td>[% Branches.GetName( overloo.homebranch ) %] [% overloo.itemcallnumber %]</td>
<td>[% overloo.copynumber %]</td>
<td>[% overloo.enumchron %]</td>
<td><form name="cancelReserve" action="waitingreserves.pl" method="post">
<input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" />
<input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" />
<input type="hidden" name="fbr" value="[% overloo.holdingbranch %]" />
<input type="hidden" name="tbr" value="[% overloo.homebranch %]" />
[% IF ( overloo.dotransfer ) %]
<input type="submit" value="Cancel hold and return to : [% overloo.branchname %]" />
[% ELSE %]
<input type="submit" value="Cancel hold" />
[% END %]
</form>
</td>
</tr>
[% END %]</tbody>
</table>
[% ELSE %]
<div class="dialog message">No holds found.</div>
[% END %]
</div>
</div>
[% END %]
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]