Bug 26265: (QA follow-up) Remove g option from regex, add few dirs
[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 [% USE TablesSettings %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha &rsaquo; Circulation &rsaquo; Holds awaiting pickup</title>
10 [% INCLUDE 'doc-head-close.inc' %]
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 <div class="main container-fluid">
23     <div class="row">
24         <div class="col-sm-12">
25             <main>
26                 <div class="row">
27
28                 [% IF Koha.Preference('CircSidebar') %]
29                     <div class="col-sm-10 col-sm-push-2">
30                 [% ELSE %]
31                     <div class="col-sm-12">
32                 [% END %]
33
34         <h2>Holds awaiting pickup for your library on: [% show_date | $KohaDates %]
35             [% IF ( all_branches_link ) %]
36             <span style="margin-left:20px"><a href="[% all_branches_link | url %]">
37             View all libraries</a></span>
38             [% END %]
39         </h2>
40     [% IF ( cancel_result ) %]
41         [% FOREACH cancel_result %]
42             [% IF ( messagetransfert ) %]
43                 <div class="dialog message">
44                     <h2>This item is on hold for pick-up at [% Branches.GetName( branchname ) | html %]</h2>
45                     <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong> [% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
46                     Please retain this item and check it in to process the hold.
47                     </p>
48                     <form name="cancelReservewithtransfert" action="waitingreserves.pl#[% tab | html %]" method="post">
49                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
50                     </form>
51                 </div>
52             [% END %]
53             [% IF ( waiting ) %]
54                 <div class="dialog message">
55                     <h2>This item is on hold for pick-up at your library</h2>
56                     <p><strong>[% nextreservtitle | html %]</strong> is on hold for <strong>[% nextreservsurname | html %], [% nextreservfirstname | html %]</strong>.
57                     Please retain this item and check it in to process the hold.
58                     </p>
59                     <form name="cancelReservewithwaiting" action="waitingreserves.pl#[% tab | html %]" method="post">
60                         <button type="submit" class="approve"><i class="fa fa-fw fa-check"></i> OK</button>
61                     </form>
62                 </div>
63             [% END %]
64         [% END %]
65     [% ELSE %]
66         <div id="resultlist" class="toptabs">
67             <ul>
68                 <li><a href="#holdswaiting">Holds waiting: [% reservecount | html %]</a></li>
69                 <li>
70                     <a href="#holdsover">
71                         Holds waiting over [% Koha.Preference('ReservesMaxPickUpDelay') | html %] days: [% overcount | html %]
72                     </a>
73                 </li>
74             </ul>
75             <div id="holdswaiting">
76         [% IF ( reserveloop ) %]
77             [% INCLUDE waiting_holds.inc table_name='holdst' reserveloop=reserveloop tab='holdwaiting' %]
78         [% ELSE %]
79             <div class="dialog message">No holds found.</div>
80         [% END %]
81         </div>
82         <div id="holdsover">
83             [% IF ( ReservesMaxPickUpDelay ) %]<p>Holds listed here have been awaiting pickup for more than [% ReservesMaxPickUpDelay | html %] days.</p>[% END %]
84             [% IF ( overloop ) %]
85                 <span id="holdsover-cancel-all">
86                    <form name="cancelAllReserve" action="waitingreserves.pl" method="post">
87                        <input type="hidden" name="cancelall" value="1" />
88                        <input type="hidden" name="allbranches" value="[% allbranches | html %]" />
89                        <input type="hidden" name="tab" value="holdsover">
90                        [% IF TransferWhenCancelAllWaitingHolds %]
91                            <input type="submit" value="Cancel and Transfer all" />
92                        [% ELSE %]
93                            <input type="submit" value="Cancel all" />
94                        [% END %]
95                    </form>
96                    [% UNLESS TransferWhenCancelAllWaitingHolds %]
97                         Only items that need not be transferred will be cancelled (TransferWhenCancelAllWaitingHolds syspref)
98                    [% END %]
99                 </span>
100                [% INCLUDE waiting_holds.inc table_name='holdso' reserveloop=overloop tab='holdsover' %]
101             [% ELSE %]
102                 <div class="dialog message">No holds found.</div>
103             [% END %]
104         </div>
105         </div>
106     [% END %]
107
108                     [% IF Koha.Preference('CircSidebar') %]
109                             </div> <!-- /.col-sm-10.col-sm-push-2 -->
110                             <div class="col-sm-2 col-sm-pull-10">
111                                 <aside>
112                                     [% INCLUDE 'circ-nav.inc' %]
113                                 </aside>
114                             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
115                         </div> <!-- /.row -->
116                     [% END %]
117
118             </main>
119         </div> <!-- /.col-sm-12 -->
120     </div> <!-- /.row -->
121
122 [% MACRO jsinclude BLOCK %]
123     [% INCLUDE 'datatables.inc' %]
124     [% INCLUDE 'columns_settings.inc' %]
125     <script>
126         var holdst_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdst', 'json' ) | $raw %];
127         var holdso_columns_settings = [% TablesSettings.GetColumns( 'circ', 'holds_awaiting_pickup', 'holdso', 'json' ) | $raw %];
128
129         $(document).ready(function() {
130
131             KohaTable("holdst", {
132                 "sPaginationType": "full"
133             }, holdst_columns_settings);
134
135             KohaTable("holdso", {
136                 "sPaginationType": "full"
137             }, holdso_columns_settings);
138
139             $('#resultlist').tabs();
140
141         });
142     </script>
143 [% END %]
144
145 [% INCLUDE 'intranet-bottom.inc' %]