Bug 19623: (follow-up) Correct footer include in pop-up windows
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / view_holdsqueue.tt
1 [% USE Koha %]
2 [% USE KohaDates %]
3 [% USE ItemTypes %]
4 [% USE Branches %]
5 [% USE AuthorisedValues %]
6 [% USE ColumnsSettings %]
7 [% USE Koha %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style type="text/css"> p { margin-top: 0; }</style>
13 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
14 </head>
15
16 <body id="circ_view_holdsqueue" class="circ">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
19
20 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
21 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
22 &rsaquo; <a href="/cgi-bin/koha/circ/view_holdsqueue.pl">Holds queue</a>
23 [% IF ( run_report ) %] &rsaquo; Results[% END %]
24 </div>
25
26 [% IF Koha.Preference('CircSidebar') %]<div id="doc3" class="yui-t2">[% ELSE %]<div id="doc2" class="yui-t7">[% END %]
27
28    <div id="bd">
29         <div id="yui-main">
30         [% IF Koha.Preference('CircSidebar') %]<div class="yui-b">[% END %]
31         <div class="yui-g">
32
33 <h1>Holds queue</h1>
34
35 [% IF ( run_report ) %]
36     [% IF ( total ) %]
37         <div class="results">[% total %] items found for
38             [% IF ( branchlimit ) %][% Branches.GetName( branchlimit ) %][% ELSE %]All libraries[% END %]
39         </div>
40     [% ELSE %]
41         <div class="dialog message">No items found.</div>
42     [% END %]
43     [% IF ( itemsloop ) %]
44 <table id="holdst">
45         <thead>
46     <tr>
47         <th class="hq-title">Title</th>
48         <th class="hq-collection">Collection</th>
49         <th class="hq-itemtype">Item type</th>
50         <th class="hq-callnumber">Call number</th>
51         <th class="hq-copynumber">Copy number</th>
52         <th class="hq-enumchron">Enumeration</th>
53         <th class="hq-barcode">Barcode</th>
54         <th class="hq-patron">Patron</th>
55         <th class="hq-sendto">Send to</th>
56         <th class="hq-date">Date</th>
57         <th class="hq-notes">Notes</th>
58     </tr>
59     <tr>
60         <td class="hq-title">
61             <span class="filter_column filter_text">
62                 <input class="text_filter" type="text" placeholder="Title">
63             </span>
64         </td>
65         <td class="hq-collection">
66             <span class="filter_column filter_text">
67                 <input type="text" placeholder="Collection">
68             </span>
69         </td>
70         <td class="hq-itemtype">
71             <span class="filter_column filter_text">
72                 <input type="text" placeholder="Item type">
73             </span>
74         </td>
75         <td class="hq-callnumber">
76             <span class="filter_column filter_text">
77                 <input type="text" placeholder="Call number">
78             </span>
79         </td>
80         <td class="hq-copynumber">
81             <span class="filter_column filter_text">
82                 <input type="text" placeholder="Copy number">
83             </span>
84         </td>
85         <td class="hq-enumchron">
86             <span class="filter_column filter_text">
87                 <input type="text" placeholder="Enumeration">
88             </span>
89         </td>
90         <td class="hq-barcode">
91             <span class="filter_column filter_text">
92                 <input type="text" placeholder="Barcode">
93             </span>
94         </td>
95         <td class="hq-patron">
96             <span class="filter_column filter_text">
97                 <input type="text" placeholder="Patron">
98             </span>
99         </td>
100         <td class="hq-sendto">
101             <span class="filter_column filter_text">
102                 <input type="text" placeholder="Send to">
103             </span>
104         </td>
105         <td class="hq-date">
106             <span class="filter_column filter_text">
107                 <input type="text" placeholder="Date">
108             </span>
109         </td>
110         <td class="hq-notes">
111             <span class="filter_column filter_text">
112                 <input type="text" placeholder="Notes">
113             </span>
114         </td>
115     </tr>
116         </thead>
117      <tbody>[% FOREACH itemsloo IN itemsloop %]
118         <tr>
119             <td class="hq-title">
120                 <p><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]"><strong>[% itemsloo.title | html %]</strong> [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]</a></p>
121                 <p>
122                     <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber %]</div>
123                     <div class="hq-author">[% itemsloo.author %]</div>
124                     <div class="hq-pubdata">
125                         [% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %]
126
127                         [% IF ( itemsloo.publicationyear ) %]
128                             , [% itemsloo.publicationyear %]
129                         [% ELSIF ( itemsloo.copyrightdate ) %]
130                             , [% itemsloo.copyrightdate %]
131                         [% END %]
132
133                         [% IF ( itemsloo.pages ) %]: [% itemsloo.pages %] [% END %]
134
135                         [% IF ( itemsloo.item('size') ) %][% itemsloo.item('size') %][% END %]
136
137                         [% IF ( itemsloo.isbn ) %]ISBN: [% itemsloo.isbn %][% END %]
138                     </div>
139                 </p>
140             </td>
141             <td class="hq-collection">[% AuthorisedValues.GetByCode( 'CCODE', itemsloo.ccode ) %]</td>
142             <td class="hq-itemtype">[% ItemTypes.GetDescription( itemsloo.itype ) %]</td>
143             <td class="hq-callnumber">[% IF ( itemsloo.location ) %]<em>[% AuthorisedValues.GetByCode( 'LOC', itemsloo.location ) %]</em> [% END %][% itemsloo.itemcallnumber %]</td>
144             <td class="hq-copynumber">[% itemsloo.copynumber %]</td>
145             <td class="hq-enumchron">[% itemsloo.enumchron %]</td>
146             <td class="hq-barcode">
147                 [% IF ( itemsloo.item_level_request ) %]
148                     <em>Only item:</em> <strong>[% itemsloo.barcode %]</strong>
149                 [% ELSE %]
150                     <strong>[% itemsloo.barcode %]</strong> <em>or any available</em>
151                 [% END %]
152             </td>
153             <td class="hq-patron">
154               [% IF Koha.Preference('HidePatronName') %]
155                 <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.cardnumber %]</a></p>
156               [% ELSE %]
157                 <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p>
158                 <p>[% itemsloo.phone %]</p>
159               [% END %]
160             </td>
161             <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) %]</td>
162             <td class="hq-date"><span title="[% itemsloo.reservedate %]">[% itemsloo.reservedate | $KohaDates %]</span></td>
163             <td class="hq-notes">[% itemsloo.notes %]</td>
164         </tr>
165     [% END %]</tbody>
166     </table>
167         [% END %] 
168         [% END %]
169
170 [% UNLESS ( total ) %]
171 <form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl" method="post">
172         <fieldset class="rows">
173         <ol>
174         <li>
175             <label for="branchlimit">Library: </label>
176             <select name="branchlimit" id="branchlimit">
177                 <option value="">All</option>
178                 [% PROCESS options_for_libraries libraries => Branches.all() %]
179             </select>
180         </li>
181     </ol></fieldset>
182     <fieldset class="action">    <input type="submit" value="Submit" />
183         <input type="hidden" name="run_report" value="1" /></fieldset>
184 </form>
185 [% END %]
186
187 </div>
188 </div>
189 [% IF Koha.Preference('CircSidebar') %]
190 </div>
191 <div class="yui-b noprint">
192     [% INCLUDE 'circ-nav.inc' %]
193 </div>
194 [% END %]
195 </div>
196
197 [% MACRO jsinclude BLOCK %]
198     [% INCLUDE 'datatables.inc' %]
199     [% INCLUDE 'columns_settings.inc' %]
200     <script type="text/javascript">
201         $(document).ready(function() {
202             var holdst;
203
204             // Setup filters before DataTables initialisation, in case some columns are
205             // hidden by default
206             var filterColumnTimeoutId;
207             var filterColumn = function(e) {
208                 clearTimeout(filterColumnTimeoutId);
209                 filterColumnTimeoutId = setTimeout(function() {
210                     var input = $(e.target);
211                     var idx = input.parents('td').index();
212                     holdst.api().column(idx + ':visible').search(input.val()).draw();
213                 }, 200);
214             };
215             $('#holdst thead input').on('change keyup keydown', filterColumn);
216
217             var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %];
218             var holdst = KohaTable("#holdst", {
219                 "aaSorting": [[ 3, "asc" ]],
220                 "aoColumns": [
221                     { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null
222                 ],
223                 "sDom": 'B<"clearfix">t',
224                 "bSortCellsTop": true,
225                 "bPaginate": false
226             }, columns_settings);
227
228         });
229     </script>
230 [% END %]
231
232 [% INCLUDE 'intranet-bottom.inc' %]