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