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