Bug 29234: Further clean Z3950 Tests
[koha-ffzg.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">Home</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             <div class="page-section">
49                 [% IF (done_searched) %]
50                     <label for="show_only_renewed">
51                         <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
52                         Show only renewed
53                     </label>
54                     [% IF (subs_loop) %]
55                         <table id="srlt">
56                             <thead>
57                                 <tr>
58                                     <th>ISSN</th>
59                                     <th class="anti-the">Title</th>
60                                     <th> Notes </th>
61                                     <th>Vendor</th>
62                                     <th>Library</th>
63                                     <th>Call number</th>
64                                     <th>Expiration date</th>
65                                     <th class="NoSort"></th>
66                                 </tr>
67                             </thead>
68                             <tbody>
69                             [% FOREACH sub IN subs_loop %]
70                                 <tr data-reneweddate="[% sub.reneweddate | html %]" >
71                                     <td>[% sub.issn | html %]</td>
72                                     <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 %]
73                                     ---
74                                 [% END %][% IF (sub.unititle) %], [% sub.unititle | html %][% END %]</a>
75                                     </td>
76                                     <td>[% IF (sub.publicnotes) %][% sub.publicnotes | html %][% END %]
77                                         [% IF (sub.internalnotes) %]([% sub.internalnotes | html %])[% END %]
78                                     </td>
79                                     <td>
80                                         [% IF (sub.vendorname) %][% sub.vendorname | html %][% END %]
81                                     </td>
82                                     <td>
83                                         [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) | html %][% END %]
84                                     </td>
85                                     <td>
86                                         [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %]
87                                     </td>
88                                     <td data-order="[% sub.enddate | html %]">
89                                         [% sub.enddate | $KohaDates %]
90                                     </td>
91                                     <td class="actions">
92                                         [% IF (sub.alreadyOnOrder) %]
93                                             Outstanding order
94                                         [% END %]
95                                         [% IF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid %]
96                                             <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">
97                                                 <i class="fa fa-plus"></i> [% tp('verb', 'Order') | html %]
98                                             </a>
99                                         [% ELSE %]
100                                             <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
101                                         [% END %]
102                                     </td>
103                                 </tr>
104                             [% END %]
105                             </tbody>
106                         </table>
107                     [% ELSE %]
108                         <p>Sorry, there is no result for your search.</p>
109                     [% END %]
110                 [% ELSE %]
111                     <p>Use the search form on the left to find subscriptions.</p>
112                 [% END %]
113             </div> <!-- /.page-section -->
114         </main>
115     </div> <!-- /.col-sm-10.col-sm-push-2 -->
116
117 <div class="col-sm-2 col-sm-pull-10">
118     <aside>
119         [% INCLUDE 'subscriptions-search.inc' %]
120         [% INCLUDE 'acquisitions-menu.inc' %]
121     </aside>
122 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
123 </div> <!-- /.row -->
124
125 [% MACRO jsinclude BLOCK %]
126     [% Asset.js("js/acquisitions-menu.js") | $raw %]
127     [% INCLUDE 'datatables.inc' %]
128     [% INCLUDE 'calendar.inc' %]
129     <script>
130         function updateRowsVisibility(show_only_renewed) {
131             if ( show_only_renewed ) {
132                 $("#srlt [data-reneweddate='']").hide();
133             } else {
134                 $("#srlt > tbody > tr").show();
135             }
136         }
137
138         $(document).ready(function() {
139             $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
140                 "aoColumnDefs": [
141                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
142                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] }
143                 ],
144                 "sPaginationType": "full"
145             }));
146
147             $("#show_only_renewed").click(function(){
148                 updateRowsVisibility( $(this).is(":checked") );
149             });
150             $("#show_only_renewed").prop('checked', false);
151             updateRowsVisibility(false);
152
153             $("#advsearch_form").show();
154         });
155     </script>
156 [% END %]
157
158 [% INCLUDE 'intranet-bottom.inc' %]