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