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