Merge branch 'bug_7368' into 3.14-master
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersubscription.tt
1 [% USE KohaDates %]
2 [% INCLUDE 'doc-head-open.inc' %]
3 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
4 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
5 [% INCLUDE 'doc-head-close.inc' %]
6 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
7 [% INCLUDE 'datatables-strings.inc' %]
8 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
9 <script type="text/javascript">
10 //<![CDATA[
11     function updateRowsVisibility(show_only_renewed) {
12         if ( show_only_renewed ) {
13             $("#srlt [data-reneweddate='']").hide();
14         } else {
15             $("#srlt > tbody > tr").show();
16         }
17     }
18
19     [% IF (dateformat == 'metric') %]
20         dt_add_type_uk_date();
21     [% END %]
22     $(document).ready(function() {
23         $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
24             "aoColumnDefs": [
25                 [% IF (dateformat == 'metric') %]
26                     { "aTargets": [ -2 ], "sType": "uk_date" },
27                 [% END %]
28             ],
29         } ) )
30
31         $("#show_only_renewed").click(function(){
32             updateRowsVisibility($(this+":checked").val());
33         });
34         $("#show_only_renewed").attr('checked', false);
35         updateRowsVisibility(false);
36
37         $("#advsearch_form").show();
38     });
39  //]]>
40 </script>
41 </head>
42 <body>
43 [% INCLUDE 'header.inc' %]
44 [% INCLUDE 'acquisitions-search.inc' %]
45
46 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/acqui/acqui-home.pl">Acquisitions</a> &rsaquo; <a href="/cgi-bin/koha/acqui/supplier.pl?supplierid=[% supplierid %]">[% booksellername %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno %]">Shopping Basket [% basketno %]</a> &rsaquo; Add order from a subscription</div>
47
48 <div id="doc3" class="yui-t2">
49     <div id="bd">
50     <div id="yui-main">
51         <div class="yui-b">
52             <h2>Serials subscriptions</h2>
53             [% IF (done_searched) %]
54                 <label for="show_only_renewed">
55                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
56                     Show only renewed
57                 </label>
58                 [% IF (subs_loop) %]
59                     <table id="srlt">
60                         <thead>
61                             <tr>
62                                 <th>ISSN</th>
63                                 <th>Title</th>
64                                 <th> Notes </th>
65                                 <th>Library</th>
66                                 <th>Call number</th>
67                                 <th>Expiration date</th>
68                                 <th></th>
69                             </tr>
70                         </thead>
71                         <tbody>
72                         [% FOREACH sub IN subs_loop %]
73                             <tr data-reneweddate="[% sub.reneweddate %]" >
74                                 <td>[% sub.issn %]</td>
75                                 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid %]" class="button" title="subscription detail">[% IF (sub.title) %][% sub.title |html %][% ELSE %]
76                                 ---
77                             [% END %][% IF (sub.unititle) %], [% sub.unititle %][% END %]</a>
78                                 </td>
79                                 <td>[% notes %]
80                                     [% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
81                                 </td>
82                                 <td>
83                                     [% IF (sub.branchcode) %][% sub.branchcode %][% END %]
84                                 </td>
85                                 <td>
86                                     [% IF (sub.callnumber) %][% sub.callnumber %][% END %]
87                                 </td>
88                                 <td>
89                                     [% IF (sub.enddate) %][% sub.enddate | $KohaDates %][% END %]
90                                 </td>
91                                 <td>
92                                     [% IF (sub.alreadyOnOrder) %]
93                                         Outstanding order (only one order per subscription is allowed)
94                                     [% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
95                                         <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid %]&amp;basketno=[% basketno %]&amp;biblionumber=[% sub.biblionumber %]&amp;subscriptionid=[% sub.subscriptionid %]" title="Order this one">
96                                             Order
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         </div>
113     </div>
114
115     <div class="yui-b">
116         [% INCLUDE 'subscriptions-search.inc' %]
117         [% INCLUDE 'acquisitions-menu.inc' %]
118     </div>
119 </div>
120 [% INCLUDE 'intranet-bottom.inc' %]