Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / waitingreserves.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
10 </head>
11
12 <body id="circ_waitingreserves" class="circ">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'circ-search.inc' %]
15
16 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
17 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
18 &rsaquo; <a href="/cgi-bin/koha/circ/waitingreserves.pl">Holds awaiting pickup</a>
19 </div>
20
21 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc3" class="yui-t7">[% END %]
22
23    <div id="bd">
24     <div id="yui-main">
25     [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
26     <div class="yui-g">
27
28         <h2>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]
29             [% IF ( all_branches_link ) %]
30             <span style="margin-left:20px"><a href="[% all_branches_link %]">
31             View all libraries</a></span>
32             [% END %]
33         </h2>
34     [% IF ( cancel_result ) %]
35         [% FOREACH cancel_result %]
36             [% IF ( messagetransfert ) %]
37                 <div class="dialog message">
38                     <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) %]</h2>
39                     <p><strong>[% nextreservtitle %]</strong> is on hold for <strong> [% nextreservsurname %], [% nextreservfirstname %]</strong>.
40                     Please retain this item and check it in to process the hold.
41                     </p>
42                     <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab %]" method="post">
43                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
44                     </form>
45                 </div>
46             [% END %]
47             [% IF ( waiting ) %]
48                 <div class="dialog message">
49                     <h2>This item is on hold for pick-up at your library</h2>
50                     <p><strong>[% nextreservtitle %]</strong> is on hold for <strong>[% nextreservsurname %], [% nextreservfirstname %]</strong>.
51                     Please retain this item and check it in to process the hold.
52                     </p>
53                     <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab %]" method="post">
54                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
55                     </form>
56                 </div>
57             [% END %]
58         [% END %]
59     [% ELSE %]
60         <div id="resultlist" class="toptabs">
61             <ul>
62                 <li><a href="#holdswaiting">Holds waiting: [% reservecount %]</a></li>
63                 <li>
64                     <a href="#holdsover">
65                         Holds waiting over [% ReservesMaxPickUpDelay %] days: [% overcount %]
66                     </a>
67                 </li>
68             </ul>
69             <div id="holdswaiting">
70             [% IF ( reserveloop ) %]
71                <table id="holdst">
72                <thead><tr>
73                     <th class="title-string">Waiting since</th>
74                     <th class="title-string">Date hold placed</th>
75                     <th class="anti-the">Title</th>
76                     <th>Patron</th>
77                     <th>Home branch</th>
78                     <th>Current location</th>
79                     <th>Call number</th>
80                     <th>Copy number</th>
81                     <th>Enumeration</th>
82                     <th>Action</th>
83                </tr></thead>
84                <tbody>[% FOREACH reserveloo IN reserveloop %]
85                 <tr>
86                     <td><span title="[% reserveloo.waitingdate %]">[% reserveloo.waitingdate | $KohaDates %]</span></td>
87                     <td><span title="[% reserveloo.reservedate %]">[% reserveloo.reservedate | $KohaDates %]</span></td>
88                     <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = reserveloo.biblionumber %]
89                         [% reserveloo.title |html %] [% FOREACH subtitl IN reserveloo.subtitle %] [% subtitl.subfield %][% END %]
90                         </a>
91                             [% UNLESS ( item_level_itypes ) %][% IF ( reserveloo.itemtype ) %]&nbsp; (<b>[% reserveloo.itemtype %]</b>)[% END %][% END %]
92                             <br />Barcode: [% reserveloo.barcode %]
93                     </td>
94                     <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% reserveloo.patron.borrowernumber %]">[% reserveloo.patron.surname%], [% reserveloo.patron.firstname %]</a>
95                         [% IF ( reserveloo.patron.phone ) %]<br />[% reserveloo.patron.phone %][% END %]
96                         [% IF ( reserveloo.patron.first_valid_email_address ) %]<br /><a href="mailto:[% reserveloo.patron.first_valid_email_address %]?subject=Hold waiting: [% reserveloo.title %]">
97                         [% reserveloo.patron.first_valid_email_address %]</a>[% END %]
98                     </td>
99                     <td>[% Branches.GetName( reserveloo.homebranch ) %]</td>
100                     <td>[% Branches.GetName( reserveloo.holdingbranch ) %]</td>
101                     <td>[% reserveloo.itemcallnumber %]</td>
102                     <td>[% reserveloo.copynumber %]</td>
103                     <td>[% reserveloo.enumchron %]</td>
104                     <td>
105                         <form name="cancelReserve" action="waitingreserves.pl" method="post">
106                             <input type="hidden" name="borrowernumber" value="[% reserveloo.borrowernum %]" />
107                             <input type="hidden" name="itemnumber" value="[% reserveloo.itemnumber %]" />
108                             <input type="hidden" name="fbr" value="[% reserveloo.holdingbranch %]" />
109                             <input type="hidden" name="tbr" value="[% reserveloo.homebranch %]" />
110                             <input type="hidden" name="tab" value="holdswaiting">
111                             [% IF ( reserveloo.dotransfer ) %]
112                             <input type="submit" value="Cancel hold and return to : [% Branches.GetName( reserveloo.homebranch ) %]" />
113                             [% ELSE %]
114                             <input type="submit" value="Cancel hold" />
115                             [% END %]
116                        </form>
117                     </td>
118                 </tr>
119                 [% END %]</tbody>
120         </table>
121         [% ELSE %]
122             <div class="dialog message">No holds found.</div>
123         [% END %]
124         </div>
125         <div id="holdsover">
126                 [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay %] days.</p>[% END %]
127                [% IF ( overloop ) %]
128                <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
129                    <input type="hidden" name="cancelall" value="1" />
130                    <input type="hidden" name="allbranches" value="[% allbranches %]" />
131                    <input type="hidden" name="tab" value="holdsover">
132                    [% IF TransferWhenCancelAllWaitingHolds %]
133                        <input type="submit" value="Cancel and Transfer all" />
134                    [% ELSE %]
135                        <input type="submit" value="Cancel all" />
136                    [% END %]
137                </form>
138                [% UNLESS TransferWhenCancelAllWaitingHolds %]
139                     Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds sypref)
140                [% END %]
141
142                <table id="holdso">
143                <thead><tr>
144                     <th class="title-string">Waiting since</th>
145                     <th class="title-string">Date hold placed</th>
146                     <th class="anti-the">Title</th>
147                     <th>Patron</th>
148                     <th>Home branch</th>
149                     <th>Current location</th>
150                     <th>Call number</th>
151                     <th>Copy number</th>
152                     <th>Enumeration</th>
153                     <th>Action</th>
154                </tr></thead>
155                <tbody>[% FOREACH overloo IN overloop %]
156                     <tr>
157                         <td><span title="[% overloo.waitingdate %]">[% overloo.waitingdate | $KohaDates %]</span></td>
158                         <td><span title="[% overloo.reservedate %]">[% overloo.reservedate | $KohaDates %]</span></td>
159                         <td>[% INCLUDE 'biblio-default-view.inc' biblionumber = overloo.biblionumber %][% overloo.title |html %]
160                             [% FOREACH subtitl IN overloo.subtitle %] [% subtitl.subfield %][% END %]
161                         </a>
162                             [% UNLESS ( item_level_itypes ) %][% IF ( overloo.itemtype ) %]&nbsp; (<b>[% overloo.itemtype %]</b>)[% END %][% END %]
163                         <br />Barcode: [% overloo.barcode %]
164                     </td>
165                     <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% overloo.patron.borrowernumber %]">[% overloo.patron.surname %], [% overloo.patron.firstname %]</a><br />[% overloo.patron.phone %]<br />
166                         [% IF ( overloo.patron.first_valid_email_address ) %]<a href="mailto:[% overloo.patron.first_valid_email_address %]?subject=Reservation: [% overloo.title |url %]">
167         [% overloo.patron.first_valid_email_address %]</a>[% END %]
168                     </td>
169                     <td>[% Branches.GetName( overloo.homebranch ) %]</td>
170                     <td>[% Branches.GetName( overloo.holdingbranch ) %]</td>
171                     <td>[% overloo.itemcallnumber %]</td>
172                     <td>[% overloo.copynumber %]</td>
173                     <td>[% overloo.enumchron %]</td>
174                     <td><form name="cancelReserve" action="waitingreserves.pl" method="post">
175                             <input type="hidden" name="borrowernumber" value="[% overloo.borrowernum %]" />
176                             <input type="hidden" name="itemnumber" value="[% overloo.itemnumber %]" />
177                             <input type="hidden" name="fbr" value="[% overloo.holdingbranch %]" />
178                             <input type="hidden" name="tbr" value="[% overloo.homebranch %]" />
179                             <input type="hidden" name="tab" value="holdsover">
180                             [% IF ( overloo.dotransfer ) %]
181                             <input type="submit" value="Cancel hold and return to : [% Branches.GetName( overloo.homebranch ) %]" />
182                             [% ELSE %]
183                             <input type="submit" value="Cancel hold" />
184                             [% END %]
185                        </form>
186                     </td>
187                 </tr>
188                 [% END %]</tbody>
189         </table>
190         [% ELSE %]
191             <div class="dialog message">No holds found.</div>
192                 [% END %]
193         </div>
194         </div>
195     [% END %]
196
197 </div>
198 </div>
199 [% IF Koha.Preference('CircSidebar') %]
200 </div>
201 <div class="yui-b noprint">
202     [% INCLUDE 'circ-nav.inc' %]
203 </div>
204 [% END %]
205 </div>
206
207 [% MACRO jsinclude BLOCK %]
208     [% INCLUDE 'datatables.inc' %]
209     <script type="text/javascript">
210         $(document).ready(function() {
211             $('#resultlist').tabs();
212             $("th a").hide();
213             $("#holdst,#holdso").dataTable($.extend(true, {}, dataTablesDefaults, {
214                 "aoColumnDefs": [
215                     { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
216                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
217                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
218                 ],
219                 "sPaginationType": "four_button"
220             }));
221         });
222     </script>
223 [% END %]
224
225 [% INCLUDE 'intranet-bottom.inc' %]