Bug 34478: Add method="get" to forms without method
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / view_holdsqueue.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE ItemTypes %]
6 [% USE Branches %]
7 [% USE AuthorisedValues %]
8 [% USE TablesSettings %]
9 [% USE Koha %]
10 [% PROCESS 'i18n.inc' %]
11 [% SET footerjs = 1 %]
12 [% INCLUDE 'doc-head-open.inc' %]
13 <title>[% FILTER collapse %]
14     [% t("Holds queue") | html %] &rsaquo;
15     [% t("Circulation") | html %] &rsaquo;
16     [% t("Koha") | html %]
17 [% END %]</title>
18 [% INCLUDE 'doc-head-close.inc' %]
19 <style> p { margin-top: 0; }</style>
20 </head>
21
22 <body id="circ_view_holdsqueue" class="circ">
23 [% WRAPPER 'header.inc' %]
24     [% INCLUDE 'circ-search.inc' %]
25 [% END %]
26
27 [% WRAPPER 'sub-header.inc' %]
28     [% WRAPPER breadcrumbs %]
29         [% WRAPPER breadcrumb_item %]
30             <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
31         [% END %]
32         [% IF ( run_report ) %]
33             [% WRAPPER breadcrumb_item %]
34                 <a href="/cgi-bin/koha/circ/view_holdsqueue.pl">Holds queue</a>
35             [% END %]
36             [% WRAPPER breadcrumb_item bc_active= 1 %]
37                 <span>Results</span>
38             [% END %]
39
40         [% ELSE %]
41             [% WRAPPER breadcrumb_item bc_active= 1 %]
42                 <span>Holds queue</span>
43             [% END %]
44         [% END %]
45     [% END #/ WRAPPER breadcrumbs %]
46 [% END #/ WRAPPER sub-header.inc %]
47
48 <div class="main container-fluid">
49     <div class="row">
50         <div class="col-sm-12">
51             <main>
52                 <div class="row">
53
54                 [% IF ( total || Koha.Preference('CircSidebar') ) %]
55                     <div class="col-sm-10 col-sm-push-2">
56                 [% ELSE %]
57                     <div class="col-md-10 col-md-offset-1 col-lg-8 col-lg-offset-2">
58                 [% END %]
59                 [% INCLUDE 'messages.inc' %]
60
61 <h1>Holds queue</h1>
62
63 [% IF ( run_report ) %]
64     [% IF ( total ) %]
65         <div class="results">[% total | html %] <span>items found for</span>
66             [% IF ( branchlimit ) %][% Branches.GetName( branchlimit ) | html %][% ELSE %]<span>All libraries</span>[% END %]
67             [% IF ( itemtypeslimit ) %] <span>and item type: [% ItemTypes.GetDescription( itemtypeslimit ) | html %]</span>[% END %]
68             [% IF ( ccodeslimit ) %] <span>and collection: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode' authorised_value = ccodeslimit ) | html %]</span>[% END %]
69             [% IF ( locationslimit ) %] <span>and shelving location: [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location' authorised_value = locationslimit ) | html %]</span>[% END %]
70         </div>
71     [% ELSE %]
72         <div class="dialog message">No items found.</div>
73     [% END %]
74     [% IF ( itemsloop ) %]
75         <div class="page-section">
76             <table id="holdst">
77                 <thead>
78                 <tr>
79                     <th class="hq-title anti-the">Title</th>
80                     <th class="hq-holdingbranch">Current library</th>
81                     <th class="hq-collection">Collection</th>
82                     <th class="hq-itemtype">Item type</th>
83                     <th class="hq-callnumber">Call number</th>
84                     <th class="hq-copynumber">Copy number</th>
85                     <th class="hq-enumchron">Enumeration</th>
86                     <th class="hq-barcode">Barcode</th>
87                     <th class="hq-patron">Patron</th>
88                     <th class="hq-patroncategory">Patron category</th>
89                     <th class="hq-sendto">Send to</th>
90                     <th class="hq-date">Date</th>
91                     <th class="hq-notes">Notes</th>
92                 </tr>
93                 <tr>
94                     <td class="hq-title">
95                         <span class="filter_column filter_text">
96                             <input class="text_filter" type="text" placeholder="Title">
97                         </span>
98                     </td>
99                     <td class="hq-holdingbranch">
100                         <span class="filter_column filter_text">
101                             <input class="text_filter" type="text" placeholder="Current library">
102                         </span>
103                     </td>
104                     <td class="hq-collection">
105                         <span class="filter_column filter_text">
106                             <input type="text" placeholder="Collection">
107                         </span>
108                     </td>
109                     <td class="hq-itemtype">
110                         <span class="filter_column filter_text">
111                             <input type="text" placeholder="Item type">
112                         </span>
113                     </td>
114                     <td class="hq-callnumber">
115                         <span class="filter_column filter_text">
116                             <input type="text" placeholder="Call number">
117                         </span>
118                     </td>
119                     <td class="hq-copynumber">
120                         <span class="filter_column filter_text">
121                             <input type="text" placeholder="Copy number">
122                         </span>
123                     </td>
124                     <td class="hq-enumchron">
125                         <span class="filter_column filter_text">
126                             <input type="text" placeholder="Enumeration">
127                         </span>
128                     </td>
129                     <td class="hq-barcode">
130                         <span class="filter_column filter_text">
131                             <input type="text" placeholder="Barcode">
132                         </span>
133                     </td>
134                     <td class="hq-patron">
135                         <span class="filter_column filter_text">
136                             <input type="text" placeholder="Patron">
137                         </span>
138                     </td>
139                     <td class="hq-patroncategory">
140                         <span class="filter_column filter_text">
141                             <input type="text" placeholder="Patron category">
142                         </span>
143                     </td>
144                     <td class="hq-sendto">
145                         <span class="filter_column filter_text">
146                             <input type="text" placeholder="Send to">
147                         </span>
148                     </td>
149                     <td class="hq-date">
150                         <span class="filter_column filter_text">
151                             <input type="text" placeholder="Date">
152                         </span>
153                     </td>
154                     <td class="hq-notes">
155                         <span class="filter_column filter_text">
156                             <input type="text" placeholder="Notes">
157                         </span>
158                     </td>
159                 </tr>
160                 </thead>
161                 <tbody>[% FOREACH itemsloo IN itemsloop %]
162                     <tr>
163                         <td class="hq-title">
164                             <p>
165                                 [% INCLUDE 'biblio-title.inc' biblio=itemsloo.biblio link = 1 %]
166                             </p>
167                             <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber | html %]</div>
168                             <div class="hq-author">[% itemsloo.biblio.author | html %]</div>
169                             [% IF ( itemsloo.biblio.biblioitem.editionstatement ) %]<div class="hq-editionstatement">[% itemsloo.biblio.biblioitem.editionstatement | html %]</div>[% END %]
170                             <div class="hq-pubdata">
171                                 [% IF ( itemsloo.biblio.biblioitem.publishercode ) %][% itemsloo.biblio.biblioitem.publishercode | html %][% END %]
172
173                                 [% IF ( itemsloo.biblio.biblioitem.publicationyear ) %]
174                                     , [% itemsloo.biblio.biblioitem.publicationyear | html %]
175                                 [% ELSIF ( itemsloo.biblio.copyrightdate ) %]
176                                     , [% itemsloo.biblio.copyrightdate | html %]
177                                 [% END %]
178
179                                 [% IF ( itemsloo.biblio.biblioitem.pages ) %]: [% itemsloo.biblio.biblioitem.pages | html %] [% END %]
180
181                                 [% IF ( itemsloo.biblio.biblioitem.size ) %][% itemsloo.biblio.biblioitem.size | html %][% END %]
182
183                                 [% IF ( itemsloo.biblio.biblioitem.isbn ) %]<span>ISBN: [% itemsloo.biblio.biblioitem.isbn | html %]</span>[% END %]
184                             </div>
185                         </td>
186                         <td class="hq-holdingbranch">[% Branches.GetName( itemsloo.holdingbranch ) | html %]</td>
187                         <td class="hq-collection">[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.ccode', authorised_value => itemsloo.item.ccode ) | html %]</td>
188                         <td class="hq-itemtype">[% ItemTypes.GetDescription( itemsloo.item.effective_itemtype ) | html %]</td>
189                         <td class="hq-callnumber">[% IF ( itemsloo.item.location ) %]<em>[% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => itemsloo.item.location ) | html %]</em> [% END %][% itemsloo.item.itemcallnumber | html %]</td>
190                         <td class="hq-copynumber">[% itemsloo.item.copynumber | html %]</td>
191                         <td class="hq-enumchron">[% itemsloo.item.enumchron | html %]</td>
192                         <td class="hq-barcode">
193                             [% IF ( itemsloo.item_level_request ) %]
194                                 <em>Only item:</em> <strong><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% itemsloo.itemnumber | uri %]&biblionumber=[% itemsloo.biblionumber | uri %]#item[% itemsloo.itemnumber | uri %]">[% itemsloo.barcode | html %]</a></strong>
195                             [% ELSIF itemsloo.item.item_group %]
196                                 <strong><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% itemsloo.itemnumber | uri %]&biblionumber=[% itemsloo.biblionumber | uri %]#item[% itemsloo.itemnumber | uri %]">[% itemsloo.barcode | html %]</a></strong> <em>or any item from item group <strong>[% itemsloo.item.item_group.description | html %]</strong></em>
197                             [% ELSE %]
198                                 <strong><a href="/cgi-bin/koha/catalogue/moredetail.pl?itemnumber=[% itemsloo.itemnumber | uri %]&biblionumber=[% itemsloo.biblionumber | uri %]#item[% itemsloo.itemnumber | uri %]">[% itemsloo.barcode | uri %]</a></strong> <em>or any available</em>
199                             [% END %]
200                         </td>
201                         <td class="hq-patron">
202                           <p>
203                               [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
204                           </p>
205                           [% UNLESS Koha.Preference('HidePatronName') %]
206                              <p>[% itemsloo.patron.phone | html %]</p>
207                           [% END %]
208                         </td>
209                         <td class="hq-patroncategory">[% itemsloo.patron.category.description | html %] ([% itemsloo.patron.categorycode | html %])</td>
210                         <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td>
211                         <td class="hq-date" data-order="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</td>
212                         <td class="hq-notes">[% itemsloo.notes | html %]</td>
213                     </tr>
214                 [% END %]
215                 </tbody>
216             </table>
217         </div> <!-- /.page-section -->
218         [% END %]
219         [% END %]
220
221                         [% UNLESS ( total ) %]
222                             [% branchlimit = Branches.GetLoggedInBranchcode %]
223                             [% PROCESS filter_form %]
224                         [% END %]
225
226                     </div> <!-- /.col-sm-10.col-sm-push-2 -->
227                     [% IF ( total || Koha.Preference('CircSidebar') ) %]
228                         <div class="col-sm-2 col-sm-pull-10">
229                             <aside>
230                                 [% IF ( total ) %]
231                                     [% PROCESS filter_form %]
232                                 [% END %]
233                                 [% IF Koha.Preference('CircSidebar') %]
234                                     [% INCLUDE 'circ-nav.inc' %]
235                                 [% END %]
236                             </aside>
237                         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
238                     [% END %]
239                 </div> <!-- /.row -->
240
241             </main>
242         </div> <!-- /.col-sm-12 -->
243     </div> <!-- /.row -->
244
245 [% BLOCK filter_form %]
246     <form method="get" name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl">
247         [% IF ( total ) %]
248             <fieldset class="brief">
249         [% ELSE -%]
250             <fieldset class="rows">
251         [% END %]
252             <ol>
253                 <li>
254                     <label for="branchlimit">Library: </label>
255                     <select name="branchlimit" id="branchlimit">
256                         [% IF CAN_user_superlibrarian || !Koha.Preference('IndependentBranches') %]
257                             <option value="">All</option>
258                         [% END %]
259                         [% PROCESS options_for_libraries libraries => Branches.all( selected => branchlimit, only_from_group => 1 ) %]
260                     </select>
261                 </li>
262                 <li>
263                     <label for="itemtypeslimit">Item type: </label>
264                     <select name="itemtypeslimit" id="itemtypeslimit">
265                         <option value="">All</option>
266                         [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => itemtypeslimit %]
267                     </select>
268                 </li>
269                 <li>
270                     <label for="ccodeslimit">Collection: </label>
271                     <select name="ccodeslimit" id="ccodeslimit">
272                         <option value="">All</option>
273                         [% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %]
274                     </select>
275                 </li>
276                 <li>
277                     <label for="locationslimit">Shelving location: </label>
278                     <select name="locationslimit" id="locationslimit">
279                         <option value="">All</option>
280                         [% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %]
281                     </select>
282                 </li>
283             </ol>
284             <fieldset class="action">
285                 <input type="submit" class="btn btn-primary" value="Submit" />
286                 <input type="hidden" name="run_report" value="1" />
287             </fieldset>
288         </fieldset>
289     </form>
290 [% END %]
291
292 [% MACRO jsinclude BLOCK %]
293     [% INCLUDE 'datatables.inc' %]
294     [% INCLUDE 'columns_settings.inc' %]
295     <script>
296         $(document).ready(function() {
297             var holdst;
298
299             // Setup filters before DataTables initialisation, in case some columns are
300             // hidden by default
301             var filterColumnTimeoutId;
302             var filterColumn = function(e) {
303                 clearTimeout(filterColumnTimeoutId);
304                 filterColumnTimeoutId = setTimeout(function() {
305                     var input = $(e.target);
306                     var idx = input.parents('td').index();
307                     holdst.api().column(idx + ':visible').search(input.val()).draw();
308                 }, 200);
309             };
310             $('#holdst thead input').on('change keyup keydown', filterColumn);
311
312             var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
313             var holdst = KohaTable("holdst", {
314                 "dom": 'B<"clearfix">t',
315                 "orderCellsTop":  true,
316                 "paginate": false
317             }, table_settings);
318
319         });
320     </script>
321 [% END %]
322
323 [% INCLUDE 'intranet-bottom.inc' %]