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