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