Bug 34913: DataTables upgrade: Update CSS and option names
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersubscription.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% USE KohaDates %]
4 [% USE Branches %]
5 [% USE Koha %]
6 [% PROCESS 'i18n.inc' %]
7 [% SET footerjs = 1 %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>[% FILTER collapse %]
10     [% t("Add order from a subscription") | html %] &rsaquo;
11     [% t("Acquisitions") | html %] &rsaquo;
12     [% t("Koha") | html %]
13 [% END %]</title>
14 [% INCLUDE 'doc-head-close.inc' %]
15 </head>
16
17 <body id="acq_newordersubscription" class="acq">
18 [% WRAPPER 'header.inc' %]
19     [% INCLUDE 'acquisitions-search.inc' %]
20 [% END %]
21
22 [% WRAPPER 'sub-header.inc' %]
23     [% WRAPPER breadcrumbs %]
24         [% WRAPPER breadcrumb_item %]
25             <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a>
26         [% END %]
27         [% WRAPPER breadcrumb_item %]
28             <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% booksellername | html %]</a>
29         [% END %]
30         [% WRAPPER breadcrumb_item %]
31             <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | uri %]">Basket [% basketno | html %]</a>
32         [% END %]
33         [% WRAPPER breadcrumb_item bc_active= 1 %]
34             <span>Add order from a subscription</span>
35         [% END %]
36     [% END #/ WRAPPER breadcrumbs %]
37 [% END #/ WRAPPER sub-header.inc %]
38
39 <div class="main container-fluid">
40     <div class="row">
41         <div class="col-sm-10 col-sm-push-2">
42             <main>
43
44             <h1>Serials subscriptions</h1>
45             <div class="page-section">
46                 [% IF (done_searched) %]
47                     <label for="show_only_renewed">
48                         <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
49                         Show only renewed
50                     </label>
51                     [% IF (subs_loop) %]
52                         <table id="srlt">
53                             <thead>
54                                 <tr>
55                                     <th>ISSN</th>
56                                     <th class="anti-the">Title</th>
57                                     <th> Notes </th>
58                                     <th>Vendor</th>
59                                     <th>Library</th>
60                                     <th>Call number</th>
61                                     <th>Expiration date</th>
62                                     <th class="NoSort"></th>
63                                 </tr>
64                             </thead>
65                             <tbody>
66                             [% FOREACH sub IN subs_loop %]
67                                 <tr data-reneweddate="[% sub.reneweddate | html %]" >
68                                     <td>[% sub.issn | html %]</td>
69                                     <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid | uri %]" class="button" title="subscription detail">[% IF (sub.title) %][% sub.title | html %][% ELSE %]
70                                     ---
71                                 [% END %][% IF (sub.unititle) %], [% sub.unititle | html %][% END %]</a>
72                                     </td>
73                                     <td>[% IF (sub.publicnotes) %][% sub.publicnotes | html %][% END %]
74                                         [% IF (sub.internalnotes) %]([% sub.internalnotes | html %])[% END %]
75                                     </td>
76                                     <td>
77                                         [% IF (sub.vendorname) %][% sub.vendorname | html %][% END %]
78                                     </td>
79                                     <td>
80                                         [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) | html %][% END %]
81                                     </td>
82                                     <td>
83                                         [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %]
84                                     </td>
85                                     <td data-order="[% sub.enddate | html %]">
86                                         [% sub.enddate | $KohaDates %]
87                                     </td>
88                                     <td class="actions">
89                                         [% IF (sub.alreadyOnOrder) %]
90                                             Outstanding order
91                                         [% END %]
92                                         [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
93                                             <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;biblionumber=[% sub.biblionumber | uri %]&amp;from_subscriptionid=[% sub.subscriptionid | uri %]" title="Order this one" class="btn btn-default btn-xs">
94                                                 <i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]
95                                             </a>
96                                         [% ELSE %]
97                                             <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
98                                         [% END %]
99                                     </td>
100                                 </tr>
101                             [% END %]
102                             </tbody>
103                         </table>
104                     [% ELSE %]
105                         <p>Sorry, there is no result for your search.</p>
106                     [% END %]
107                 [% ELSE %]
108                     <p>Use the search form on the left to find subscriptions.</p>
109                 [% END %]
110             </div> <!-- /.page-section -->
111         </main>
112     </div> <!-- /.col-sm-10.col-sm-push-2 -->
113
114 <div class="col-sm-2 col-sm-pull-10">
115     <aside>
116         [% INCLUDE 'subscriptions-search.inc' %]
117         [% INCLUDE 'acquisitions-menu.inc' %]
118     </aside>
119 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
120 </div> <!-- /.row -->
121
122 [% MACRO jsinclude BLOCK %]
123     [% Asset.js("js/acquisitions-menu.js") | $raw %]
124     [% INCLUDE 'datatables.inc' %]
125     [% INCLUDE 'calendar.inc' %]
126     <script>
127         function updateRowsVisibility(show_only_renewed) {
128             if ( show_only_renewed ) {
129                 $("#srlt [data-reneweddate='']").hide();
130             } else {
131                 $("#srlt > tbody > tr").show();
132             }
133         }
134
135         $(document).ready(function() {
136             $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
137                 "columnDefs": [
138                     { "orderable": false, "searchable":  false, "targets": [ 'NoSort' ] },
139                     { "type": "anti-the", "targets":  [ "anti-the" ] }
140                 ],
141                 "pagingType": "full"
142             }));
143
144             $("#show_only_renewed").click(function(){
145                 updateRowsVisibility( $(this).is(":checked") );
146             });
147             $("#show_only_renewed").prop('checked', false);
148             updateRowsVisibility(false);
149
150             $("#advsearch_form").show();
151         });
152     </script>
153 [% END %]
154
155 [% INCLUDE 'intranet-bottom.inc' %]