Bug 10737: (follow-up) make the new 'Closed' column sortable
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / acqui / acqui-home.tt
1 [% INCLUDE 'doc-head-open.inc' %]
2 <title>Koha &rsaquo; Acquisitions</title>
3 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
4 [% INCLUDE 'doc-head-close.inc' %]
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script>
6 [% INCLUDE 'datatables-strings.inc' %]
7 <script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
8 <script type="text/javascript">
9 //<![CDATA[
10
11 dt_overwrite_html_sorting_localeCompare();
12
13 $(document).ready(function() {
14
15     var inactive = $(".b_inactive,.bu_active");
16     var active = $(".bu_inactive");
17     inactive.hide();
18     active.show();
19
20     $('#showallbudgets').click(function() {
21         if ( $('#showallbudgets:checked').val() !== undefined) {
22             inactive.show();
23             active.hide();
24         }
25         else {
26             inactive.hide();
27             active.show();
28         }
29     });
30     var srlt = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, {
31         "aoColumns": [
32             null,
33             null,
34             null,
35             null,
36             null,
37             null,
38             { "sType": "num-html" },
39             { "sType": "num-html" },
40             null
41         ],
42         'sDom': 't',
43         'bPaginate': false,
44         'bFilter': false,
45         'bInfo': false
46     } ) );
47 });
48 //]]>
49 </script>
50
51 </head>
52 <body id="acq_acqui-home" class="acq">
53 [% INCLUDE 'header.inc' %]
54 [% INCLUDE 'acquisitions-search.inc' %]
55
56 <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; </div>
57
58 <div id="doc3" class="yui-t2">
59
60 <div id="bd">
61     <div id="yui-main">
62     <div class="yui-b">
63
64 [% INCLUDE 'acquisitions-toolbar.inc' %]
65
66 <h1>Acquisitions</h1>
67     [% UNLESS ( loop_budget ) %]
68         [% IF ( CAN_user_acquisition_period_manage ) %]
69         <div class="dialog alert">You must <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">define a budget</a> in Administration</div>
70         [% ELSE %]
71         <div class="dialog alert">Your administrator must define a budget in Administration</div>
72         [% END %]
73     [% END %]
74 <div class="yui-g">
75 <div class="yui-u first">
76 <div id="acqui_acqui_home_order">
77     <fieldset>
78         <legend>Manage orders</legend>
79         <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
80             <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
81             <input type="submit" value="Search" />
82             </p>
83         </form>
84     </fieldset>
85 </div>
86 </div>
87
88 [% IF ( suggestion && suggestions_count ) %]
89 <div class="yui-u">
90     <div id="acqui_acqui_home_suggestions">
91         <fieldset>
92         <legend>Pending suggestions</legend>
93             <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl">Manage suggestions</a>.</p>
94         </fieldset>
95     </div>
96 </div>
97 [% END %]
98
99 </div>
100
101 [% IF ( loop_budget ) %]
102
103             <h3>All available funds[% IF ( branchname ) %] for [% branchname %] library[% END %]</h3>
104
105     <!-- <a href="/cgi-bin/koha/admin/aqbookfund.pl" title="[ Manage funds ]">[ Manage ]</a>
106     <a href="/cgi-bin/koha/admin/budgetperiods.pl">manage budgets</a><br><br>  -->
107
108
109
110     <div id="BudgetsAndFunds">
111     <p><label for="showallbudgets">Show active and inactive:</label> <input type="checkbox" id="showallbudgets" /></p>
112     <table id="accounts">
113         <thead>
114         <tr>
115             <th>Fund</th>
116             <th>Fund name</th>
117             <th class="b_inactive">Active</th>
118             <th>Owner</th>
119             <th>Library</th>
120             <th>Amount</th>
121             <th>Ordered</th>
122             <th>Spent</th>
123             <th>Avail</th>
124         </tr>
125         </thead>
126         <tfoot id="funds_total">
127         <tr>
128             <th>Total</th>
129             <th>&nbsp;</th>
130             <th class="b_inactive">&nbsp;</th>
131             <th>&nbsp;</th>
132             <th>&nbsp;</th>
133             <th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th>
134             <th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th>
135             <th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th>
136             <th class="data"><span class="bu_active">[% totavail %]</span><span class="bu_inactive" >[% totavail_active %]</span></th>
137         </tr>
138         </tfoot>
139         <tbody>
140         [% FOREACH loop_budge IN loop_budget %]
141         [% IF ( loop_budge.budget_period_active ) %]
142             <tr>
143                 <td>
144                     [% IF ( CAN_user_acquisition_budget_manage ) %]
145                         <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
146                     [% ELSE %]
147                         [% loop_budge.budget_code %]
148                     [% END %]
149                 </td>
150                 <td>[% loop_budge.budget_name %]</td>
151                 <td class="b_inactive">Active</td>
152                 <td>[% IF ( loop_budge.budget_owner_borrowernumber ) %]
153                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loop_budge.budget_owner_borrowernumber %]">[% loop_budge.budget_owner_surname %], [% loop_budge.budget_owner_firstname %]</a>
154                     [% ELSE %]
155                         &nbsp;
156                     [% END %]
157                 </td>
158                 <td>[% loop_budge.budget_branchname %]</td>
159                 <td class="data">[% loop_budge.budget_amount %]</td>
160                 <td class="data"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
161                 <td class="data"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
162                 <td class="data">[% loop_budge.budget_avail %]</td>
163             </tr>
164         [% ELSE %]
165             <tr class="b_inactive">
166                 <td>
167                     [% IF ( CAN_user_acquisition_budget_manage ) %]
168                         <a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a>
169                     [% ELSE %]
170                         [% loop_budge.budget_code %]
171                     [% END %]
172                 </td>
173                 <td>[% loop_budge.budget_name %]</td>
174                 <td class="b_inactive">Inactive</td>
175                 <td>[% IF ( loop_budge.budget_owner_borrowernumber ) %]
176                         <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loop_budge.budget_owner_borrowernumber %]">[% loop_budge.budget_owner_surname %], [% loop_budge.budget_owner_firstname %]</a>
177                     [% ELSE %]
178                         &nbsp;
179                     [% END %]
180                 </td>
181                 <td>[% loop_budge.budget_branchname %]</td>
182                 <td class="data">[% loop_budge.budget_amount %]</td>
183                 <td class="data"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_ordered %]</a></td>
184                 <td class="data"><a href="spent.pl?fund=[% loop_budge.budget_id %]&amp;fund_code=[% loop_budge.budget_code %]">[% loop_budge.budget_spent %]</a></td>
185                 <td class="data">[% loop_budge.budget_avail %]</td>
186             </tr>
187         [% END %]
188         [% END %]
189         </tbody>
190     </table>
191     </div>
192     [% END %]
193
194 </div>
195 </div>
196 <div class="yui-b">
197 [% INCLUDE 'acquisitions-menu.inc' %]
198 </div>
199 </div>
200 [% INCLUDE 'intranet-bottom.inc' %]