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