Bug 23013: Upgrade DataTables in the staff client
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / newordersuggestion.tt
blobcad0dd26e02de3c7ca4bc75507b5f8b775c78097
1 [% USE raw %]
2 [% USE Branches %]
3 [% USE Price %]
4 [% USE Asset %]
5 [% SET footerjs = 1 %]
6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha &rsaquo; Acquisitions &rsaquo; Add order from a suggestion</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 </head>
11 <body id="acq_newordersuggestion" class="acq">
12 [% INCLUDE 'header.inc' %]
13 [% INCLUDE 'suggestions-add-search.inc' %]
15 <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>
17 <div class="main container-fluid">
18     <div class="row">
19         <div class="col-sm-10 col-sm-push-2">
20             <main>
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>Library</th>
33             <th>Fund</th>
34             <th>Price</th>
35             <th>Quantity</th>
36             <th>Total</th>
37             <th>&nbsp;</th>
38         </tr>
39         </thead>
40         <tbody>
41         [% FOREACH suggestions_loo IN suggestions_loop %]
42             <tr>
43                 <td>[% suggestions_loo.managedby | html %]</td>
44                 <td>
45                     <p>[% suggestions_loo.title | html %] - [% suggestions_loo.author | html %]</p>
46                     <p>
47                         [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
48                         [% IF ( suggestions_loo.volumedesc ) %]volume: <i>[% suggestions_loo.volumedesc | html %]</i> [% END %]
49                         [% IF ( suggestions_loo.isbn ) %]ISBN: <i>[% suggestions_loo.isbn | html %]</i> [% END %]
50                         [% IF ( suggestions_loo.publishercode ) %]<br />published by: [% suggestions_loo.publishercode | html %] [% END %]
51                         [% IF ( suggestions_loo.publicationyear ) %] in <i>[% suggestions_loo.publicationyear | html %]</i> [% END %]
52                         [% IF ( suggestions_loo.place ) %] in <i>[% suggestions_loo.place | html %]</i> [% END %]
53                         [% IF ( suggestions_loo.note ) %]<p><i>([% suggestions_loo.note | html %])</i></p> [% END %]
54                     </p>
55                 </td>
56                 <td>
57                     [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %],[% END %] [% suggestions_loo.firstnamesuggestedby | html %]
58                 </td>
59                 <td>
60                     [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
61                 </td>
62                 <td>
63                     [% Branches.GetName(suggestions_loo.branchcode) | html %]
64                 </td>
65                 <td>
66                     [% suggestions_loo.budget_name | html %]
67                 </td>
68                 <td>
69                     [% suggestions_loo.price | $Price %]
70                 </td>
71                 <td>
72                     [% IF (suggestions_loo.quantity > 0) %]
73                         [% suggestions_loo.quantity | html %]
74                     [% END %]
75                 </td>
76                 <td>
77                     [% suggestions_loo.total | $Price %]
78                 </td>
79                 <td class="actions">
80                     [% IF ( suggestions_loo.biblionumber ) %]
81                         <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestions_loo.suggestionid | uri %]&amp;biblio=[% suggestions_loo.biblionumber | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
82                     [% ELSE %]
83                         <a href="neworderempty.pl?booksellerid=[% booksellerid | uri %]&amp;basketno=[% basketno | uri %]&amp;suggestionid=[% suggestions_loo.suggestionid | uri %]" class="btn btn-default btn-xs"><i class="fa fa-plus"></i> Order</a>
84                     [% END %]
85                 </td>
86             </tr>
87         [% END %]
88         </tbody>
89     </table>
90     [% ELSE %]
91         There are no outstanding (accepted) suggestions.
92     [% END %]
93 </main>
94 </div> <!-- /.col-sm-10.col-sm-push-2 -->
96 <div class="col-sm-2 col-sm-pull-10">
97     <aside>
98         [% INCLUDE 'acquisitions-menu.inc' %]
99     </aside>
100 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
101 </div> <!-- /.row -->
103 [% MACRO jsinclude BLOCK %]
104     [% Asset.js("js/acquisitions-menu.js") | $raw %]
105     [% INCLUDE 'datatables.inc' %]
106     <script>
107     $(document).ready(function() {
108         var suggestionst = $("#suggestionst").dataTable($.extend(true, {}, dataTablesDefaults, {
109             "aoColumnDefs": [
110                 { "aTargets": [ 0 ],  "bVisible": false, "bSearchable": true }, // must be searchable for fnFilter
111                 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
112             ],
113             "sPaginationType": "full"
114         }));
115         $("#show_only_mine").on('click', function(e){
116             e.preventDefault();
117             suggestionst.fnFilter('^[% loggedinuser | html %]$', 0, true);
118         });
119         $("#show_all").on('click', function(e){
120             e.preventDefault();
121             suggestionst.fnFilter('', 0 );
122         });
123      });
124     </script>
125 [% END %]
127 [% INCLUDE 'intranet-bottom.inc' %]