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