Bug 13618: Add html filters to all the variables
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersuggestion.tt
1 [% USE raw %]
2 [% USE Asset %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Acquisitions &rsaquo; Add order from a suggestion</title>
6 [% Asset.css("css/datatables.css") | $raw %]
7 [% INCLUDE 'doc-head-close.inc' %]
8 </head>
9
10 <body id="acq_newordersuggestion" class="acq">
11 [% INCLUDE 'header.inc' %]
12 [% INCLUDE 'suggestions-add-search.inc' %]
13
14 <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 %]">[% name | html %]</a> &rsaquo; <a href="/cgi-bin/koha/acqui/basket.pl?basketno=[% basketno | html %]">Basket [% basketno | html %]</a> &rsaquo; Add order from a suggestion</div>
15
16 <div id="doc3" class="yui-t2">
17    
18    <div id="bd">
19         <div id="yui-main">
20         <div class="yui-b">
21         
22 <h1>Suggestions</h1>
23     [% IF ( suggestions_loop ) %]
24     <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
25     <table id="suggestionst">
26         <thead>
27         <tr>
28             <th>Mine</th>
29             <th>Suggestion</th>
30             <th>Suggested by</th>
31             <th>Accepted by</th>
32             <th>&nbsp;</th>
33         </tr>
34         </thead>
35         <tbody>
36         [% FOREACH suggestions_loo IN suggestions_loop %]
37             <tr>
38                 <td>[% suggestions_loo.managedby | html %]</td>
39                 <td>
40                     <p>[% suggestions_loo.title | html %] - [% suggestions_loo.author | html %]</p>
41                     <p>
42                         [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
43                         [% IF ( suggestions_loo.volumedesc ) %]volume: <i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
44                         [% IF ( suggestions_loo.isbn ) %]ISBN: <i>[% suggestions_loo.isbn | html %]</i> [% END %]
45                         [% IF ( suggestions_loo.publishercode ) %]<br />published by: [% suggestions_loo.publishercode | html %] [% END %]
46                         [% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %]
47                         [% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %]
48                         [% IF ( suggestions_loo.note ) %]<p><i>([% suggestions_loo.note | html %])</i></p> [% END %]
49                     </p>
50                 </td>
51                 <td>
52                     [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %],[% END %] [% suggestions_loo.firstnamesuggestedby | html %]
53                 </td>
54                 <td>
55                     [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
56                 </td>
57                 <td class="actions">
58                     [% IF ( suggestions_loo.biblionumber ) %]
59                         <a href="neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;suggestionid=[% suggestions_loo.suggestionid | html %]&amp;biblio=[% suggestions_loo.biblionumber | html %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
60                     [% ELSE %]
61                         <a href="neworderempty.pl?booksellerid=[% booksellerid | html %]&amp;basketno=[% basketno | html %]&amp;suggestionid=[% suggestions_loo.suggestionid | html %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
62                     [% END %]
63                 </td>
64             </tr>
65         [% END %]
66         </tbody>
67     </table>
68     [% ELSE %]
69         There are no outstanding (accepted) suggestions.
70     [% END %]
71 </div>
72 </div>
73 <div class="yui-b">
74 [% INCLUDE 'acquisitions-menu.inc' %]
75 </div>
76 </div>
77
78 [% MACRO jsinclude BLOCK %]
79     [% Asset.js("js/acquisitions-menu.js") | $raw %]
80     [% INCLUDE 'datatables.inc' %]
81     <script type="text/javascript">
82     $(document).ready(function() {
83         var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
84             "aoColumnDefs": [
85                 { "aTargets": [ 0 ],  "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter
86                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
87             ],
88             "sPaginationType": "four_button"
89         }));
90         $("#show_only_mine").on('click', function(e){
91             e.preventDefault();
92             suggestionst.fnFilter('^[% loggedinuser | html %]$', 0, true);
93         });
94         $("#show_all").on('click', function(e){
95             e.preventDefault();
96             suggestionst.fnFilter('', 0 );
97         });
98      });
99     </script>
100 [% END %]
101
102 [% INCLUDE 'intranet-bottom.inc' %]