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