Bug 21669: Do not html filter TT assignement statements
[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 class="main container-fluid">
17     <div class="row">
18         <div class="col-sm-10 col-sm-push-2">
19             <main>
20
21 <h1>Suggestions</h1>
22     [% IF ( suggestions_loop ) %]
23     <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
24     <table id="suggestionst">
25         <thead>
26         <tr>
27             <th>Mine</th>
28             <th>Suggestion</th>
29             <th>Suggested by</th>
30             <th>Accepted by</th>
31             <th>&nbsp;</th>
32         </tr>
33         </thead>
34         <tbody>
35         [% FOREACH suggestions_loo IN suggestions_loop %]
36             <tr>
37                 <td>[% suggestions_loo.managedby | html %]</td>
38                 <td>
39                     <p>[% suggestions_loo.title | html %] - [% suggestions_loo.author | html %]</p>
40                     <p>
41                         [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
42                         [% IF ( suggestions_loo.volumedesc ) %]volume: <i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
43                         [% IF ( suggestions_loo.isbn ) %]ISBN: <i>[% suggestions_loo.isbn | html %]</i> [% END %]
44                         [% IF ( suggestions_loo.publishercode ) %]<br />published by: [% suggestions_loo.publishercode | html %] [% END %]
45                         [% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %]
46                         [% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %]
47                         [% IF ( suggestions_loo.note ) %]<p><i>([% suggestions_loo.note | html %])</i></p> [% END %]
48                     </p>
49                 </td>
50                 <td>
51                     [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %],[% END %] [% suggestions_loo.firstnamesuggestedby | html %]
52                 </td>
53                 <td>
54                     [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
55                 </td>
56                 <td class="actions">
57                     [% IF ( suggestions_loo.biblionumber ) %]
58                         <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> Place order</a>
59                     [% ELSE %]
60                         <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> Place order</a>
61                     [% END %]
62                 </td>
63             </tr>
64         [% END %]
65         </tbody>
66     </table>
67     [% ELSE %]
68         There are no outstanding (accepted) suggestions.
69     [% END %]
70 </main>
71 </div> <!-- /.col-sm-10.col-sm-push-2 -->
72
73 <div class="col-sm-2 col-sm-pull-10">
74     <aside>
75         [% INCLUDE 'acquisitions-menu.inc' %]
76     </aside>
77 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
78 </div> <!-- /.row -->
79
80 [% MACRO jsinclude BLOCK %]
81     [% Asset.js("js/acquisitions-menu.js") | $raw %]
82     [% INCLUDE 'datatables.inc' %]
83     <script>
84     $(document).ready(function() {
85         var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
86             "aoColumnDefs": [
87                 { "aTargets": [ 0 ],  "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter
88                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
89             ],
90             "sPaginationType": "four_button"
91         }));
92         $("#show_only_mine").on('click', function(e){
93             e.preventDefault();
94             suggestionst.fnFilter('^[% loggedinuser | html %]$', 0, true);
95         });
96         $("#show_all").on('click', function(e){
97             e.preventDefault();
98             suggestionst.fnFilter('', 0 );
99         });
100      });
101     </script>
102 [% END %]
103
104 [% INCLUDE 'intranet-bottom.inc' %]