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