Bug 6080: Add id to total line in funds table
[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 [% INCLUDE 'doc-head-close.inc' %]
4 <script type="text/javascript">
5 //<![CDATA[
6 $(document).ready(function() {
7     $('#showallbudgets').click(function() {
8         if ( $('#showallbudgets:checked').val() !== undefined) {
9             $('.b_inactive').show();
10             $('#b_inactive').show();
11             $('.bu_active').show();
12             $('.bu_inactive').hide();
13         }
14         else {
15             $('.b_inactive').hide();
16             $('#b_inactive').hide();
17             $('.bu_inactive').show();
18             $('.bu_active').hide();
19         }
20     });
21 });
22 //]]>
23 </script>
24
25 </head>
26 <body>
27 [% INCLUDE 'header.inc' %]
28 [% INCLUDE 'acquisitions-search.inc' %]
29
30 <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>
31
32 <div id="doc3" class="yui-t2">
33
34 <div id="bd">
35     <div id="yui-main">
36     <div class="yui-b">
37
38 [% INCLUDE 'acquisitions-toolbar.inc' %]
39
40 <h1>Acquisitions</h1>
41 <div class="yui-g">
42 <div class="yui-u first">
43 <div id="acqui_acqui_home_order">
44     <fieldset>
45         <legend>Manage orders</legend>
46     [% IF ( nobudget ) %]
47         [% IF ( CAN_user_parameters ) %]
48         <span class="problem">You must <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">define a budget</a> in Administration</span>
49         [% ELSE %]
50         <span class="problem">Your administrator must define a budget in Administration</span>
51         [% END %]
52         <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
53             <p><label for="supplierpage">Vendor </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
54             <input type="submit" value="Search" />
55             </p>
56         </form>
57     [% ELSE %]
58         <form name="findsupplier" action="/cgi-bin/koha/acqui/booksellers.pl" method="post">
59             <p><label for="supplierpage">Vendor: </label><input type="text" size="25" name="supplier" id="supplierpage" class="focus" />
60             <input type="submit" value="Search" />
61             </p>
62         </form>
63
64     [% END %]
65     </fieldset>
66 </div>
67
68 [% IF ( suggestion ) %][% IF ( suggestions_count ) %]
69 <div id="acqui_acqui_home_suggestions">
70     <fieldset>
71     <legend>Pending suggestions</legend>
72         <p>[% suggestions_count %] suggestions waiting. <a href="/cgi-bin/koha/suggestion/suggestion.pl">Manage suggestions</a>.</p>
73     </fieldset>
74 </div>[% END %][% END %]
75
76 </div>
77
78 <div class="yui-u">
79
80         [% IF ( loop_budget ) %]
81
82             <h3>All available funds[% IF ( branchname ) %] for [% branchname %] branch[% END %]</h3>
83
84     <!-- <a href="/cgi-bin/koha/admin/aqbookfund.pl" title="[ Manage funds ]">[ Manage ]</a>
85     <a href="/cgi-bin/koha/admin/budgetperiods.pl">manage budgets</a><br><br>  -->
86
87
88
89     <div id="BudgetsAndFunds">
90     <table id="accounts">
91         <thead>
92         <tr>
93             <th>Fund</th>
94             <th>Owner</th>
95             <th>Branch</th>
96             <th>Amount</th>
97             <th>Ordered</th>
98             <th>Spent</th>
99             <th>Avail</th>
100         </tr>
101         </thead>
102         <tfoot id="funds_total">
103         <tr>
104             <th>Total</th>
105             <th>&nbsp;</th>
106             <th>&nbsp;</th>
107             <th align="right" ><span class="bu_active" style="display : none;">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th>
108             <th align="right" ><span class="bu_active" style="display : none;">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th>
109             <th align="right" ><span class="bu_active" style="display : none;">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th>
110             <th align="right" ><span class="bu_active" style="display : none;">[% totavail %]</span><span class="bu_inactive" >[% totavail_active %]</span></th>
111         </tr>
112         </tfoot>
113         <tbody>
114         [% FOREACH loop_budge IN loop_budget %]
115             [% IF ( loop_budge.budget_period_active ) %]
116             [% IF ( loop.odd ) %]
117                 <tr>
118             [% ELSE %]
119                 <tr class="highlight">
120             [% END %]
121                 <td align="center">[% loop_budge.budget_code %]</td>
122                 <td align="center">[% loop_budge.budget_owner %]</td>
123                 <td align="center">[% loop_budge.budget_branchname %]</td>
124                 <td align="right" >[% loop_budge.budget_amount %]</td>
125                 <td align="right" >[% loop_budge.budget_ordered %]</td>
126                 <td align="right" >[% loop_budge.budget_spent %]</td>
127                 <td align="right" >[% loop_budge.budget_avail %]</td>
128             </tr>
129             [% ELSE %]
130             [% IF ( loop.odd ) %]
131                 <tr class="b_inactive" style="display : none;">
132             [% ELSE %]
133                 <tr class="highlight" id = "b_inactive" style="display : none;">
134             [% END %]
135             <td align="center" >[% loop_budge.budget_code %]</td>
136                 <td align="center">[% loop_budge.budget_owner %]</td>
137                 <td align="center">[% loop_budge.budget_branchname %]</td>
138                 <td align="right" >[% loop_budge.budget_amount %]</td>
139                 <td align="right" >[% loop_budge.budget_ordered %]</td>
140                 <td align="right" >[% loop_budge.budget_spent %]</td>
141                 <td align="right" >[% loop_budge.budget_avail %]</td>
142             [% END %]
143         [% END %]
144         </tbody>
145     </table>
146     </div><span class="label">Show all :&nbsp;</span><input type="checkbox" id="showallbudgets" />
147     [% END %]
148 </div>
149
150 </div>
151 </div>
152 </div>
153 <div class="yui-b">
154 [% INCLUDE 'acquisitions-menu.inc' %]
155 </div>
156 </div>
157 [% INCLUDE 'intranet-bottom.inc' %]