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