Koha/koha-tmpl/intranet-tmpl/prog/en/modules/circ/transferstoreceive.tt
Owen Leonard 612b33ae69 Bug 11711 - Use new DataTables include in circ templates
Bug 10649 introduced a new include file for adding DataTables-related
JavaScript assets. This patch adds use of this include file to all
circ-related pages which use DataTables.

Apply the patch and test the following pages to confirm that table
sorting works correctly:

- Circulation
  - The UseTablesortForCirc system preference must be enabled.
  - Check out to a patron with existing checkouts. Choose a patron who
    is a guarantor to another patron with checkouts in order to test the
    relatives' checkouts table.
  - The checkouts and relatives' checkouts tables have been modified to
    exclude articles when sorting of titles.

- Hold ratios - The title column has been configured to exclude articles
  from sorting

- Transfer to receive

- Holds queue
  - The title column has been configured to exclude articles when
    sorting
  - The date column has been modified to use the title-string filter for
    sorting. An unformatted date is now passed from C4::HoldsQueue.pm to
    the template, where the KohaDates filter is used for formatting.
    Sorting is based on the unformatted date.

- Holds awaiting pickup
  - The "available since" column has been configured for sorting on an
    unformatted date. waitingreserves.pl now passes the unformatted
    date to the template, and formatting is done using the KohaDates
    filter.
  - The title column has been configured to exclude articles when
    sorting.

Edit: Rebased on current master following commit of Bug 11605
Signed-off-by: A. Sassmannshausen <alex.sassmannshausen@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
2014-04-08 23:47:27 +00:00

100 lines
4.3 KiB
Text

[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Circulation &rsaquo; Transfers to your library</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[
[% IF (dateformat == 'metric') %]
dt_add_type_uk_date();
[% END %]
$(document).ready(function() {
[% FOREACH branchesloo IN branchesloop %]
$("#transferst[% branchesloo.branchcode %]").dataTable($.extend(true, {}, dataTablesDefaults, {
"aoColumnDefs": [
{ "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
],
"aoColumns": [
{ "sType": "title-string" },{ "sType": "anti-the" },null,null,null,null
],
"sDom": 't',
"bPaginate": false
}));
[% END %]
});
//]]>
</script>
</head>
<body id="circ_transferstoreceive" 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; Transfers to your library</div>
<div id="doc" class="yui-t7">
<div id="bd">
<div id="yui-main">
<div class="yui-g">
<h1>Transfers made to your library as of [% show_date %]</h1>
[% IF ( branchesloop ) %]
<p>Your library is the destination for the following transfer(s)</p>
[% IF ( latetransfers ) %]<p>Transfers are <span class="error">considered late</span> after [% TransfersMaxDaysWarning %] days.</p>[% END %]
<div id="resultlist">
[% FOREACH branchesloo IN branchesloop %]
[% IF ( branchesloo.branchcode ) %]
<table style="width: 100%" id="transferst[% branchesloo.branchcode %]">
<caption>Coming from [% branchesloo.branchname %]</caption>
<thead><tr>
<th>Date of transfer</th>
<th>Title</th>
<th>On hold for</th>
<th>Home library</th>
<th>Call no.</th>
<th>&nbsp;</th>
</tr></thead>
<tbody>[% FOREACH reser IN branchesloo.reserv %]
[% IF ( reser.messcompa ) %]
<tr class="problem">
[% ELSE %]
<tr>
[% END %]
<td><p><span title="[% reser.datetransfer %]">[% reser.datetransfer | $KohaDates %]</span></p> [% IF ( reser.messcompa ) %]<span class="error">Transfer is [% reser.diff %] days late</span>[% END %]</td>
<td>
[% INCLUDE 'biblio-default-view.inc' biblionumber = reser.biblionumber %][% reser.title |html %] [% IF ( reser.subtitle ) %] [% FOREACH subtitl IN reser.subtitle %][% subtitl.subfield %][% END %][% END %]</a> [% IF ( reser.author ) %]by [% reser.author %][% END %]
[% IF ( reser.itemtype ) %]&nbsp; (<b>[% reser.itemtype %]</b>)[% END %]
<br />Barcode: [% reser.barcode %]
</td>
<td>[% IF ( reser.borrowername ) %]
<a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reser.borrowernum %]">
[% reser.borrowername %] &nbsp; [% reser.borrowerfirstname %]
</a>
<br />[% reser.borrowerphone %]<br />
[% IF ( reser.borrowermail ) %]
<a href="mailto:[% reser.email %]?subject=Reservation: [% reser.title |html %]">
[% reser.borrowermail %]
</a>
[% END %]
[% ELSE %]
<p>None</p>
[% END %]
</td>
<td>[% reser.homebranch %]</td>
<td>[% reser.itemcallnumber %]</td>
<td><a href="/cgi-bin/koha/circ/returns.pl?itemnumber=[% reser.itemnumber %]&amp;canceltransfer=1&amp;dest=ttr">Cancel transfer</a></td>
</tr>
[% END %]</tbody>
</table>
[% END %]
[% END %]
</div>
[% ELSE %]
<p>No transfers to receive</p>
[% END %]
</div>
</div>
</div>
[% INCLUDE 'intranet-bottom.inc' %]