Bug 5343: It is not possible to add a subscription for another supplier
[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 (routing) %]
54                 <h3>Search for Serial Routing List</h3>
55             [% END %]
56             [% IF (done_searched) %]
57                 <label for="show_only_renewed">
58                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
59                     Show only renewed
60                 </label>
61                 [% IF (subs_loop) %]
62                     <table id="srlt">
63                         <thead>
64                             <tr>
65                                 <th>ISSN</th>
66                                 <th>Title</th>
67                                 <th> Notes </th>
68                                 <th>Library</th>
69                                 <th>Call number</th>
70                                 <th>Expiration date</th>
71                                 <th></th>
72                             </tr>
73                         </thead>
74                         <tbody>
75                         [% FOREACH sub IN subs_loop %]
76                             <tr data-reneweddate="[% sub.reneweddate %]" >
77                                 <td>[% sub.issn %]</td>
78                                 <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 %]
79                                 ---
80                             [% END %][% IF (sub.unititle) %], [% sub.unititle %][% END %]</a>
81                                 </td>
82                                 <td>[% notes %]
83                                     [% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
84                                 </td>
85                                 <td>
86                                     [% IF (sub.branchcode) %][% sub.branchcode %][% END %]
87                                 </td>
88                                 <td>
89                                     [% IF (sub.callnumber) %][% sub.callnumber %][% END %]
90                                 </td>
91                                 <td>
92                                     [% IF (sub.enddate) %][% sub.enddate | $KohaDates %][% END %]
93                                 </td>
94                                 <td>
95                                     [% IF (sub.alreadyOnOrder) %]
96                                         Outstanding order (only one order per subscription is allowed)
97                                     [% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
98                                         <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">
99                                             Order
100                                         </a>
101                                     [% ELSE %]
102                                         <a title="This subscription depends on another supplier" style="cursor:help">Not orderable</a>
103                                     [% END %]
104                                 </td>
105                             </tr>
106                         [% END %]
107                         </tbody>
108                     </table>
109                 [% ELSE %]
110                     <p>Sorry, there is no result for your search.</p>
111                 [% END %]
112             [% ELSE %]
113                 <p>Use the search form on the left to find subscriptions.</p>
114             [% END %]
115         </div>
116     </div>
117
118     <div class="yui-b">
119         [% INCLUDE 'subscriptions-search.inc' %]
120         [% INCLUDE 'acquisitions-menu.inc' %]
121     </div>
122 </div>
123 [% INCLUDE 'intranet-bottom.inc' %]