@@ -, +, @@ - Simplification of the column and row-hiding JavaScript - The addition of an "Active" column to be shown when all funds are shown (this helps indicate to the user which rows were hidden) - Linking the fund owner to their patron record - Linking the fund id, given the correct permissions, to the view of all funds for that budget (the best alternative to linking to a view of the fund details, which we do not have). - Correcting permission level required to add a budget --- acqui/acqui-home.pl | 5 +- .../prog/en/modules/acqui/acqui-home.tt | 154 ++++++++++++-------- 2 files changed, 93 insertions(+), 66 deletions(-) --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -102,8 +102,9 @@ foreach my $budget ( @{$budget_arr} ) { my $member = GetMember( borrowernumber => $budget->{budget_owner_id} ); if ($member) { - $budget->{budget_owner} = - $member->{'firstname'} . ' ' . $member->{'surname'}; + $budget->{budget_owner_firstname} = $member->{'firstname'}; + $budget->{budget_owner_surname} = $member->{'surname'}; + $budget->{budget_owner_borrowernumber} = $member->{'borrowernumber'}; } if ( !defined $budget->{budget_amount} ) { --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -11,19 +11,21 @@ dt_overwrite_html_sorting_localeCompare(); $(document).ready(function() { + + var inactive = $(".b_inactive,.bu_active"); + var active = $(".bu_inactive"); + inactive.hide(); + active.show(); + $('#showallbudgets').click(function() { - if ( $('#showallbudgets:checked').val() !== undefined) { - $('.b_inactive').show(); - $('#b_inactive').show(); - $('.bu_active').show(); - $('.bu_inactive').hide(); - } - else { - $('.b_inactive').hide(); - $('#b_inactive').hide(); - $('.bu_inactive').show(); - $('.bu_active').hide(); - } + if ( $('#showallbudgets:checked').val() !== undefined) { + inactive.show(); + active.hide(); + } + else { + inactive.hide(); + active.show(); + } }); var srlt = $("#accounts").dataTable($.extend(true, {}, dataTablesDefaults, { "aoColumns": [ @@ -31,13 +33,15 @@ $(document).ready(function() { null, null, null, + null, + null, { "sType": "num-html" }, { "sType": "num-html" }, - null, + null ], 'bPaginate': false, 'bFilter': false, - 'bInfo': false, + 'bInfo': false } ) ); }); //]]> @@ -59,18 +63,16 @@ $(document).ready(function() { [% INCLUDE 'acquisitions-toolbar.inc' %]

Acquisitions

-
-
-
- [% UNLESS ( loop_budget ) %] - [% IF ( CAN_user_parameters ) %] + [% IF ( CAN_user_acquisition_period_manage ) %]
You must define a budget in Administration
[% ELSE %]
Your administrator must define a budget in Administration
[% END %] [% END %] - +
+
+
Manage orders
@@ -80,20 +82,22 @@ $(document).ready(function() {
- -[% IF ( suggestion ) %][% IF ( suggestions_count ) %] -
-
- Pending suggestions -

[% suggestions_count %] suggestions waiting. Manage suggestions.

-
-
[% END %][% END %] -
+[% IF ( suggestion && suggestions_count ) %]
+
+
+ Pending suggestions +

[% suggestions_count %] suggestions waiting. Manage suggestions.

+
+
+
+[% END %] + +
- [% IF ( loop_budget ) %] +[% IF ( loop_budget ) %]

All available funds[% IF ( branchname ) %] for [% branchname %] library[% END %]

@@ -103,10 +107,13 @@ $(document).ready(function() {
+

+ + @@ -119,53 +126,72 @@ $(document).ready(function() { + - - - - + + + + + [% FOREACH loop_budge IN loop_budget %] - [% IF ( loop_budge.budget_period_active ) %] - [% IF ( loop.odd ) %] - - [% ELSE %] - - [% END %] - - - - - - - + [% IF ( loop_budge.budget_period_active ) %] + + + + + + + + + + + + [% ELSE %] + + + + + + + + + + - [% ELSE %] - [% IF ( loop.odd ) %] - - [% ELSE %] - - [% END %] - - - - - - - - [% END %] + [% END %] [% END %]
FundFund nameActive Owner Library Amount
Total     [% total_active %][% totordered_active %][% totspent_active %][% totavail_active %] [% total %][% total_active %][% totordered %][% totordered_active %][% totspent %][% totspent_active %][% totavail %][% totavail_active %]
[% loop_budge.budget_code %][% loop_budge.budget_owner %][% loop_budge.budget_branchname %][% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_avail %]
+ [% IF ( CAN_user_acquisition_budget_manage ) %] + [% loop_budge.budget_code %] + [% ELSE %] + [% loop_budge.budget_code %] + [% END %] + [% loop_budge.budget_name %]Active[% IF ( loop_budge.budget_owner_borrowernumber ) %] + [% loop_budge.budget_owner_surname %], [% loop_budge.budget_owner_firstname %] + [% ELSE %] +   + [% END %] + [% loop_budge.budget_branchname %][% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_avail %]
+ [% IF ( CAN_user_acquisition_budget_manage ) %] + [% loop_budge.budget_code %] + [% ELSE %] + [% loop_budge.budget_code %] + [% END %] + [% loop_budge.budget_name %]Inactive[% IF ( loop_budge.budget_owner_borrowernumber ) %] + [% loop_budge.budget_owner_surname %], [% loop_budge.budget_owner_firstname %] + [% ELSE %] +   + [% END %] + [% loop_budge.budget_branchname %][% loop_budge.budget_amount %][% loop_budge.budget_ordered %][% loop_budge.budget_spent %][% loop_budge.budget_avail %]
-
Show all :  +
[% END %] -
-
[% INCLUDE 'acquisitions-menu.inc' %]
--