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