Bug 12359: Add HidePatronName functionality to the holds queue
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / circ / view_holdsqueue.tt
1 [% USE KohaDates %]
2 [% USE ItemTypes %]
3 [% USE Branches %]
4 [% USE AuthorisedValues %]
5 [% USE ColumnsSettings %]
6 [% USE Koha %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Circulation &rsaquo; Holds queue</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 <style type="text/css"> p { margin-top: 0; }</style>
11 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
12 [% INCLUDE 'datatables.inc' %]
13 [% INCLUDE 'columns_settings.inc' %]
14 <script type="text/javascript">//<![CDATA[
15 $(document).ready(function() {
16     var holdst;
17
18     // Setup filters before DataTables initialisation, in case some columns are
19     // hidden by default
20     var filterColumnTimeoutId;
21     var filterColumn = function(e) {
22         clearTimeout(filterColumnTimeoutId);
23         filterColumnTimeoutId = setTimeout(function() {
24             var input = $(e.target);
25             var idx = input.parents('td').index();
26             holdst.api().column(idx + ':visible').search(input.val()).draw();
27         }, 200);
28     };
29     $('#holdst thead input').on('change keyup keydown', filterColumn);
30
31     var columns_settings = [% ColumnsSettings.GetColumns('circ', 'view_holdsqueue', 'holds-table', 'json') %];
32     var holdst = KohaTable("#holdst", {
33         "aaSorting": [[ 3, "asc" ]],
34         "aoColumns": [
35             { "sType": "anti-the" },null,null,null,null,null,null,null,null,{ "sType": "title-string" },null
36         ],
37         "sDom": 'B<"clearfix">t',
38         "bSortCellsTop": true,
39         "bPaginate": false
40     }, columns_settings);
41
42 });
43 //]]>
44 </script>
45 </head>
46 <body id="circ_view_holdsqueue" class="circ">
47 [% INCLUDE 'header.inc' %]
48 [% INCLUDE 'cat-search.inc' %]
49
50 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a>
51 &rsaquo; <a href="/cgi-bin/koha/circ/circulation-home.pl">Circulation</a>
52 &rsaquo; <a href="/cgi-bin/koha/circ/view_holdsqueue.pl">Holds queue</a>
53 [% IF ( run_report ) %] &rsaquo; Results[% END %]
54 </div>
55
56 <div id="doc2" class="yui-t7">
57
58    <div id="bd">
59         <div id="yui-main">
60         <div class="yui-g">
61
62 <h1>Holds queue</h1>
63
64 [% IF ( run_report ) %]
65     [% IF ( total ) %]
66         <div class="results">[% total %] items found for
67             [% IF ( branchlimit ) %][% Branches.GetName( branchlimit ) %][% 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">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><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% itemsloo.biblionumber %]"><strong>[% itemsloo.title | html %]</strong> [% FOREACH s IN itemsloo.subtitle %] [% s %][% END %]</a></p>
150                 <p>
151                     <div class="hq-biblionumber content_hidden">[% itemsloo.biblionumber %]</div>
152                     <div class="hq-author">[% itemsloo.author %]</div>
153                     <div class="hq-pubdata">
154                         [% IF ( itemsloo.publishercode ) %][% itemsloo.publishercode %][% END %]
155
156                         [% IF ( itemsloo.publicationyear ) %]
157                             , [% itemsloo.publicationyear %]
158                         [% ELSIF ( itemsloo.copyrightdate ) %]
159                             , [% itemsloo.copyrightdate %]
160                         [% END %]
161
162                         [% IF ( itemsloo.pages ) %]: [% itemsloo.pages %] [% END %]
163
164                         [% IF ( itemsloo.item('size') ) %][% itemsloo.item('size') %][% END %]
165
166                         [% IF ( itemsloo.isbn ) %]ISBN: [% itemsloo.isbn %][% END %]
167                     </div>
168                 </p>
169             </td>
170             <td class="hq-collection">[% AuthorisedValues.GetByCode( 'CCODE', itemsloo.ccode ) %]</td>
171             <td class="hq-itemtype">[% ItemTypes.GetDescription( itemsloo.itype ) %]</td>
172             <td class="hq-callnumber">[% IF ( itemsloo.location ) %]<em>[% AuthorisedValues.GetByCode( 'LOC', itemsloo.location ) %]</em> [% END %][% itemsloo.itemcallnumber %]</td>
173             <td class="hq-copynumber">[% itemsloo.copynumber %]</td>
174             <td class="hq-enumchron">[% itemsloo.enumchron %]</td>
175             <td class="hq-barcode">
176                 [% IF ( itemsloo.item_level_request ) %]
177                     <em>Only item:</em> <strong>[% itemsloo.barcode %]</strong>
178                 [% ELSE %]
179                     <strong>[% itemsloo.barcode %]</strong> <em>or any available</em>
180                 [% END %]
181             </td>
182             <td class="hq-patron">
183               [% IF Koha.Preference('HidePatronName') %]
184                 <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.cardnumber %]</a></p>
185               [% ELSE %]
186                 <p><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% itemsloo.borrowernumber %]#reserves">[% itemsloo.surname %], [% itemsloo.firstname %] ([% itemsloo.cardnumber %])</a></p>
187                 <p>[% itemsloo.phone %]</p>
188               [% END %]
189             </td>
190             <td class="hq-sendto">[% Branches.GetName( itemsloo.pickbranch ) %]</td>
191             <td class="hq-date"><span title="[% itemsloo.reservedate %]">[% itemsloo.reservedate | $KohaDates %]</span></td>
192             <td class="hq-notes">[% itemsloo.notes %]</td>
193         </tr>
194     [% END %]</tbody>
195     </table>
196         [% END %] 
197         [% END %]
198
199 [% UNLESS ( total ) %]
200 <form name="f" action="/cgi-bin/koha/circ/view_holdsqueue.pl" method="post">
201         <fieldset class="rows">
202         <ol>
203         <li>
204             <label for="branchlimit">Library: </label>
205             <select name="branchlimit" id="branchlimit">
206                 <option value="">All</option>
207                 [% PROCESS options_for_libraries libraries => Branches.all() %]
208             </select>
209         </li>
210                         <!-- FIXME Not working yet
211                         <li><label for="itemtypeslimit">Item Type: </label><select name="itemtypeslimit" id="itemtypeslimit">
212                 <option value="">All</option>
213                 [% FOREACH itemtypeloo IN itemtypeloop %]
214                 [% IF ( itemtypeloo.selected ) %]<option value="[% itemtypeloo.value %]" selected="selected">[% itemtypeloo.description %]</option>
215                                 [% ELSE %]
216                                 <option value="[% itemtypeloo.value %]">[% itemtypeloo.description %]</option>
217                                 [% END %]
218                 [% END %]
219             </select></li>
220                         -->
221     </ol></fieldset>
222     <fieldset class="action">    <input type="submit" value="Submit" />
223         <input type="hidden" name="run_report" value="1" /></fieldset>
224 </form>
225 [% END %]
226
227 </div>
228 </div>
229 </div>
230 [% INCLUDE 'intranet-bottom.inc' %]