Bug 16238: Use .prop() instead of .attr() for 'checked'
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersubscription.tt
blob7404de4dc0acf2773d34fc1d4224c8514cb650a4
1 [% USE KohaDates %]
2 [% USE Branches %]
3 [% USE Koha %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Serials [% biblionumber %]</title>
6 <link rel="stylesheet" type="text/css" href="[% interface %]/[% theme %]/css/datatables.css" />
7 [% INCLUDE 'doc-head-close.inc' %]
8 [% INCLUDE 'datatables.inc' %]
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     }
19     $(document).ready(function() {
20         $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
21             "aoColumnDefs": [
22                 { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
23                 { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
24                 { "sType": "title-string", "aTargets" : [ "title-string" ] }
25             ],
26             "sPaginationType": "four_button"
27         } ) )
29         $("#show_only_renewed").click(function(){
30             updateRowsVisibility( $(this).is(":checked") );
31         });
32         $("#show_only_renewed").prop('checked', false);
33         updateRowsVisibility(false);
35         $("#advsearch_form").show();
36     });
37  //]]>
38 </script>
39 </head>
40 <body id="acq_newordersubscription" class="acq">
41 [% INCLUDE 'header.inc' %]
42 [% INCLUDE 'acquisitions-search.inc' %]
44 <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 <div id="doc3" class="yui-t2">
47     <div id="bd">
48     <div id="yui-main">
49         <div class="yui-b">
50             <h2>Serials subscriptions</h2>
51             [% IF (done_searched) %]
52                 <label for="show_only_renewed">
53                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
54                     Show only renewed
55                 </label>
56                 [% IF (subs_loop) %]
57                     <table id="srlt">
58                         <thead>
59                             <tr>
60                                 <th>ISSN</th>
61                                 <th class="anti-the">Title</th>
62                                 <th> Notes </th>
63                                 <th>Library</th>
64                                 <th>Call number</th>
65                                 <th class="title-string">Expiration date</th>
66                                 <th class="NoSort"></th>
67                             </tr>
68                         </thead>
69                         <tbody>
70                         [% FOREACH sub IN subs_loop %]
71                             <tr data-reneweddate="[% sub.reneweddate %]" >
72                                 <td>[% sub.issn %]</td>
73                                 <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 %]
74                                 ---
75                             [% END %][% IF (sub.unititle) %], [% sub.unititle %][% END %]</a>
76                                 </td>
77                                 <td>[% IF (sub.publicnotes) %][% sub.publicnotes %][% END %]
78                                     [% IF (sub.internalnotes) %]([% sub.internalnotes %])[% END %]
79                                 </td>
80                                 <td>
81                                     [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) %][% END %]
82                                 </td>
83                                 <td>
84                                     [% IF (sub.callnumber) %][% sub.callnumber %][% END %]
85                                 </td>
86                                 <td>
87                                     [% IF (sub.enddate) %]
88                                         <span title="[% sub.enddate %]">[% sub.enddate | $KohaDates %]</span>
89                                     [% ELSE %]
90                                         <span title="0000-00-00"></span>
91                                     [% END %]
92                                 </td>
93                                 <td>
94                                     [% IF (sub.alreadyOnOrder) %]
95                                         Outstanding order (only one order per subscription is allowed)
96                                     [% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
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                                     [% ELSE %]
101                                         <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
102                                     [% END %]
103                                 </td>
104                             </tr>
105                         [% END %]
106                         </tbody>
107                     </table>
108                 [% ELSE %]
109                     <p>Sorry, there is no result for your search.</p>
110                 [% END %]
111             [% ELSE %]
112                 <p>Use the search form on the left to find subscriptions.</p>
113             [% END %]
114         </div>
115     </div>
117     <div class="yui-b">
118         [% INCLUDE 'subscriptions-search.inc' %]
119         [% INCLUDE 'acquisitions-menu.inc' %]
120     </div>
121 </div>
122 [% INCLUDE 'intranet-bottom.inc' %]