Bug 23448: Clean up subscription detail template
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / serials / subscription-detail.tt
blob55684b2860b144c982a023e4dc92a848bfc062cd
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE Koha %]
4 [% USE KohaDates %]
5 [% USE Branches %]
6 [% USE AuthorisedValues %]
7 [% USE Price %]
8 [% USE ColumnsSettings %]
9 [% SET footerjs = 1 %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Koha &rsaquo; Serials &rsaquo; Details for subscription #[% subscriptionid | html %]</title>
12 [% INCLUDE 'doc-head-close.inc' %]
13 [% Asset.css("lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css") | $raw %]
14 </head>
16 <body id="ser_subscription-detail" class="ser">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'serials-search.inc' %]
20 <div id="breadcrumbs">
21     <a href="/cgi-bin/koha/mainpage.pl">Home</a>
22     &rsaquo; <a href="/cgi-bin/koha/serials/serials-home.pl">Serials</a>
23     [% UNLESS blocking_error %]&rsaquo; Details for subscription #[% subscriptionid | html %][% END %]
24 </div>
26 <div class="main container-fluid">
27     <div class="row">
28         <div class="col-sm-10 col-sm-push-2">
29             <main>
31                 [% INCLUDE 'serials-toolbar.inc' %]
32                 [% INCLUDE 'mana/mana-comment-status.inc' %]
34                 <h1>Subscription for [% bibliotitle | html %] [% IF closed %](closed)[% END %]</h1>
36                 [% IF ( abouttoexpire ) %]
37                     [% UNLESS closed %]
38                         <div class="dialog message">Subscription will expire [% enddate | html %]. <a href="#" id="renewsub">Renew this subscription</a>.</div>
39                     [% END %]
40                 [% END %]
42                 [% IF ( NEEDSCONFIRMATION ) %]
43                     <div id="circ_needsconfirmation" class="dialog alert">
44                         <h3>Please confirm subscription deletion</h3>
46                         <ul>
47                             [% IF ( NOTEXPIRED ) %] <li>The subscription has not expired yet</li> [% END %]
48                             [% IF ( LINKEDISSUES ) %] <li>The subscription has linked issues</li> [% END %]
49                             [% IF ( LINKEDITEMS ) %] <li>The subscription has linked items<br /> Those items won't be deleted</li> [% END %]
50                         </ul>
52                         <form method="post" action="/cgi-bin/koha/serials/subscription-detail.pl">
53                             <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
54                             <input type="hidden" name="issueconfirmed" value="1" />
55                             <input type="hidden" name="op" value="del" />
56                             <button type="submit" class="approve" accesskey="y"><i class="fa fa-fw fa-check"></i> Yes, delete (Y)</button>
57                         </form>
59                         <form method="get" action="/cgi-bin/koha/serials/subscription-detail.pl">
60                             <input type="hidden" name="subscriptionid" value="[% subscriptionid | html %]" />
61                             <button type="submit" class="deny" accesskey="n"><i class="fa fa-fw fa-remove"></i> No, don't delete (N)</button>
62                         </form>
63                     </div>
64                 [% END %] <!-- NEEDSCONFIRMATION -->
66                 [% IF mana_code.defined %]
67                     <div id="alert-community" class="dialog message">
68                         <p>
69                             [% mana_code | html %]
70                         </p>
71                     </div>
72                 [% END %]
74                 <div id="subscription_description" class="toptabs">
75                     <ul class="ui-tabs-nav">
76                         <li><a href="#subscription_info">Information</a></li>
77                         <li><a href="#subscription_planning">Planning</a></li>
78                         <li><a href="#subscription_issues">Issues</a></li>
79                         <li><a href="#subscription_summary">Summary</a></li>
80                         [% IF orders_grouped.size %]
81                             <li>
82                                 <a href="#acquisition_details">Acquisition details</a>
83                             </li>
84                         [% END %]
85                     </ul>
87                     <div id="subscription_info">
88                         <div class="row">
89                             <div class="col-sm-6">
90                                 <div class="rows">
91                                     <ol>
92                                         <li><span class="label">Subscription ID: </span>[% subscriptionid | html %]</li>
93                                         <li><span class="label">Librarian identity:</span> [% librarian | html %]</li>
94                                         <li><span class="label">Vendor:</span> <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% aqbooksellerid | uri %]">[% aqbooksellername | html %]</a></li>
95                                         <li><span class="label">Biblio:</span>  <a href="/cgi-bin/koha/catalogue/[% default_bib_view | uri %].pl?biblionumber=[% bibnum | uri %]">[% bibliotitle | html %]</a> <i>([% bibnum | html %])</i></li>
96                                         [% IF ( OPACBaseURL ) %]
97                                             <li>
98                                                 <span class="label">OPAC view:</span>
99                                                 <a id="view-subscription-in-opac" target="_blank" href="[% Koha.Preference('OPACBaseURL') | url %]/cgi-bin/koha/opac-detail.pl?biblionumber=[% biblionumber | uri %]">Open in new window.</a>
100                                             </li>
101                                         [% END %]
102                                         [% IF ( branchcode ) %]
103                                             <li><span class="label">Library:</span> [% Branches.GetName( branchcode ) | html %]</li>
104                                         [% END %]
105                                         [% IF ( serialsadditems ) %]
106                                             <li><span class="label">Items:</span> Serial receipt creates an item record.</li>
107                                         [% ELSE %]
108                                             <li><span class="label">Items:</span> Serial receipt does not create an item record.</li>
109                                         [% END %]
110                                         <li>
111                                             <span class="label">Serial number:</span>
112                                             [% IF skip_serialseq %]
113                                                 Serial number is skipped when an irregularity is found.
114                                             [% ELSE %]
115                                                 Serial number is kept when an irregularity is found.
116                                             [% END %]
117                                         </li>
118                                         <li><span class="label">Grace period:</span> [% graceperiod | html %]</li>
119                                     </ol>
120                                 </div>
121                             </div>
122                             <div class="col-sm-6">
123                                 <div class="rows">
124                                     <ol>
125                                         [% IF ( location ) %]<li><span class="label">Location:</span> [% location | html %]</li>[% END %]
126                                         [% IF ( callnumber ) %]<li><span class="label">Call number:</span> [% callnumber | html %]</li>[% END %]
127                                         [% IF ( staffdisplaycount ) %]<li><span class="label">Number of issues to display to staff:</span>[% staffdisplaycount | html %]</li>[% END %]
128                                         [% IF ( opacdisplaycount ) %]<li><span class="label">Number of issues to display in OPAC:</span>[% opacdisplaycount | html %]</li>[% END %]
129                                         [% IF ( letter ) %]
130                                             <li>
131                                                 <span class="label">Patron notification:</span> [% letter | html %]
132                                                 (<a href="/cgi-bin/koha/serials/viewalerts.pl?subscriptionid=[% subscriptionid | uri %]">subscribers</a>)
133                                             </li>
134                                         [% END %]
135                                         [% IF ( hasRouting ) %]<li><span class="label">Routing:</span> yes</li>[% END %]
136                                     </ol>
137                                 </div>
138                             </div>
139                         </div>
141                         [% IF available_additional_fields %]
142                             <hr>
143                             <div class="row">
144                                 <div class="col-sm-6">
145                                     <h3>Additional fields:</h3>
146                                     <div class="rows">
147                                         <ol>
148                                             [% INCLUDE 'additional-fields-display.inc' available=available_additional_fields values=additional_field_values %]
149                                         </ol>
150                                     </div>
151                                 </div>
152                             </div>
153                         [% END %]
154                     </div>
156                     <div id="subscription_planning">
157                         <div class="row">
158                             <div class="col-sm-12">
159                                 <div class="rows">
160                                     <ol>
161                                         <li>
162                                             <span class="label">Beginning date:</span>
163                                             [% startdate | html %]
164                                         </li>
165                                         <li>
166                                             <span class="label">Frequency:</span>
167                                             [% frequency.description | html %]
168                                         </li>
169                                         <li>
170                                             <span class="label">Manual history: </span>
171                                             [% IF ( manualhistory ) %]
172                                                 Enabled <a href="/cgi-bin/koha/serials/subscription-history.pl?subscriptionid=[% subscriptionid | uri %]">Edit history</a>
173                                             [% ELSE %]
174                                                 Disabled
175                                             [% END %]
176                                         </li>
177                                         <li>
178                                             <span class="label">Number pattern:</span>
179                                             [% numberpattern.label | html %]
180                                         </li>
181                                         <li>
182                                             <table>
183                                                 <tr>
184                                                     <td>Starting with:</td>
185                                                     [% IF (has_X) %]
186                                                         <td>[% lastvalue1 | html %]</td>
187                                                     [% END %]
188                                                     [% IF (has_Y) %]
189                                                         <td>[% lastvalue2 | html %]</td>
190                                                     [% END %]
191                                                     [% IF (has_Z) %]
192                                                         <td>[% lastvalue3 | html %]</td>
193                                                     [% END %]
194                                                 </tr>
195                                                 <tr>
196                                                     <td>Rollover:</td>
197                                                     [% IF (has_X) %]
198                                                         <td>[% numberpattern.whenmorethan1 | html %]</td>
199                                                     [% END %]
200                                                     [% IF (has_Y) %]
201                                                         <td>[% numberpattern.whenmorethan2 | html %]</td>
202                                                     [% END %]
203                                                     [% IF (has_Z) %]
204                                                         <td>[% numberpattern.whenmorethan3 | html %]</td>
205                                                     [% END %]
206                                                 </tr>
207                                             </table>
208                                         </li>
209                                         [% IF ( irregular_issues ) %]
210                                             <li>
211                                                 <span class="label">Irregularity:</span>
212                                                 [% irregular_issues | html %] issues
213                                             </li>
214                                         [% END %]
215                                         <li>
216                                             <span class="label">First arrival:</span>
217                                             [% firstacquidate | html %]
218                                         </li>
219                                         [% IF ( numberlength ) %]<li>
220                                             <span class="label">Number of issues:</span>
221                                             [% numberlength | html %]</li>
222                                         [% END %]
223                                         [% IF ( weeklength ) %]<li>
224                                             <span class="label">Number of weeks:</span>
225                                             [% weeklength | html %]</li>
226                                         [% END %]
227                                         [% IF ( monthlength ) %]<li>
228                                             <span class="label">Number of months:</span>
229                                             [% monthlength | html %]</li>
230                                         [% END %]
231                                     </ol>
232                                 </div>
233                             </div>
234                         </div>
235                     </div>
237                     <div id="subscription_numbering" style="display:none;">
238                         <h3>Numbering calculation</h3>
239                         <p><label>Numbering formula:</label> [% numberingmethod | html %]</p>
240                         <table>
241                             <tr>
242                                 <th>&nbsp;</th>
243                                 <th>X</th>
244                                 <th>Y</th>
245                                 <th>Z</th>
246                             </tr>
247                             <tr>
248                                 <td>Add</td>
249                                 <td>
250                                     [% add1 | html %]
251                                 </td>
252                                 <td>
253                                     [% add2 | html %]
254                                 </td>
255                                 <td>
256                                     [% add3 | html %]
257                                 </td>
258                             </tr>
259                             <tr>
260                                 <td>once every</td>
261                                 <td>[% every1 | html %]</td>
262                                 <td>[% every2 | html %]</td>
263                                 <td>[% every3 | html %]</td>
264                             </tr>
265                             <tr>
266                                 <td>When more than</td>
267                                 <td>[% whenmorethan1 | html %] [% IF ( innerloop1 ) %]<br />
268                                     <i>(is [% innerloop1 | html %])</i>[% END %]</td>
269                                 <td>[% whenmorethan2 | html %] [% IF ( innerloop2 ) %]<br />
270                                     <i>(is [% innerloop2 | html %])</i>[% END %]</td>
271                                 <td>[% whenmorethan3 | html %] [% IF ( innerloop3 ) %]<br />
272                                     <i>(is [% innerloop3 | html %])</i>[% END %]</td>
273                             </tr>
274                             <tr>
275                                 <td>Set back to</td>
276                                 <td>[% setto1 | html %]</td>
277                                 <td>[% setto2 | html %]</td>
278                                 <td>[% setto3 | html %]</td>
279                             </tr>
280                             <tr>
281                                 <td>
282                                         Inner counter
283                                 </td>
284                                 <td>[% innerloop1 | html %]</td>
285                                 <td>[% innerloop2 | html %]</td>
286                                 <td>[% innerloop3 | html %]</td>
287                             </tr>
288                             <tr>
289                                 <td>
290                                         Last value
291                                 </td>
292                                 <td>[% lastvalue1 | html %]</td>
293                                 <td>[% lastvalue2 | html %]</td>
294                                 <td>[% lastvalue3 | html %]</td>
295                             </tr>
296                         </table>
297                     </div>
298                     <div id="subscription_issues">
299                         <table>
300                             <tr>
301                                 <th>Issue number</th>
302                                 <th>Planned date</th>
303                                 <th>Published date</th>
304                                 <th>Published date (text)</th>
305                                 <th>Status</th>
306                             </tr>
307                             [% FOREACH serialslis IN serialslist %]
308                                 <tr>
309                                     <td>
310                                         [% serialslis.serialseq | html %]
311                                     </td>
312                                     <td>
313                                         [% IF serialslis.planneddate %]
314                                             [% serialslis.planneddate | html %]
315                                         [% ELSE %]
316                                             Unknown
317                                         [% END %]
318                                     </td>
319                                     <td>
320                                         [% IF serialslis.publisheddate %]
321                                             [% serialslis.publisheddate | html %]
322                                         [% ELSE %]
323                                             Unknown
324                                         [% END %]
325                                     </td>
326                                     <td>
327                                         [% serialslis.publisheddatetext | html %]
328                                     </td>
329                                     <td>
330                                         [% IF ( serialslis.status1 ) %]Expected[% END %]
331                                         [% IF ( serialslis.status2 ) %]Arrived[% END %]
332                                         [% IF ( serialslis.status3 ) %]Late[% END %]
333                                         [% IF ( serialslis.status4 ) %]Missing[% END %]
334                                         [% IF ( serialslis.status41 ) %]Missing (never received)[% END %]
335                                         [% IF ( serialslis.status42 ) %]Missing (sold out)[% END %]
336                                         [% IF ( serialslis.status43 ) %]Missing (damaged)[% END %]
337                                         [% IF ( serialslis.status44 ) %]Missing (lost)[% END %]
338                                         [% IF ( serialslis.status5 ) %]Not issued[% END %]
339                                         [% IF ( serialslis.status6 ) %]Delete[% END %]
340                                         [% IF ( serialslis.status7 ) %]
341                                             Claimed
342                                             [% IF ( serialslis.claimdate ) %]
343                                                 [% serialslis.claimdate | html %]
344                                             [% END %]
345                                         [% END %]
346                                         [% IF ( serialslis.status8 ) %]Stopped[% END %]
347                                     </td>
348                                 </tr>
349                             [% END %]
350                         </table>
351                     </div>
353                     <div id="subscription_summary">
354                         <div class="row">
355                             <div class="col-sm-12">
356                                 <div class="rows">
357                                     <ol>
358                                         <li><span class="label">Start date:</span> [% startdate | html %] </li>
359                                         <li><span class="label">End date:</span> [% enddate | html %]</li>
360                                         <li><span class="label">History start date:</span> [% histstartdate | html %] </li>
361                                         <li><span class="label">History end date:</span> [% histenddate | html %]</li>
362                                         <li><span class="label">Received issues:</span>[% recievedlist | html | html_line_break %]</li>
363                                         <li><span class="label">Missing issues:</span>[% missinglist | html | html_line_break %]</li>
364                                         <li><span class="label">Nonpublic note:</span>[% internalnotes | html | html_line_break %]</li>
365                                         <li><span class="label">Public note:</span>[% notes | html | html_line_break %]</li>
366                                         <li><span class="label">History staff note:</span>[% librariannote | html | html_line_break %]</li>
367                                         <li><span class="label">History OPAC note:</span>[% opacnote | html | html_line_break %]</li>
368                                     </ol>
369                                 </div>
370                             </div>
371                         </div>
372                     </div>
374                     [% IF orders_grouped.size %]
375                         <div id="acquisition_details">
376                             <h2>Acquisition details</h2>
377                             <table id="orders">
378                                 <caption>
379                                     <span class="actions">
380                                         <a href="#" id="hide_received_orders">Hide already received orders</a>
381                                         | <a href="#" id="show_all_orders">Show all orders</a>
382                                         | <a href="#" id="expand_all">Expand all</a>
383                                         | <a href="#" id="collapse_all">Collapse all</a>
384                                     </span>
385                                 </caption>
386                                 <thead>
387                                     <tr>
388                                         <th>Invoice</th>
389                                         <th>Basket</th>
390                                         <th>Order number</th>
391                                         <th class="title-string">Creation date</th>
392                                         <th class="title-string">Receive date</th>
393                                         <th class="title-string">Status</th>
394                                         <th>Internal note</th>
395                                         <th>Vendor note</th>
396                                         <th>Fund</th>
397                                         <th>Quantity</th>
398                                         <th title="ecost tax exc. / ecost tax inc.">Ordered</th>
399                                         <th title="Actual cost tax exc. / Actual cost tax inc.">Spent</th>
400                                     </tr>
401                                 </thead>
402                                 <tbody>
403                                     [% FOR ordernumber IN orders_grouped.keys %]
404                                         [% SET parent_tree_id = loop.count %]
405                                         [% SET parent_order = orders_grouped.$ordernumber %]
406                                         <tr data-tt-id="[% parent_tree_id | html %]" class="highlighted-row">
407                                             <td></td> [%# invoice %]
408                                             <td>
409                                                 [% IF CAN_user_acquisition_order_manage %]
410                                                     <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% order.basket.basketno | uri %]">[% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])</a>
411                                                 [% ELSE %]
412                                                     [% parent_order.basket.basketname | html %] ([% parent_order.basket.basketno | html %])
413                                                 [% END %]
414                                             </td>
415                                             <td></td> [%# ordernumber %]
416                                             <td>[% parent_order.basket.creationdate | $KohaDates %]</td>
417                                             <td>[% parent_order.datereceived | $KohaDates %]</td>
418                                             <td>
419                                                 [% SWITCH parent_order.orderstatus %]
420                                                     [% CASE 'new' %]<span title="status_1">New</span>
421                                                     [% CASE 'ordered' %]<span title="status_2">Ordered</span>
422                                                     [% CASE 'partial' %]<span title="status_3">Partial</span>
423                                                     [% CASE 'complete' %]<span title="status_4">Complete</span>
424                                                     [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
425                                                 [% END %]
426                                             </td>
427                                             <td></td> [%# internalnote %]
428                                             <td></td> [%# vendornote %]
429                                             <td></td> [%# fund %]
430                                             <td>[% parent_order.quantity | html %]</td>
431                                             <td>[% parent_order.ecost_tax_excluded | $Price %] / [% parent_order.ecost_tax_included | $Price %]</td>
432                                             <td>[% parent_order.unitprice_tax_excluded | $Price %] / [% parent_order.unitprice_tax_included | $Price %]</td>
433                                         </tr>
434                                         [% FOR order IN parent_order.orders %]
435                                             <tr data-tt-id="0" data-tt-parent-id="[% parent_tree_id | html %]">
436                                             <td>
437                                             [% IF order.invoice %]
438                                                 [% IF CAN_user_acquisition %]
439                                                     <a href="/cgi-bin/koha/acqui/invoice.pl?invoiceid=[% order.invoiceid | uri %]" title="Invoice detail page">
440                                                        [% order.invoice.invoicenumber | html %]</a>
441                                                 [% ELSE %]
442                                                     [% order.invoice.invoicenumber | html %]
443                                                 [% END %]
444                                             [% END %]
445                                             </td>
446                                             <td></td> [%# basket %]
447                                             <td>[% order.ordernumber | html %]</td>
448                                             <td><span title="[% order.basket.creationdate | uri %]">[% order.basket.creationdate | $KohaDates%]</span></td>
449                                             <td>[% IF order.datereceived %]<span title="[% order.datereceived | uri %]">[% order.datereceived | $KohaDates %]</span>[% END %]</td>
450                                             <td>
451                                                 [% SWITCH order.orderstatus %]
452                                                     [% CASE 'new' %]<span title="status_1">New</span>
453                                                     [% CASE 'ordered' %]<span title="status_2">Ordered</span>
454                                                     [% CASE 'partial' %]<span title="status_3">Partial</span>
455                                                     [% CASE 'complete' %]<span title="status_4">Complete</span>
456                                                     [% CASE 'cancelled' %]<span title="status_5">Cancelled</span>
457                                                 [% END %]
458                                             </td>
459                                             <td>[% order.order_internalnote | html %]</td>
460                                             <td>[% order.order_vendornote | html %]</td>
461                                             <td>[% order.fund.budget_name | html %]</td>
462                                             <td>[% order.quantity | html %]</td>
463                                             <td>
464                                                 [% UNLESS order.datereceived %]
465                                                     [% order.ecost_tax_excluded * order.quantity | $Price %] / [% order.ecost_tax_included * order.quantity | $Price %]
466                                                 [% END %]
467                                             </td>
468                                             <td>
469                                                 [% IF order.datereceived %]
470                                                     [%# FIXME What if unitprice has not been filled? %]
471                                                     [% order.unitprice_tax_excluded * order.quantity | $Price %] / [% order.unitprice_tax_included * order.quantity | $Price %]
472                                                 [% END %]
473                                             </td>
474                                         </tr>
475                                         [% END %]
476                                     [% END %]
477                                 </tbody>
478                             </table>
479                         </div>
480                     [% END %]
481                 </div>
482             </main>
483         </div> <!-- /.col-sm-10.col-sm-push-2 -->
485         <div class="col-sm-2 col-sm-pull-10">
486             <aside>
487                 [% INCLUDE 'serials-menu.inc' %]
488             </aside>
489         </div> <!-- /.col-sm-2.col-sm-pull-10 -->
490      </div> <!-- /.row -->
492 [% MACRO jsinclude BLOCK %]
493     <script>
494         var subscriptionid = "[% subscriptionid | html %]";
495         var MSG_CLOSE_SUBSCRIPTION = _("Are you sure you want to close this subscription?");
496         var MSG_REOPEN_SUBSCRIPTION = _("Are you sure you want to reopen this subscription?");
497         var CONFIRM_DELETE_SUBSCRIPTION = _("Are you sure you want to delete this subscription?");
498     </script>
499     [% Asset.js("js/serials-toolbar.js") | $raw %]
500     [% Asset.js("js/mana.js") | $raw %]
501     [% INCLUDE 'datatables.inc' %]
502     [% Asset.js("lib/jquery/plugins/treetable/jquery.treetable.js") | $raw %]
503     [% INCLUDE 'columns_settings.inc' %]
504     <script>
505         // the english words used in display purposes
506         var text = new Array(_("Number"),_("Volume"),_("Issue"),_("Month"),_("Week"),_("Starting with:"),_("Rollover at:"),_("Choose Hemisphere:"),_("Northern"),_("Southern",
507         "Autumn"),_("Winter"),_("Spring"),_("Summer"),_("Fall"),_("Season"),_("Year"));
508         $(document).ready(function() {
509             $("#subscription_description").tabs();
510             $("#renewsub").click(function(){
511                 popup([% subscriptionid | html %]);
512                 return false;
513             })
515             var columns_settings = [% ColumnsSettings.GetColumns( 'serials', 'subscription-detail', 'orders', 'json' ) | $raw %];
516             var table = KohaTable("orders", {
517                 "aoColumnDefs": [
518                     { "bVisible": false, "aTargets": [ 'NoVisible' ] },
519                     { "bSortable": false, "aTargets": ["_all"] },
520                     { "aTargets": "title-string", "sType": "title-string" }
521                 ],
523                 'bPaginate': false,
524                 'bAutoWidth': false,
525                 'bSort': false,
526             }, columns_settings);
528             [% IF orders_grouped.size %]
529                 $(table).treetable({
530                     expandable: true,
531                     initialState: 'expanded',
532                 });
533                 $(table).treetable('expandAll');
535                 $("#expand_all").click(function(e){
536                     e.preventDefault();
537                     $(table).treetable('expandAll');
538                 });
539                 $("#collapse_all").click(function(e){
540                     e.preventDefault();
541                     $(table).treetable('collapseAll');
542                 });
544             [% END %]
546             $("#hide_received_orders").click(function(e){
547                 e.preventDefault();
548                 table.fnFilter( '^$', 4, true ); // Not empty "Receive date" columns
549             });
550             $("#show_all_orders").click(function(e){
551                 e.preventDefault();
552                 table.fnFilter( '', 4 ); // Not filter, display all columns
553             });
554             $("#show_all_orders").click();
555         });
557         function mana_comment_close(){
558             $("#selected_id").val("");
559             $("#mana-resource-id").val("");
560             $("#mana-comment").val("");
561             $("#mana-comment-box").modal("hide");
562         }
563     </script>
564 [% END %]
566 [% INCLUDE 'intranet-bottom.inc' %]