Owen Leonard
6c7c97f67c
DataTables are used on enough pages in the staff client that it doesn't make sense to put inclusion of the CSS into each template where it is needed. This patch moves includes of datatables.css from individual templates into the global header file. To test, apply the patch and view various pages which have DataTables. View various styles of DataTables, e.g. - Full pagination, like item search results - Four-button, like Saved SQL reports Everything should look the same as it was. Signed-off-by: Jose-Mario Monteiro-Santos <jose-mario.monteiro-santos@inLibro.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
151 lines
5.2 KiB
Text
151 lines
5.2 KiB
Text
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE Koha %]
|
|
[% USE AuthorisedValues %]
|
|
[% USE Branches %]
|
|
[% USE ColumnsSettings %]
|
|
[% USE ItemTypes %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Holds history for [% INCLUDE 'patron-title.inc' no_html = 1 %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="pat_holdshistory" class="pat">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'patron-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Holds history for [% INCLUDE 'patron-title.inc' %]</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
[% INCLUDE 'members-toolbar.inc' %]
|
|
<h1>Holds history</h1>
|
|
|
|
[% UNLESS Koha.Preference('intranetreadinghistory') %]
|
|
<div class="dialog alert">Staff members are not allowed to access patron's holds history</div>
|
|
[% ELSIF is_anonymous %]
|
|
<div class="dialog alert">This is the anonymous patron, so no holds history is displayed.</div>
|
|
[% ELSIF ( !holds ) %]
|
|
<div class="dialog message">This patron has no holds history.</div>
|
|
[% ELSE %]
|
|
|
|
[% SET show_itemtype_column = Koha.Preference('AllowHoldItemTypeSelection') %]
|
|
|
|
<div id="holdshistory" style="overflow:hidden">
|
|
<table id="table_holdshistory">
|
|
<thead>
|
|
<tr>
|
|
<th class="anti-the">Title</th>
|
|
<th>Author</th>
|
|
<th>Barcode</th>
|
|
<th>Library</th>
|
|
<th class="title-string">Hold date</th>
|
|
<th class="title-string">Expiration date</th>
|
|
<th class="title-string">Waiting date</th>
|
|
<th class="title-string">Cancellation date</th>
|
|
[% IF show_itemtype_column %]
|
|
<th>Requested item type</th>
|
|
[% END %]
|
|
<th>Status</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
[% FOREACH hold IN holds %]
|
|
<tr>
|
|
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% hold.biblio.biblionumber | uri %]">[% hold.biblio.title | html %]</a></td>
|
|
<td>[% hold.biblio.author | html %]</td>
|
|
<td>[% hold.item.barcode | html %]</td>
|
|
<td>[% Branches.GetName( hold.branchcode ) | html %]</td>
|
|
<td><span title="[% hold.reservedate | html %]">[% hold.reservedate | $KohaDates %]</span></td>
|
|
<td>
|
|
[% IF hold.expirationdate %]
|
|
<span title="[% hold.expirationdate | html %]">[% hold.expirationdate | $KohaDates %]</span>
|
|
[% ELSE %]
|
|
<span title="0000-00-00"></span>
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF hold.waitingdate %]
|
|
<span title="[% hold.waitingdate | html %]">[% hold.waitingdate | $KohaDates %]</span>
|
|
[% ELSE %]
|
|
<span title="0000-00-00"></span>
|
|
[% END %]
|
|
</td>
|
|
<td>
|
|
[% IF hold.cancellationdate %]
|
|
<span title="[% hold.cancellationdate | html %]">[% hold.cancellationdate | $KohaDates %]</span>
|
|
[% ELSE %]
|
|
<span title="0000-00-00"></span>
|
|
[% END %]
|
|
</td>
|
|
[% IF show_itemtype_column %]
|
|
<td>
|
|
[% IF hold.itemtype %]
|
|
[% ItemTypes.GetDescription( hold.itemtype ) | html %]
|
|
[% ELSE %]
|
|
<span>Any item type</span>
|
|
[% END %]
|
|
</td>
|
|
[% END %]
|
|
<td>
|
|
[% IF hold.found == 'F' %]
|
|
Fulfilled
|
|
[% ELSIF hold.cancellationdate %]
|
|
Cancelled
|
|
[% ELSIF hold.found == 'W' %]
|
|
Waiting
|
|
[% ELSIF hold.found == 'T' %]
|
|
In transit
|
|
[% ELSE %]
|
|
Pending
|
|
[% END %]
|
|
</td>
|
|
</tr>
|
|
[% END %]
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
|
|
[% END %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'circ-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
[% INCLUDE 'columns_settings.inc' %]
|
|
[% INCLUDE 'str/members-menu.inc' %]
|
|
[% Asset.js("js/members-menu.js") | $raw %]
|
|
<script>
|
|
$(document).ready(function() {
|
|
var columns_settings = [% ColumnsSettings.GetColumns('members', 'holdshistory', 'holdshistory-table', 'json') %];
|
|
[% UNLESS show_itemtype_column %]
|
|
//Remove item type column settings
|
|
columns_settings = columns_settings.filter(function(c){return c['columnname'] != 'itemtype';});
|
|
[% END %]
|
|
var table = KohaTable("table_holdshistory", {
|
|
"sPaginationType": "four_button",
|
|
"aaSorting": [[4, 'desc']],
|
|
"sDom": 'C<"top pager"ilpfB><"#filter_c">tr<"bottom pager"ip>',
|
|
"aoColumnDefs": [
|
|
{ "sType": "anti-the", "aTargets" : [ "anti-the" ] },
|
|
{ "sType": "title-string", "aTargets" : [ "title-string" ] }
|
|
]
|
|
}, columns_settings);
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|