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