Bug 27631: reports and serials folders
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / serials-search.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE AuthorisedValues %]
4 [% USE Branches %]
5 [% USE CGI %]
6 [% USE KohaDates %]
7 [% USE Koha %]
8 [% SET footerjs = 1 %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>Serials [% biblionumber | html %] &rsaquo; Koha</title>
11 [% INCLUDE 'doc-head-close.inc' %]
12 <style>input.dt-filter { width : 100%; font-size : 85%; }</style>
13 </head>
14
15 <body id="ser_serials-home" class="ser">
16     [% INCLUDE 'header.inc' %]
17     [% INCLUDE 'serials-search.inc' %]
18
19     <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
20         <ol>
21             <li>
22                 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
23             </li>
24             [% IF ( done_searched ) %]
25                 <li>
26                     <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
27                 </li>
28                 <li>
29                     <a href="#" aria-current="page">
30                         Search results
31                     </a>
32                 </li>
33             [% ELSE %]
34                 <li>
35                     <a href="#" aria-current="page">
36                         Serials
37                     </a>
38                 </li>
39             [% END %]
40         </ol>
41     </nav>
42
43     [% url_params = [] %]
44     [% FOREACH param IN CGI.params.pairs %]
45         [% escaped_value = BLOCK %][% param.value | uri %][% END %]
46         [% url_params.push(param.key _ '=' _ escaped_value) %]
47     [% END %]
48
49     [% SET referrer = '/cgi-bin/koha/serials/serials-search.pl?' %]
50     [% referrer = BLOCK %][% referrer | url %][% url_params.join("&amp;") |uri %][% END %]
51     [% SET edit_action_link = '/cgi-bin/koha/serials/subscription-batchedit.pl?referrer=' _ referrer %]
52
53     [% BLOCK subscriptions_table %]
54         <form method="post">
55             [% IF closed %]
56                 [% SET tab = 'closed' %]
57             [% ELSE %]
58                 [% SET tab = 'opened' %]
59             [% END %]
60             [% IF CAN_user_serials_edit_subscription %]
61                 <div class="actions">
62                     <a class="select-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-check"></i> Select all</a>
63                     |
64                     <a class="clear-all" href="#" data-tab="[% tab | html %]"><i class="fa fa-remove"></i> Clear all</a>
65                     <span class="itemselection_actions">
66                         | Actions:
67                         <a class="itemselection_action_modify"><i class="fa fa-pencil"></i> Edit selected serials</a>
68                     </span>
69                 </div>
70             [% END %]
71             <table>
72                 <thead>
73                     <tr>
74                         <th></th>
75                         <th>ISSN</th>
76                         <th class="anti-the">Title</th>
77                         <th>Notes</th>
78                         <th>Library</th>
79                         <th>Location</th>
80                         <th>Call number</th>
81                         [% UNLESS closed %]
82                             <th>Expiration date</th>
83                         [% END %]
84                         [% FOR field IN additional_fields_for_subscription %]
85                             <th>[% field.name | html %]</th>
86                         [% END %]
87                         <th class="NoSort noExport">Actions</th>
88                     </tr>
89                 </thead>
90                 <tbody>
91                     [% FOREACH subscription IN subscriptions %]
92                         [% UNLESS subscription.cannotdisplay %]
93                             <tr>
94                                 <td>
95                                     [% UNLESS subscription.cannotedit %]
96                                         <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" />
97                                     [% ELSE %]
98                                         <input type="checkbox" name="subscriptionid" value="[% subscription.subscriptionid | html %]" disabled="disabled" title="You cannot edit this subscription" />
99                                     [% END %]
100                                 </td>
101                                 <td>
102                                     [% IF ( subscription.issn ) %]
103                                         [% subscription.issn | html %]
104                                     [% END %]
105                                 </td>
106                                 <td>
107                                     <a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% subscription.subscriptionid | uri %]" class="button" title="subscription detail">[% subscription.title | html %]</a>
108                                 </td>
109                                 <td>
110                                     [% IF ( subscription.publicnotes ) %][% subscription.publicnotes | html %][% END %]
111                                     [% IF ( subscription.internalnotes ) %]([% subscription.internalnotes | html %])[% END %]
112                                 </td>
113                                 <td>
114                                     [% IF ( subscription.branchcode ) %][% Branches.GetName( subscription.branchcode ) | html %][% END %]
115                                 </td>
116                                 <td>
117                                     [% IF ( subscription.location ) %]
118                                         [% AuthorisedValues.GetDescriptionByKohaField( kohafield => 'items.location', authorised_value => subscription.location ) | html %]
119                                     [% END %]
120                                 </td>
121                                 <td>
122                                     [% IF ( subscription.callnumber ) %][% subscription.callnumber | html %][% END %]
123                                 </td>
124                                 [% UNLESS closed %]
125                                     <td data-order="[% subscription.enddate | html %]">
126                                         [% subscription.enddate | $KohaDates %]
127                                     </td>
128                                 [% END %]
129
130                                 [% FOR field IN additional_fields_for_subscription %]
131                                     [% IF field.authorised_value_category %]
132                                         <td>[% AuthorisedValues.GetByCode( field.authorised_value_category, subscription.additional_fields.${field.name} ) | html %]</td>
133                                     [% ELSE %]
134                                         <td>[% subscription.additional_fields.${field.name} | html %]</td>
135                                     [% END %]
136                                 [% END %]
137
138                                 <td>
139                                     <div class="btn-group dropup">
140                                         [% IF closed %]
141                                             <a class="btn btn-default btn-xs dropdown-toggle" id="closedsubactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">
142                                             Actions <b class="caret"></b>
143                                             </a>
144                                             <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="closedsubactions[% subscription.subscriptionid | html %]">
145
146                                                 [% IF ( routing && CAN_user_serials_routing ) %]
147                                                     [% UNLESS ( subscription.cannotedit ) %]
148                                                         <li>
149                                                             <a href="/cgi-bin/koha/serials/serials-search.pl?subscriptionid=[% subscription.subscriptionid | uri %]&amp;op=reopen&amp;routing=[% subscription.routing | uri %]&amp;searched=1&amp;title_filter=[% title_filter | uri %]&amp;ISSN_filter=[% ISSN_filter | uri %]&amp;EAN_filter=[% EAN_filter | uri %]&amp;published_filter=[% publisher_filter | uri %]&amp;bookseller_filter=[% bookseller_filter | uri %]&amp;branch_filter=[% branch_filter | uri %]" id="reopensub"> <i class="fa fa-repeat"></i> Reopen</a>
150                                                         </li>
151                                                     [% END %]
152                                                 [% END # IF ( routing && CAN_user_serials_routing ) %]
153
154                                                 <li>
155                                                     <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-list-alt"></i> Issue history</a>
156                                                 </li>
157
158                                             </ul>
159                                         [% ELSE %]
160                                             <div class="btn-group">
161                                                 [% IF ( CAN_user_serials_receive_serials ) %]
162                                                     [%# There should be no space between these two buttons, it would render badly %]
163                                                     <a class="btn btn-default btn-xs" role="button"
164                                                     href="/cgi-bin/koha/serials/serials-edit.pl?subscriptionid=[% subscription.subscriptionid | html %]&amp;serstatus=1,3,7"><i
165                                                     class="fa fa-inbox"></i> Serial receive</a><a
166                                                     class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button"
167                                                     data-toggle="dropdown" href="#"><b class="caret"></b></a>
168                                                 [% ELSE %]
169                                                     <a class="btn btn-default btn-xs dropdown-toggle" id="subactions[% subscription.subscriptionid | html %]" role="button" data-toggle="dropdown" href="#">Actions <b class="caret"></b></a>
170                                                 [% END %]
171                                             <ul class="dropdown-menu pull-right" role="menu" aria-labelledby="subactions[% subscription.subscriptionid | html %]">
172
173                                                 [% IF ( routing && CAN_user_serials_routing ) %]
174                                                     [% IF ( subscription.cannotedit ) %]
175                                                     [% ELSE %]
176                                                         [% IF ( subscription.routingedit ) %]
177                                                             <li>
178                                                                 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-pencil"></i> Edit routing list ([% subscription.routingedit | html %])</a>
179                                                             </li>
180                                                         [% ELSE %]
181                                                             <li>
182                                                                 <a href="/cgi-bin/koha/serials/routing.pl?subscriptionid=[% subscription.subscriptionid | uri %]&amp;op=new"> <i class="fa fa-plus"></i> New routing list</a>
183                                                             </li>
184                                                         [% END %]
185                                                     [% END %]
186                                                 [% END # IF ( routing && CAN_user_serials_routing ) %]
187
188                                                 <li>
189                                                     <a href="/cgi-bin/koha/serials/serials-collection.pl?subscriptionid=[% subscription.subscriptionid | uri %]"><i class="fa fa-list-alt"></i> Issue history</a>
190                                                 </li>
191                                             </ul>
192                                             </div>
193                                         [% END # IF closed %]
194                                     </div> <!-- /.btn-group -->
195                                 </td>
196
197                             </tr>
198                         [% END # /UNLESS subscription.cannotdisplay %]
199                     [% END  # /FOREACH subscription %]
200                 </tbody>
201                 <tfoot>
202                     <tr>
203                         <td></td>
204                         <td><input type="text" class="dt-filter" data-column_num="1" placeholder="Search ISSN" /></td>
205                         <td><input type="text" class="dt-filter" data-column_num="2" placeholder="Search title" /></td>
206                         <td><input type="text" class="dt-filter" data-column_num="3" placeholder="Search notes" /></td>
207                         <td><input type="text" class="dt-filter" data-column_num="4" placeholder="Search library" /></td>
208                         <td><input type="text" class="dt-filter" data-column_num="5" placeholder="Search location" /></td>
209                         <td><input type="text" class="dt-filter" data-column_num="6" placeholder="Search callnumber" /></td>
210                         [% SET column_num = 6 %]
211                         [% UNLESS closed %]
212                             <td><input type="text" class="dt-filter" data-column_num="7" placeholder="Search expiration date" /></td>
213                             [% SET column_num = column_num + 1 %]
214                         [% END %]
215                         [% FOR field IN additional_fields_for_subscription %]
216                             <td><input type="text" class="dt-filter" data-column_num="[% loop.count + column_num | html %]" placeholder="Search [% field.name | html %]" /></td>
217                         [% END %]
218                         <td></td>
219                     </tr>
220                 </tfoot>
221             </table>
222         </form>
223     [% END # /BLOCK subscriptions_table %]
224
225     <div class="main container-fluid">
226         <div class="row">
227             <div class="col-sm-10 col-sm-push-2">
228                 <main>
229
230                     [% INCLUDE 'serials-toolbar.inc' %]
231
232                     [% IF ( mana ) %]
233                         [% IF ( done_searched ) %]
234                             <h1>Mana subscriptions ([% total | html %] found)</h1>
235                         [% ELSE %]
236                             <h1>Mana subscriptions search</h1>
237                         [% END %]
238                     [% ELSE %]
239                         [% IF ( done_searched ) %]
240                             <h1>Serials subscriptions ([% total | html %] found)</h1>
241                         [% ELSE %]
242                             <h1>Serials subscriptions search</h1>
243                         [% END %]
244                     [% END %]
245
246                     [% UNLESS ( done_searched ) %]
247                         <div id="advsearch" style="padding-bottom:3em;">
248                             <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
249                                 <fieldset class="rows">
250                                     <legend>Search subscriptions</legend>
251                                     <ol>
252                                         <li>
253                                             <label for="issn">ISSN:</label>
254                                             <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
255                                         </li>
256                                         <li>
257                                             <label for="title">Title:</label>
258                                             <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
259                                         </li>
260                                         [% IF ( marcflavour == "UNIMARC" ) %]
261                                             <li>
262                                                 <label for="ean">EAN:</label>
263                                                 <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
264                                             </li>
265                                         [% END %]
266                                         <li class="local">
267                                             <label for="callnumber">Call number:</label>
268                                             <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
269                                         </li>
270                                         <li>
271                                             <label for="publisher">Publisher:</label>
272                                             <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
273                                         </li>
274                                         <li class="local">
275                                             <label for="bookseller">Vendor:</label>
276                                             <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
277                                         </li>
278                                         <li class="local">
279                                             <label for="branch">Library:</label>
280                                             <select id="branch" name="branch_filter">
281                                                 <option value="">All</option>
282                                                 [%# FIXME Should not we filter the libraries? %]
283                                                 [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
284                                             </select>
285                                         </li>
286                                         <li class="local">
287                                             <label for="location">Location:</label>
288                                             [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
289                                         </li>
290                                         <li class="local">
291                                             <label for="to">Expires before:</label>
292                                             <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" />
293                                         </li>
294                                         [% INCLUDE 'additional-fields-entry.inc' available=additional_fields_for_subscription values=additional_field_filters wrap_fieldset=0 %]
295                                     </ol>
296                                     <input type="hidden" name="searched" value="1" />
297                                     [% IF ( mana ) %]
298                                         <input type="hidden" name="mana" value="1" />
299                                     [% END %]
300                                     <fieldset class="action">
301                                         <input type="submit" value="Search" />
302                                     </fieldset>
303                                 </fieldset> <!-- /.rows -->
304                             </form>
305                         </div> <!-- /#advsearch -->
306                     [% END # /UNLESS ( done_searched )%]
307
308                     [% IF ( done_searched ) %]
309                         [% IF ( total ) %]
310                             <div id="serialstabs" class="toptabs" style="clear:both;">
311                                 <ul class="ui-tabs-nav">
312                                     [% IF mana %]
313                                         <li><a href="#mana">Mana ([% total || 0 | html %])</a></li>
314                                     [% ELSE %]
315                                         <li><a href="#opened">Open ([% openedsubscriptions.size || 0 | html %])</a></li>
316                                         <li><a href="#closed">Closed ([% closedsubscriptions.size || 0 | html %])</a></li>
317                                     [% END %]
318                                 </ul>
319                                 [% IF mana %]
320                                     <div id="mana">
321                                         [% INCLUDE 'mana/mana-subscription-search-result.inc' %]
322                                     </div>
323                                 [% ELSE %]
324                                     <div id="opened">
325                                         [% IF openedsubscriptions %]
326                                             [% INCLUDE subscriptions_table subscriptions = openedsubscriptions %]
327                                         [% ELSE %]
328                                             <div class="dialog message">
329                                                 <p>Your search returned no open subscriptions.</p>
330                                             </div>
331                                         [% END %]
332                                     </div>
333                                     <div id="closed">
334                                         [% IF closedsubscriptions %]
335                                             [% INCLUDE subscriptions_table subscriptions = closedsubscriptions closed = 1 %]
336                                         [% ELSE %]
337                                             <div class="dialog message">
338                                                 <p>Your search returned no closed subscriptions.</p>
339                                             </div>
340                                         [% END %]
341                                     </div>
342                                 [% END # /IF mana %]
343                             </div> <!-- /#serialstabs -->
344                         [% ELSE %]
345                             <div class="dialog message">
346                                 <p>Your search returned no results.</p>
347                             </div>
348                         [% END # IF ( total ) %]
349                     [% END # /IF done_searched %]
350
351                 </main>
352             </div> <!-- /.col-sm-10.col-sm-push-2 -->
353
354             <div class="col-sm-2 col-sm-pull-10">
355                 <aside>
356
357                     [% INCLUDE 'serials-menu.inc' %]
358                     [% IF ( done_searched ) %]
359                         [% UNLESS ( mana ) %]
360                             <div id="advsearch">
361                                 <form action="/cgi-bin/koha/serials/serials-search.pl" method="get">
362                                     <fieldset class="brief">
363                                         <h4>Search subscriptions</h4>
364                                         <ol>
365                                             <li>
366                                                 <label for="issn">ISSN:</label>
367                                                 <input type="text" id="issn" name="ISSN_filter" value="[% ISSN_filter | html %]" />
368                                             </li>
369                                             <li>
370                                                 <label for="title">Title:</label>
371                                                 <input type="text" id="title" name="title_filter" value="[% title_filter | html %]" />
372                                             </li>
373                                             [% IF ( marcflavour == "UNIMARC" ) %]
374                                                 <li>
375                                                     <label for="ean">EAN:</label>
376                                                     <input type="text" id="ean" name="EAN_filter" value="[% EAN_filter | html %]" />
377                                                 </li>
378                                             [% END %]
379                                             <li>
380                                                 <label for="callnumber">Call number:</label>
381                                                 <input type="text" id="callnumber" name="callnumber_filter" value="[% callnumber_filter | html %]" />
382                                             </li>
383                                             <li>
384                                                 <label for="publisher">Publisher:</label>
385                                                 <input type="text" id="publisher" name="publisher_filter" value="[% publisher_filter | html %]" />
386                                             </li>
387                                             <li>
388                                                 <label for="bookseller">Vendor:</label>
389                                                 <input type="text" id="bookseller" name="bookseller_filter" value="[% bookseller_filter | html %]" />
390                                             </li>
391                                             <li>
392                                                 <label for="branch">Library:</label>
393                                                 <select id="branch" name="branch_filter">
394                                                     <option value="">All</option>
395                                                     [%# FIXME Should not we filter the libraries? %]
396                                                     [% PROCESS options_for_libraries libraries => Branches.all( selected => branch_filter, unfiltered => 1 ) %]
397                                                 </select>
398                                             </li>
399                                             <li>
400                                                 <label for="location">Location:</label>
401                                                 [% PROCESS 'av-build-dropbox.inc' name="location_filter", category="LOC", default=location_filter, all=1 %]
402                                             </li>
403                                             <li>
404                                                 <label for="to">Expires before:</label>
405                                                 <input type="text" id="to" name="expiration_date_filter" value="[% expiration_date_filter | $KohaDates %]" size="10" maxlength="10" class="flatpickr" />
406                                             </li>
407
408                                             [% FOR field IN additional_fields_for_subscription %]
409                                                 <li>
410                                                     <label for="additional_field_[% field.id | html %]ID"> [% field.name | html %]: </label>
411                                                     [% IF field.authorised_value_category %]
412                                                         <select id="additional_field_[% field.id | html %]" name="additional_field_[% field.id | html %]">
413                                                             <option value="">All</option>
414                                                             [% FOREACH av IN AuthorisedValues.GetAuthValueDropbox(field.authorised_value_category) %]
415                                                                 [% IF av.authorised_value == additional_field_filters.${field.id} %]
416                                                                     <option value="[% av.authorised_value | html %]" selected="selected">[% av.lib | html %]</option>
417                                                                 [% ELSE %]
418                                                                     <option value="[% av.authorised_value | html %]">[% av.lib | html %]</option>
419                                                                 [% END %]
420                                                             [% END %]
421                                                         </select>
422                                                     [% ELSE %]
423                                                         <input id="additional_field_[% field.id | html %]" type="text" value="[% additional_field_filters.${field.id} | html %]" name="additional_field_[% field.id | html %]" />
424                                                     [% END %]
425                                                 </li>
426                                             [% END %]
427                                         </ol>
428                                         <input type="hidden" name="searched" value="1" />
429                                         <fieldset class="action">
430                                             <input type="submit" value="Search" />
431                                         </fieldset>
432
433                                     </fieldset> <!-- /.brief -->
434                                 </form>
435                             </div> <!-- /#advsearch -->
436                         [% END # / UNLESS ( mana ) %]
437                     [% END # / IF ( done_searched ) %]
438                 </aside>
439             </div> <!-- /.col-sm-2.col-sm-pull-10 -->
440         </div> <!-- /.row -->
441
442 [% MACRO jsinclude BLOCK %]
443     [% INCLUDE 'calendar.inc' %]
444     [% INCLUDE 'datatables.inc' %]
445     <script>
446         var subscriptionid = "[% subscriptionid | html %]";
447     </script>
448     [% Asset.js("js/serials-toolbar.js") | $raw %]
449     <script>
450
451             function itemSelectionBuildEditLink(div) {
452                 var subscription_ids = new Array();
453                 $("input[name='subscriptionid'][type='checkbox']:checked", div).each(function() {
454                     subscription_ids.push($(this).val());
455                 });
456                 if (subscription_ids.length > 0) {
457                     var url = "[% edit_action_link | html %]";
458                     url += '&subscriptionid=' + subscription_ids.join('&subscriptionid=');
459                     $('a.itemselection_action_modify').attr('href', url);
460                 } else {
461                     return false;
462                 }
463                 return true;
464             }
465
466             function itemSelectionBuildActionLinks(tab) {
467                 var div = $("#" + tab);
468                 var modify_link_ok = itemSelectionBuildEditLink(div);
469                 if (modify_link_ok) {
470                     $('.itemselection_actions', div).show();
471                 } else {
472                     $('.itemselection_actions', div).hide();
473                 }
474             }
475
476         $(document).ready(function() {
477             var osrlt = $("#opened table").dataTable($.extend(true, {}, dataTablesDefaults, {
478                 "sPaginationType": "full",
479                 "order": [[ 2, "asc" ]],
480                 "aoColumnDefs": [
481                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
482                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
483                 ]
484             }));
485
486             var csrlt = $("#closed table").dataTable($.extend(true, {}, dataTablesDefaults, {
487                 // FIXME sort function of additional_fields!
488                 "order": [[ 2, "asc" ]],
489                 "sPaginationType": "full",
490                 "aoColumnDefs": [
491                     { 'bSortable': false, 'aTargets': [ 'NoSort' ] },
492                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
493                 ]
494             }));
495
496             var manarlt = $("#mana_results_datatable").dataTable($.extend(true, {}, dataTablesDefaults, {
497                 "sPaginationType": "full",
498                 "aoColumnDefs": [
499                     { 'bSortable': false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
500                     { 'sType': "anti-the", 'aTargets' : [ 'anti-the'] }
501                 ]
502             }));
503
504             osrlt.fnAddFilters("dt-filter", 750);
505             csrlt.fnAddFilters("dt-filter", 750);
506             manarlt.fnAddFilters("dt-filter", 750);
507
508             $('#serialstabs').tabs();
509             $("#reopensub").click(function(){
510                 return confirm(_("Are you sure you want to reopen this subscription?"));
511             });
512
513             $('.select-all, .clear-all').on('click', function(e) {
514                 e.preventDefault();
515                 var checkboxes = $(this).parents('form').find('input[type="checkbox"]');
516                 checkboxes.prop('checked', $(this).hasClass('select-all'));
517                 var tab = $(this).data("tab");
518                 itemSelectionBuildActionLinks(tab);
519             });
520
521             itemSelectionBuildActionLinks("opened");
522             itemSelectionBuildActionLinks("closed");
523             $("input[name='subscriptionid'][type='checkbox']").change(function() {
524                 var div = $(this).parents('form').parent().attr("id");
525                 itemSelectionBuildActionLinks(div);
526             });
527
528             [% IF ( mana ) %]
529                 $(".local").hide();
530                 [% FOR field IN additional_fields_for_subscription %]
531                       $("label[for=additional_field_[% field.id | $raw %]], input#additional_field_[% field.id | $raw %]").hide();
532                 [% END %]
533             [% END %]
534         });
535     </script>
536 [% END %]
537
538 [% INCLUDE 'intranet-bottom.inc' %]