Bug 21628: Simplify holds awating pickup report
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / waitingreserves.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Branches %]
6 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") | $raw %]
11 </head>
12
13 <body id="circ_waitingreserves" class="circ">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'circ-search.inc' %]
16
17 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
18 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
19 &rsaquo; <a href="/cgi-bin/koha/circ/waitingreserves.pl">Holds awaiting pickup</a>
20 </div>
21
22 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
23
24    <div id="bd">
25     <div id="yui-main">
26     [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
27     <div class="yui-g">
28
29         <h2>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]
30             [% IF ( all_branches_link ) %]
31             <span style="margin-left:20px"><a href="[% all_branches_link | uri %]">
32             View all libraries</a></span>
33             [% END %]
34         </h2>
35     [% IF ( cancel_result ) %]
36         [% FOREACH cancel_result %]
37             [% IF ( messagetransfert ) %]
38                 <div class="dialog message">
39                     <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
40                     <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
41                     Please retain this item and check it in to process the hold.
42                     </p>
43                     <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
44                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
45                     </form>
46                 </div>
47             [% END %]
48             [% IF ( waiting ) %]
49                 <div class="dialog message">
50                     <h2>This item is on hold for pick-up at your library</h2>
51                     <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
52                     Please retain this item and check it in to process the hold.
53                     </p>
54                     <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
55                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
56                     </form>
57                 </div>
58             [% END %]
59         [% END %]
60     [% ELSE %]
61         <div id="resultlist" class="toptabs">
62             <ul>
63                 <li><a href="#holdswaiting">Holds waiting: [% reservecount | html %]</a></li>
64                 <li>
65                     <a href="#holdsover">
66                         Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %]
67                     </a>
68                 </li>
69             </ul>
70             <div id="holdswaiting">
71         [% IF ( reserveloop ) %]
72             [% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop %]
73         [% ELSE %]
74             <div class="dialog message">No holds found.</div>
75         [% END %]
76         </div>
77         <div id="holdsover">
78                 [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>[% END %]
79                [% IF ( overloop ) %]
80                <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
81                    <input type="hidden" name="cancelall" value="1" />
82                    <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
83                    <input type="hidden" name="tab" value="holdsover">
84                    [% IF TransferWhenCancelAllWaitingHolds %]
85                        <input type="submit" value="Cancel and Transfer all" />
86                    [% ELSE %]
87                        <input type="submit" value="Cancel all" />
88                    [% END %]
89                </form>
90                [% UNLESS TransferWhenCancelAllWaitingHolds %]
91                     Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref)
92                [% END %]
93
94                [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop %]
95         [% ELSE %]
96             <div class="dialog message">No holds found.</div>
97                 [% END %]
98         </div>
99         </div>
100     [% END %]
101
102 </div>
103 </div>
104 [% IF Koha.Preference('CircSidebar') %]
105 </div>
106 <div class="yui-b noprint">
107     [% INCLUDE 'circ-nav.inc' %]
108 </div>
109 [% END %]
110 </div>
111
112 [% MACRO jsinclude BLOCK %]
113     [% INCLUDE 'datatables.inc' %]
114     <script type="text/javascript">
115         $(document).ready(function() {
116             $('#resultlist').tabs();
117             $("th a").hide();
118             $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
119                 "aoColumnDefs": [
120                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
121                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
122                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
123                 ],
124                 "sPaginationType": "four_button"
125             }));
126         });
127     </script>
128 [% END %]
129
130 [% INCLUDE 'intranet-bottom.inc' %]