Bug 35810: (QA follow-up) Add aria label for accessibility
[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 <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
18 <div class="main container-fluid">
19     <div class="row">
20         <div class="col-sm-10 col-sm-push-2">
21             <main>
22
23 <h1>Suggestions</h1>
24     [% IF ( suggestions_loop ) %]
25     <a href="#" id="show_only_mine">Show only mine</a> | <a href="#" id="show_all">Show all suggestions</a>
26     <table id="suggestionst">
27         <thead>
28         <tr>
29             <th>Mine</th>
30             <th>Suggestion</th>
31             <th>Suggested by</th>
32             <th>Accepted by</th>
33             <th>Library</th>
34             <th>Fund</th>
35             <th>Price</th>
36             <th>Quantity</th>
37             <th>Total</th>
38             <th>&nbsp;</th>
39         </tr>
40         </thead>
41         <tbody>
42         [% FOREACH suggestions_loo IN suggestions_loop %]
43             <tr>
44                 <td>[% suggestions_loo.managedby | html %]</td>
45                 <td>
46                     <p>[% suggestions_loo.title | html %] - [% suggestions_loo.author | html %]</p>
47                     <p>
48                         [% IF ( suggestions_loo.copyrightdate ) %]&copy; [% suggestions_loo.copyrightdate | html %] [% END %]
49                         [% IF ( suggestions_loo.volumedesc ) %]volume: <em>[% suggestions_loo.volumedesc | html %]</em> [% END %]
50                         [% IF ( suggestions_loo.isbn ) %]ISBN: <em>[% suggestions_loo.isbn | html %]</em> [% END %]
51                         [% IF ( suggestions_loo.publishercode ) %]<br />published by: [% suggestions_loo.publishercode | html %] [% END %]
52                         [% IF ( suggestions_loo.publicationyear ) %] in <em>[% suggestions_loo.publicationyear | html %]</em> [% END %]
53                         [% IF ( suggestions_loo.place ) %] in <em>[% suggestions_loo.place | html %]</em> [% END %]
54                         [% IF ( suggestions_loo.note ) %]<p><em>([% suggestions_loo.note | html %])</em></p> [% END %]
55                     </p>
56                 </td>
57                 <td>
58                     [% suggestions_loo.surnamesuggestedby | html %][% IF ( suggestions_loo.firstnamesuggestedby ) %],[% END %] [% suggestions_loo.firstnamesuggestedby | html %]
59                 </td>
60                 <td>
61                     [% suggestions_loo.surnamemanagedby | html %][% IF ( suggestions_loo.firstnamemanagedby ) %],[% END %] [% suggestions_loo.firstnamemanagedby | html %]
62                 </td>
63                 <td>
64                     [% Branches.GetName(suggestions_loo.branchcode) | html %]
65                 </td>
66                 <td>
67                     [% suggestions_loo.budget_name | html %]
68                 </td>
69                 <td>
70                     [% suggestions_loo.price | $Price %]
71                 </td>
72                 <td>
73                     [% IF (suggestions_loo.quantity > 0) %]
74                         [% suggestions_loo.quantity | html %]
75                     [% END %]
76                 </td>
77                 <td>
78                     [% suggestions_loo.total | $Price %]
79                 </td>
80                 <td class="actions">
81                     [% IF ( suggestions_loo.biblionumber ) %]
82                         <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>
83                     [% ELSE %]
84                         <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>
85                     [% END %]
86                 </td>
87             </tr>
88         [% END %]
89         </tbody>
90     </table>
91     [% ELSE %]
92         There are no outstanding (accepted) suggestions.
93     [% END %]
94 </main>
95 </div> <!-- /.col-sm-10.col-sm-push-2 -->
96
97 <div class="col-sm-2 col-sm-pull-10">
98     <aside>
99         [% INCLUDE 'acquisitions-menu.inc' %]
100     </aside>
101 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
102 </div> <!-- /.row -->
103
104 [% MACRO jsinclude BLOCK %]
105     [% Asset.js("js/acquisitions-menu.js") | $raw %]
106     [% INCLUDE 'datatables.inc' %]
107     [% INCLUDE 'calendar.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' %]