Bug 13618: Add html filters to all the variables
[koha.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 [% SET footerjs = 1 %]
7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha &rsaquo; Serials [% biblionumber | html %]</title>
9 [% Asset.css("css/datatables.css") | $raw %]
10 [% INCLUDE 'doc-head-close.inc' %]
11 </head>
12
13 <body id="acq_newordersubscription" class="acq">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'acquisitions-search.inc' %]
16
17 <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?booksellerid=[% booksellerid | html %]">[% booksellername | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Add order from a subscription</div>
18
19 <div id="doc3" class="yui-t2">
20     <div id="bd">
21     <div id="yui-main">
22         <div class="yui-b">
23             <h2>Serials subscriptions</h2>
24             [% IF (done_searched) %]
25                 <label for="show_only_renewed">
26                     <input type="checkbox" style="vertical-align: middle;" id="show_only_renewed" />
27                     Show only renewed
28                 </label>
29                 [% IF (subs_loop) %]
30                     <table id="srlt">
31                         <thead>
32                             <tr>
33                                 <th>ISSN</th>
34                                 <th class="anti-the">Title</th>
35                                 <th> Notes </th>
36                                 <th>Vendor</th>
37                                 <th>Library</th>
38                                 <th>Call number</th>
39                                 <th class="title-string">Expiration date</th>
40                                 <th class="NoSort"></th>
41                             </tr>
42                         </thead>
43                         <tbody>
44                         [% FOREACH sub IN subs_loop %]
45                             <tr data-reneweddate="[% sub.reneweddate | html %]" >
46                                 <td>[% sub.issn | html %]</td>
47                                 <td><a href="/cgi-bin/koha/serials/subscription-detail.pl?subscriptionid=[% sub.subscriptionid | html %]" class="button" title="subscription detail">[% IF (sub.title) %][% sub.title | html %][% ELSE %]
48                                 ---
49                             [% END %][% IF (sub.unititle) %], [% sub.unititle | html %][% END %]</a>
50                                 </td>
51                                 <td>[% IF (sub.publicnotes) %][% sub.publicnotes | html %][% END %]
52                                     [% IF (sub.internalnotes) %]([% sub.internalnotes | html %])[% END %]
53                                 </td>
54                                 <td>
55                                     [% IF (sub.vendorname) %][% sub.vendorname | html %][% END %]
56                                 </td>
57                                 <td>
58                                     [% IF (sub.branchcode) %][% Branches.GetName( sub.branchcode ) | html %][% END %]
59                                 </td>
60                                 <td>
61                                     [% IF (sub.callnumber) %][% sub.callnumber | html %][% END %]
62                                 </td>
63                                 <td>
64                                     [% IF (sub.enddate) %]
65                                         <span title="[% sub.enddate | html %]">[% sub.enddate | $KohaDates %]</span>
66                                     [% ELSE %]
67                                         <span title="0000-00-00"></span>
68                                     [% END %]
69                                 </td>
70                                 <td>
71                                     [% IF (sub.alreadyOnOrder) %]
72                                         Outstanding order (only one order per subscription is allowed)
73                                     [% ELSIF not sub.aqbooksellerid || booksellerid == sub.aqbooksellerid%]
74                                         <a href="/cgi-bin/koha/acqui/neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;biblionumber=[% sub.biblionumber | html %]&amp;from_subscriptionid=[% sub.subscriptionid | html %]" title="Order this one">
75                                             Order
76                                         </a>
77                                     [% ELSE %]
78                                         <a title="This subscription depends on another supplier" style="cursor:help">Cannot be ordered</a>
79                                     [% END %]
80                                 </td>
81                             </tr>
82                         [% END %]
83                         </tbody>
84                     </table>
85                 [% ELSE %]
86                     <p>Sorry, there is no result for your search.</p>
87                 [% END %]
88             [% ELSE %]
89                 <p>Use the search form on the left to find subscriptions.</p>
90             [% END %]
91         </div>
92     </div>
93
94     <div class="yui-b">
95         [% INCLUDE 'subscriptions-search.inc' %]
96         [% INCLUDE 'acquisitions-menu.inc' %]
97     </div>
98 </div>
99
100 [% MACRO jsinclude BLOCK %]
101     [% Asset.js("js/acquisitions-menu.js") | $raw %]
102     [% INCLUDE 'datatables.inc' %]
103     <script type="text/javascript">
104         function updateRowsVisibility(show_only_renewed) {
105             if ( show_only_renewed ) {
106                 $("#srlt [data-reneweddate='']").hide();
107             } else {
108                 $("#srlt > tbody > tr").show();
109             }
110         }
111
112         $(document).ready(function() {
113             $("#srlt").dataTable($.extend(true, {}, dataTablesDefaults, {
114                 "aoColumnDefs": [
115                     { "bSortable": false, "bSearchable": false, 'aTargets': [ 'NoSort' ] },
116                     { "sType": "anti-the", "aTargets" : [ "anti-the" ] },
117                     { "sType": "title-string", "aTargets" : [ "title-string" ] }
118                 ],
119                 "sPaginationType": "four_button"
120             }));
121
122             $("#show_only_renewed").click(function(){
123                 updateRowsVisibility( $(this).is(":checked") );
124             });
125             $("#show_only_renewed").prop('checked', false);
126             updateRowsVisibility(false);
127
128             $("#advsearch_form").show();
129         });
130     </script>
131 [% END %]
132
133 [% INCLUDE 'intranet-bottom.inc' %]