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