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