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