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