Bug 31848: Correct margin and padding on action fieldset in aside
[koha-ffzg.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                             [% ELSE %]
202                                 <strong>[% itemsloo.barcode | html %]</strong> <em>or any available</em>
203                             [% END %]
204                         </td>
205                         <td class="hq-patron">
206                           <p>
207                               [% INCLUDE 'patron-title.inc' invert_name=1 patron=itemsloo.patron hide_patron_infos_if_needed=1 link_to="circulation_reserves" %]
208                           </p>
209                           [% UNLESS Koha.Preference('HidePatronName') %]
210                              <p>[% itemsloo.patron.phone | html %]</p>
211                           [% END %]
212                         </td>
213                         <td class="hq-patroncategory">[% itemsloo.patron.category.description | html %] ([% itemsloo.patron.categorycode | html %])</td>
214                         <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) | html %]</td>
215                         <td class="hq-date" data-order="[% itemsloo.reservedate | html %]">[% itemsloo.reservedate | $KohaDates %]</td>
216                         <td class="hq-notes">[% itemsloo.notes | html %]</td>
217                     </tr>
218                 [% END %]
219                 </tbody>
220             </table>
221         </div> <!-- /.page-section -->
222         [% END %] 
223         [% END %]
224
225                         [% UNLESS ( total ) %]
226                             [% branchlimit = Branches.GetLoggedInBranchcode %]
227                             [% PROCESS filter_form %]
228                         [% END %]
229
230                     </div> <!-- /.col-sm-10.col-sm-push-2 -->
231                     [% IF ( total || Koha.Preference('CircSidebar') ) %]
232                         <div class="col-sm-2 col-sm-pull-10">
233                             <aside>
234                                 [% IF ( total ) %]
235                                     [% PROCESS filter_form %]
236                                 [% END %]
237                                 [% IF Koha.Preference('CircSidebar') %]
238                                     [% INCLUDE 'circ-nav.inc' %]
239                                 [% END %]
240                             </aside>
241                         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
242                     [% END %]
243                 </div> <!-- /.row -->
244
245             </main>
246         </div> <!-- /.col-sm-12 -->
247     </div> <!-- /.row -->
248
249 [% BLOCK filter_form %]
250     <form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl">
251         [% IF ( total ) %]
252             <fieldset class="brief">
253         [% ELSE -%]
254             <fieldset class="rows">
255         [% END %]
256             <ol>
257                 <li>
258                     <label for="branchlimit">Library: </label>
259                     <select name="branchlimit" id="branchlimit">
260                         <option value="">All</option>
261                         [% PROCESS options_for_libraries libraries => Branches.all( selected => branchlimit, only_from_group => 1 ) %]
262                     </select>
263                 </li>
264                 <li>
265                     <label for="itemtypeslimit">Item type: </label>
266                     <select name="itemtypeslimit" id="itemtypeslimit">
267                         <option value="">All</option>
268                         [% PROCESS options_for_item_types itemtypes => ItemTypes.Get(), selected_itemtype => itemtypeslimit %]
269                     </select>
270                 </li>
271                 <li>
272                     <label for="ccodeslimit">Collection: </label>
273                     <select name="ccodeslimit" id="ccodeslimit">
274                         <option value="">All</option>
275                         [% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'CCODE' ), selected_av => ccodeslimit %]
276                     </select>
277                 </li>
278                 <li>
279                     <label for="locationsslimit">Shelving location: </label>
280                     <select name="locationslimit" id="locationslimit">
281                         <option value="">All</option>
282                         [% PROCESS options_for_authorised_values authorised_values => AuthorisedValues.GetAuthValueDropbox( 'LOC' ), selected_av => locationslimit %]
283                     </select>
284                 </li>
285             </ol>
286             <fieldset class="action">
287                 <input type="submit" value="Submit" />
288                 <input type="hidden" name="run_report" value="1" />
289             </fieldset>
290         </fieldset>
291     </form>
292 [% END %]
293
294 [% MACRO jsinclude BLOCK %]
295     [% INCLUDE 'datatables.inc' %]
296     [% INCLUDE 'columns_settings.inc' %]
297     <script>
298         $(document).ready(function() {
299             var holdst;
300
301             // Setup filters before DataTables initialisation, in case some columns are
302             // hidden by default
303             var filterColumnTimeoutId;
304             var filterColumn = function(e) {
305                 clearTimeout(filterColumnTimeoutId);
306                 filterColumnTimeoutId = setTimeout(function() {
307                     var input = $(e.target);
308                     var idx = input.parents('td').index();
309                     holdst.api().column(idx + ':visible').search(input.val()).draw();
310                 }, 200);
311             };
312             $('#holdst thead input').on('change keyup keydown', filterColumn);
313
314             var table_settings = [% TablesSettings.GetTableSettings('circ', 'view_holdsqueue', 'holds-table', 'json') | $raw %];
315             var holdst = KohaTable("holdst", {
316                 "sDom": 'B<"clearfix">t',
317                 "bSortCellsTop": true,
318                 "bPaginate": false
319             }, table_settings);
320
321         });
322     </script>
323 [% END %]
324
325 [% INCLUDE 'intranet-bottom.inc' %]