Lines 1-8
Link Here
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › Acquisitions</title> |
2 |
<title>Koha › Acquisitions</title> |
3 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
|
|
4 |
[% INCLUDE 'doc-head-close.inc' %] |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
|
|
4 |
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> |
5 |
[% INCLUDE 'datatables.inc' %] |
5 |
[% INCLUDE 'datatables.inc' %] |
|
|
6 |
<link href="[% interface %]/lib/jquery/plugins/treetable/stylesheets/jquery.treetable.css" rel="stylesheet" type="text/css" /> |
7 |
<script type="text/javascript" src="[% interface %]/lib/jquery/plugins/treetable/jquery.treetable.js"></script> |
8 |
|
6 |
<script type="text/javascript"> |
9 |
<script type="text/javascript"> |
7 |
//<![CDATA[ |
10 |
//<![CDATA[ |
8 |
|
11 |
|
Lines 15-47
$(document).ready(function() {
Link Here
|
15 |
inactive.hide(); |
18 |
inactive.hide(); |
16 |
active.show(); |
19 |
active.show(); |
17 |
|
20 |
|
18 |
$('#showallbudgets').click(function() { |
21 |
var oTable = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { |
19 |
if ( $('#showallbudgets:checked').val() !== undefined) { |
22 |
"fnDrawCallback": function ( oSettings ) { |
20 |
inactive.show(); |
23 |
if ( oSettings.aiDisplay.length == 0 ) |
21 |
active.hide(); |
24 |
{ |
22 |
} |
25 |
return; |
23 |
else { |
26 |
} |
24 |
inactive.hide(); |
27 |
|
25 |
active.show(); |
28 |
var nTrs = $('#accounts tbody tr'); |
26 |
} |
29 |
var iColspan = nTrs[0].getElementsByTagName('td').length; |
27 |
}); |
30 |
var sLastGroup = ""; |
28 |
var srlt = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { |
31 |
for ( var i=0 ; i<nTrs.length ; i++ ) |
29 |
"aoColumns": [ |
32 |
{ |
30 |
null, |
33 |
var iDisplayIndex = oSettings._iDisplayStart + i; |
31 |
null, |
34 |
var sGroup = oSettings.aoData[ oSettings.aiDisplay[iDisplayIndex] ]._aData[1]; |
32 |
null, |
35 |
if ( sGroup != sLastGroup ) |
33 |
null, |
36 |
{ |
34 |
null, |
37 |
var nGroup = document.createElement( 'tr' ); |
35 |
{ "sType": "title-numeric" }, |
38 |
var nCell = document.createElement( 'td' ); |
36 |
{ "sType": "title-numeric" }, |
39 |
nCell.colSpan = iColspan; |
37 |
{ "sType": "title-numeric" }, |
40 |
nCell.className = "group"; |
38 |
{ "sType": "title-numeric" } |
41 |
nCell.innerHTML = sGroup; |
|
|
42 |
nGroup.appendChild( nCell ); |
43 |
nTrs[i].parentNode.insertBefore( nGroup, nTrs[i] ); |
44 |
sLastGroup = sGroup; |
45 |
} |
46 |
} |
47 |
}, |
48 |
"aoColumnDefs": [ |
49 |
{ "bVisible": false, "aTargets": [ 0, 1 ] }, |
50 |
{ "bSortable": false, "aTargets": ["_all"] } |
39 |
], |
51 |
], |
40 |
'sDom': 't', |
52 |
'bSort': true, |
|
|
53 |
'aaSortingFixed': [[ 1, 'asc' ]], |
41 |
'bPaginate': false, |
54 |
'bPaginate': false, |
42 |
'bFilter': false, |
55 |
"bAutoWidth": false |
43 |
'bInfo': false |
56 |
})); |
44 |
} ) ); |
57 |
|
|
|
58 |
$(oTable).treetable({ |
59 |
expandable: true |
60 |
}); |
61 |
$(oTable).treetable('expandAll'); |
62 |
$("#expand_all").click(function(e){ |
63 |
e.preventDefault(); |
64 |
$(oTable).treetable('expandAll'); |
65 |
}); |
66 |
$("#collapse_all").click(function(e){ |
67 |
e.preventDefault(); |
68 |
$(oTable).treetable('collapseAll'); |
69 |
}); |
70 |
|
71 |
$("#hide_inactive").click(function(e){ |
72 |
e.preventDefault(); |
73 |
oTable.fnFilter( 1, 0 ); // Show only active=1 |
74 |
inactive.hide(); |
75 |
active.show(); |
76 |
}); |
77 |
$("#show_inactive").click(function(e){ |
78 |
e.preventDefault(); |
79 |
oTable.fnFilter( '', 0 ); |
80 |
inactive.show(); |
81 |
active.hide(); |
82 |
}); |
83 |
$("#hide_inactive").click(); |
84 |
|
45 |
}); |
85 |
}); |
46 |
//]]> |
86 |
//]]> |
47 |
</script> |
87 |
</script> |
Lines 101-128
$(document).ready(function() {
Link Here
|
101 |
<h3>All available funds[% IF ( branchname ) %] for [% branchname %][% END %]</h3> |
141 |
<h3>All available funds[% IF ( branchname ) %] for [% branchname %][% END %]</h3> |
102 |
|
142 |
|
103 |
<div id="BudgetsAndFunds"> |
143 |
<div id="BudgetsAndFunds"> |
104 |
<p><label for="showallbudgets">Show active and inactive:</label> <input type="checkbox" id="showallbudgets" /></p> |
|
|
105 |
<table id="accounts"> |
144 |
<table id="accounts"> |
|
|
145 |
<caption> |
146 |
<span class="actions"><a href="#" id="expand_all">Expand all</a> |
147 |
| <a href="#" id="collapse_all">Collapse all</a> |
148 |
| <a href="#" id="hide_inactive">Hide inactive budgets</a> |
149 |
| <a href="#" id="show_inactive">Show inactive budgets</a></span> |
150 |
</caption> |
151 |
|
106 |
<thead> |
152 |
<thead> |
107 |
<tr> |
153 |
<tr> |
108 |
<th>Fund</th> |
154 |
<th>Active</th> |
|
|
155 |
<th>Budget period description</th> |
156 |
<th>Fund code</th> |
109 |
<th>Fund name</th> |
157 |
<th>Fund name</th> |
110 |
<th class="b_inactive">Active</th> |
|
|
111 |
<th>Owner</th> |
158 |
<th>Owner</th> |
112 |
<th>Library</th> |
159 |
<th>Library</th> |
113 |
<th>Amount</th> |
160 |
<th>Amount</th> |
114 |
<th>Ordered</th> |
161 |
<th>Ordered</th> |
115 |
<th>Spent</th> |
162 |
<th>Spent</th> |
116 |
<th>Avail</th> |
163 |
<th>Total available</th> |
117 |
</tr> |
164 |
</tr> |
118 |
</thead> |
165 |
</thead> |
119 |
<tfoot id="funds_total"> |
166 |
<tfoot id="funds_total"> |
120 |
<tr> |
167 |
<tr> |
121 |
<th>Total</th> |
168 |
<th></th> |
122 |
<th> </th> |
169 |
<th></th> |
123 |
<th class="b_inactive"> </th> |
170 |
<th colspan="4">Total</th> |
124 |
<th> </th> |
|
|
125 |
<th> </th> |
126 |
<th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th> |
171 |
<th class="data"><span class="bu_active">[% total %]</span><span class="bu_inactive" >[% total_active %]</span></th> |
127 |
<th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th> |
172 |
<th class="data"><span class="bu_active">[% totordered %]</span><span class="bu_inactive" >[% totordered_active %]</span></th> |
128 |
<th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th> |
173 |
<th class="data"><span class="bu_active">[% totspent %]</span><span class="bu_inactive" >[% totspent_active %]</span></th> |
Lines 131-138
$(document).ready(function() {
Link Here
|
131 |
</tfoot> |
176 |
</tfoot> |
132 |
<tbody> |
177 |
<tbody> |
133 |
[% FOREACH loop_budge IN loop_budget %] |
178 |
[% FOREACH loop_budge IN loop_budget %] |
134 |
[% IF ( loop_budge.budget_period_active ) %] |
179 |
[% IF loop_budge.budget_parent_id %] |
135 |
<tr> |
180 |
<tr data-tt-id="[% loop_budge.budget_id %]" data-tt-parent-id="[% loop_budge.budget_parent_id %]"> |
|
|
181 |
[% ELSE %] |
182 |
<tr data-tt-id="[% loop_budge.budget_id %]"> |
183 |
[% END %] |
184 |
|
185 |
<td>[% loop_budge.budget_period_active %]</td> |
186 |
<td>Budget [% loop_budge.budget_period_description %] [id=[% loop_budge.budget_period_id %]][% UNLESS loop_budge.budget_period_active %] (inactive)[% END %]</td> |
136 |
<td> |
187 |
<td> |
137 |
[% IF ( CAN_user_acquisition_budget_manage ) %] |
188 |
[% IF ( CAN_user_acquisition_budget_manage ) %] |
138 |
<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a> |
189 |
<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a> |
Lines 141-147
$(document).ready(function() {
Link Here
|
141 |
[% END %] |
192 |
[% END %] |
142 |
</td> |
193 |
</td> |
143 |
<td>[% loop_budge.budget_name %]</td> |
194 |
<td>[% loop_budge.budget_name %]</td> |
144 |
<td class="b_inactive">Active</td> |
|
|
145 |
<td>[% IF ( loop_budge.budget_owner_borrowernumber ) %] |
195 |
<td>[% IF ( loop_budge.budget_owner_borrowernumber ) %] |
146 |
<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> |
196 |
<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> |
147 |
[% ELSE %] |
197 |
[% ELSE %] |
Lines 154-183
$(document).ready(function() {
Link Here
|
154 |
<td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_spent %]</span></a></td> |
204 |
<td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_spent %]</span></a></td> |
155 |
<td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td> |
205 |
<td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td> |
156 |
</tr> |
206 |
</tr> |
157 |
[% ELSE %] |
|
|
158 |
<tr class="b_inactive"> |
159 |
<td> |
160 |
[% IF ( CAN_user_acquisition_budget_manage ) %] |
161 |
<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% loop_budge.budget_period_id %]">[% loop_budge.budget_code %]</a> |
162 |
[% ELSE %] |
163 |
[% loop_budge.budget_code %] |
164 |
[% END %] |
165 |
</td> |
166 |
<td>[% loop_budge.budget_name %]</td> |
167 |
<td class="b_inactive">Inactive</td> |
168 |
<td>[% IF ( loop_budge.budget_owner_borrowernumber ) %] |
169 |
<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> |
170 |
[% ELSE %] |
171 |
|
172 |
[% END %] |
173 |
</td> |
174 |
<td>[% loop_budge.budget_branchname %]</td> |
175 |
<td class="data"><span title="[% loop_budge.budget_amount %]">[% loop_budge.formatted_budget_amount %]</span></td> |
176 |
<td class="data"><span title="[% loop_budge.budget_ordered %]"><a href="ordered.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_ordered %]</a></span></td> |
177 |
<td class="data"><span title="[% loop_budge.budget_spent %]"><a href="spent.pl?fund=[% loop_budge.budget_id %]&fund_code=[% loop_budge.budget_code %]">[% loop_budge.formatted_budget_spent %]</span></a></td> |
178 |
<td class="data"><span title="[% loop_budge.budget_avail %]">[% loop_budge.formatted_budget_avail %]</td> |
179 |
</tr> |
180 |
[% END %] |
181 |
[% END %] |
207 |
[% END %] |
182 |
</tbody> |
208 |
</tbody> |
183 |
</table> |
209 |
</table> |
184 |
- |
|
|