Bug 8435: add permission to enable editing other library's serials if IndependantBran...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-search.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 [% USE KohaDates %]
3 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11  $(document).ready(function() {
12     [% IF (dateformat == 'metric') %]
13         dt_add_type_uk_date();
14     [% END %]
15     var osrlt = $("#osrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
16
17         "aoColumnDefs": [
18             { "aTargets": [ -1, -2, -3 ], "bSortable": false, "bSearchable": false },
19         ],
20         "sPaginationType": "four_button"
21     } ) );
22
23     var csrlt = $("#csrlt").dataTable($.extend(true, {}, dataTablesDefaults, {
24         "aoColumnDefs": [
25             { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false },
26         ],
27         "sPaginationType": "four_button"
28     } ) );
29
30     osrlt.fnAddFilters("filter", 750);
31     csrlt.fnAddFilters("filter", 750);
32
33     $('#serialstabs').tabs();
34     $("#reopensub").click(function(){
35       return confirm(_("Are you sure you want to reopen this subscription?"));
36     });
37  });
38  //]]>
39 </script>
40 </head>
41 <body id="ser_serials-home" class="ser">
42 [% INCLUDE 'header.inc' %]
43 [% INCLUDE 'serials-search.inc' %]
44
45 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; [% IF ( done_searched ) %]<a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a> &rsaquo; Search results[% ELSE %]Serials [% END %] </div>
46
47 <div id="doc3" class="yui-t2">
48   <div id="bd">
49     <div id="yui-main">
50       <div class="yui-b">
51       [% INCLUDE 'serials-toolbar.inc' %]
52
53       <h2>Serials subscriptions ([% total %] found)</h2>
54       [% UNLESS ( done_searched ) %]
55       <div id="advsearch" style="padding-bottom:3em;">
56         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
57           <fieldset class="rows">
58           <legend>Search subscriptions</legend>
59               <ol>
60                 <li>
61                   <label for="issn">ISSN:</label>
62                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
63                 </li>
64                 <li>
65                   <label for="title">Title:</label>
66                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
67                 </li>
68                 [% IF ( marcflavour == "UNIMARC" ) %]
69                 <li>
70                   <label for="ean">EAN:</label>
71                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
72                 </li>
73                 [% END %]
74                 <li>
75                   <label for="publisher">Publisher:</label>
76                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
77                 </li>
78                 <li>
79                   <label for="bookseller">Vendor:</label>
80                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
81                 </li>
82                 <li>
83                   <label for="branch">Library:</label>
84                   <select id="branch" name="branch_filter">
85                     <option value="">All</option>
86                     [% FOREACH branch IN branches_loop %]
87                       [% IF ( branch.selected ) %]
88                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
89                       [% ELSE %]
90                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
91                       [% END %]
92                     [% END %]
93                   </select>
94                 </li>
95               </ol>
96               <input type="hidden" name="searched" value="1" />
97               <fieldset class="action">
98                 <input type="submit" value="Search" />
99               </fieldset>
100           </fieldset>
101         </form>
102       </div>
103       [% END %]
104       [% IF ( done_searched ) %]
105         [% IF ( total ) %]
106           <div id="serialstabs" class="toptabs" style="clear:both;">
107             <ul class="ui-tabs-nav">
108               <li><a href="#opened">Open ([% openedsubscriptions.size || 0 %])</a></li>
109               <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 %])</a></li>
110             </ul>
111             <div id="opened">
112               [% IF openedsubscriptions %]
113                 <table id="osrlt">
114                   <thead>
115                     <tr>
116                         <th>ISSN</th>
117                         <th>Title</th>
118                         <th> Notes </th>
119                         <th>Library</th>
120                         <th>Call number</th>
121                         <th>Expiration date</th>
122                         [% IF ( routing && CAN_user_serials_routing ) %]
123                           <th>Routing list</th>
124                         [% END %]
125                         <th>&nbsp;</th>
126                         <th>&nbsp;</th>
127                     </tr>
128                   </thead>
129                   <tfoot>
130                     <tr>
131                       <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
132                       <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
133                       <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
134                       <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
135                       <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
136                       <td><input type="text" class="filter" data-column_num="5" placeholder="Search expiration date" /></td>
137                       [% IF ( routing && CAN_user_serials_routing ) %]<td></td>[% END %]
138                       <td></td>
139                       <td></td>
140                     </tr>
141                   </tfoot>
142                   <tbody>
143                     [% FOREACH subscription IN openedsubscriptions %]
144                     [% UNLESS subscription.cannotdisplay %]
145                       <tr>
146                         <td>
147                         [% IF ( subscription.issn ) %][% subscription.issn %]
148                         [% END %]
149                         </td>
150                         <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
151                         </td>
152                         <td>[% IF ( subscription.publicnotes ) %][% subscription.publicnotes %][% END %]
153                         [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
154                         </td>
155                         <td>
156                           [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
157                         </td>
158                         <td>
159                           [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
160                         </td>
161                         <td>
162                           [% IF ( subscription.enddate ) %][% subscription.enddate | $KohaDates %][% END %]
163                         </td>
164                         [% IF ( routing && CAN_user_serials_routing ) %]
165                         <td>
166                           [% IF ( subscription.cannotedit ) %]
167                             &nbsp;
168                           [% ELSE %]
169                             [% IF ( subscription.routingedit ) %]
170                               <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]">Edit</a>
171                               ([% subscription.routingedit %])
172                             [% ELSE %]
173                               <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=new">New</a>
174                             [% END %]
175                           [% END %]
176                         </td>
177                         [% END %]
178                         <td><a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
179                         </td>
180                         <td>
181                         [% IF ( CAN_user_serials_receive_serials ) %]
182                           <a href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid %]&amp;serstatus=1,3,7">Serial receive</a>
183                         [% END %]
184                         </td>
185                       </tr>
186                       [% END %]
187                     [% END %]
188                   </tbody>
189                 </table>
190               [% ELSE %]
191                 <div class="dialog message">
192                   <p>Your search returned no open subscriptions.</p>
193                 </div>
194               [% END %]
195             </div>
196             <div id="closed">
197               [% IF closedsubscriptions %]
198                 <table id="csrlt">
199                   <thead>
200                     <tr>
201                         <th>ISSN</th>
202                         <th>Title</th>
203                         <th> Notes </th>
204                         <th>Library</th>
205                         <th>Call number</th>
206                         <th>&nbsp;</th>
207                         <th>&nbsp;</th>
208                     </tr>
209                   </thead>
210                   <tfoot>
211                     <tr>
212                       <td><input type="text" class="filter" data-column_num="0" placeholder="Search ISSN" /></td>
213                       <td><input type="text" class="filter" data-column_num="1" placeholder="Search title" /></td>
214                       <td><input type="text" class="filter" data-column_num="2" placeholder="Search notes" /></td>
215                       <td><input type="text" class="filter" data-column_num="3" placeholder="Search library" /></td>
216                       <td><input type="text" class="filter" data-column_num="4" placeholder="Search callnumber" /></td>
217                       <td></td>
218                       <td></td>
219                     </tr>
220                   </tfoot>
221                   <tbody>
222                     [% FOREACH subscription IN closedsubscriptions %]
223                     [% UNLESS subscription.cannotdisplay %]
224                       <tr>
225                         <td>
226                           [% IF ( subscription.issn ) %]
227                             [% subscription.issn %]
228                           [% END %]
229                         </td>
230                         <td>
231                           <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid %]" class="button" title="subscription detail">[% subscription.title |html %]</a>
232                         </td>
233                         <td>
234                           [% IF ( subscription.notes ) %][% subscription.notes %][% END %]
235                           [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes %])[% END %]
236                         </td>
237                         <td>
238                           [% IF ( subscription.branchname ) %][% subscription.branchname %][% END %]
239                         </td>
240                         <td>
241                           [% IF ( subscription.callnumber ) %][% subscription.callnumber %][% END %]
242                         </td>
243                         <td>
244                           [% UNLESS subscription.cannotedit %]
245                             <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid %]&amp;op=reopen&amp;routing=[% subscription.routing %]&amp;searched=1&amp;title_filter=[% title_filter %]&amp;ISSN_filter=[% ISSN_filter %]&amp;EAN_filter=[% EAN_filter %]&amp;published_filter=[% publisher_filter %]&amp;bookseller_filter=[% bookseller_filter %]&amp;branch_filter=[% branch_filter %]" id="reopensub">Reopen</a>
246                           [% ELSE %]
247                             Cannot edit
248                           [% END %]
249                         </td>
250                         <td>
251                           <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid %]">Issue history</a>
252                         </td>
253                       </tr>
254                     [% END %]
255                     [% END %]
256                   </tbody>
257                 </table>
258               [% ELSE %]
259                 <div class="dialog message">
260                   <p>Your search returned no closed subscriptions.</p>
261                 </div>
262               [% END %]
263             </div>
264           </div>
265         [% ELSE %]
266             <div class="dialog message">
267               <p>Your search returned no results.</p>
268             </div>
269         [% END %]
270       [% END %]
271     </div>
272   </div>
273
274   <div class="yui-b">
275     [% INCLUDE 'serials-menu.inc' %]
276     [% IF ( done_searched ) %]
277     <div id="advsearch">
278         <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
279           <fieldset class="brief">
280             <h4>Search subscriptions</h4>
281               <ol>
282                 <li>
283                   <label for="issn">ISSN:</label>
284                   <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter %]" />
285                 </li>
286                 <li>
287                   <label for="title">Title:</label>
288                   <input type="text" id="title" name="title_filter" value="[% title_filter %]" />
289                 </li>
290                 [% IF ( marcflavour == "UNIMARC" ) %]
291                 <li>
292                   <label for="ean">EAN:</label>
293                   <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter %]" />
294                 </li>
295                 [% END %]
296                 <li>
297                   <label for="publisher">Publisher:</label>
298                   <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter %]" />
299                 </li>
300                 <li>
301                   <label for="bookseller">Vendor:</label>
302                   <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter %]" />
303                 </li>
304                 <li>
305                   <label for="branch">Library:</label>
306                   <select id="branch" name="branch_filter">
307                     <option value="">All</option>
308                     [% FOREACH branch IN branches_loop %]
309                       [% IF ( branch.selected ) %]
310                         <option selected="selected" value="[% branch.branchcode %]">[% branch.branchname %]</option>
311                       [% ELSE %]
312                         <option value="[% branch.branchcode %]">[% branch.branchname %]</option>
313                       [% END %]
314                     [% END %]
315                   </select>
316                 </li>
317               </ol>
318               <input type="hidden" name="searched" value="1" />
319               <fieldset class="action">
320                 <input type="submit" value="Search" />
321               </fieldset>
322             </div>
323           </fieldset>
324         </form>
325       [% END %]
326   </div>
327 </div>
328 [% INCLUDE 'intranet-bottom.inc' %]