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