Bug 5343: Link serial and acqui modules
[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                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
26                 [% IF (dateformat == 'metric') %]
27                     { "aTargets": [ -2 ], "sType": "uk_date" },
28                 [% END %]
29             ],
30         } ) )
31
32         $("#show_only_renewed").click(function(){
33             updateRowsVisibility($(this+":checked").val());
34         });
35         $("#show_only_renewed").attr('checked', false);
36         updateRowsVisibility(false);
37     });
38  //]]>
39 </script>
40 </head>
41 <body>
42 [% INCLUDE 'header.inc' %]
43 [% INCLUDE 'acquisitions-search.inc' %]
44
45 <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>
46
47 <div id="doc3" class="yui-t2">
48     <div id="bd">
49     <div id="yui-main">
50         <div class="yui-b">
51             <h2>Serials subscriptions</h2>
52             [% IF (routing) %]
53                 <h3>Search for Serial Routing List</h3>
54             [% END %]
55             [% IF (done_searched) %]
56                 <label for="show_only_renewed">
57                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
58                     Show only renewed
59                 </label>
60                 [% IF (subs_loop) %]
61                     <table id="srlt">
62                         <thead>
63                             <tr>
64                                 <th>ISSN</th>
65                                 <th>Title</th>
66                                 <th> Notes </th>
67                                 <th>Library</th>
68                                 <th>Call number</th>
69                                 <th>Expiration date</th>
70                                 <th></th>
71                             </tr>
72                         </thead>
73                         <tbody>
74                         [% FOREACH sub IN subs_loop %]
75                             <tr data-reneweddate="[% sub.reneweddate %]" >
76                                 <td>[% sub.issn %]</td>
77                                 <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 %]
78                                 ---
79                             [% END %][% IF (sub.unititle) %], [% sub.unititle %][% END %]</a>
80                                 </td>
81                                 <td>[% notes %]
82                                     [% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
83                                 </td>
84                                 <td>
85                                     [% IF (sub.branchcode) %][% sub.branchcode %][% END %]
86                                 </td>
87                                 <td>
88                                     [% IF (sub.callnumber) %][% sub.callnumber %][% END %]
89                                 </td>
90                                 <td>
91                                     [% IF (sub.enddate) %][% sub.enddate | $KohaDates %][% END %]
92                                 </td>
93                                 <td>
94                                     [% IF (sub.alreadyOnOrder) %]
95                                         Outstanding order (only one order per subscription is allowed)
96                                     [% ELSE %]
97                                         <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">
98                                             Order
99                                         </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' %]