@@ -, +, @@ order --- acqui/acqui-home.pl | 9 ++++ admin/aqbudgetperiods.pl | 4 +- .../prog/en/includes/onboardinginclude.inc | 57 +++------------------- .../prog/en/includes/onboardinginclude2.inc | 57 ++++++++++++++++++++++ .../prog/en/modules/acqui/acqui-home.tt | 8 ++- 5 files changed, 81 insertions(+), 54 deletions(-) create mode 100644 koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -107,6 +107,15 @@ foreach my $budget ( @{$budget_arr} ) { push @budget_loop, $budget; } +my $budgets = GetBudgetPeriod(); +if ($budgets > 0) { + my $stepfund = 2; + $template->param( stepfund => $stepfund ); +}else{ + my $stepfund = 1; + $template->param( stepfund => $stepfund ); +} + $template->param( type => 'intranet', loop_budget => \@budget_loop, --- a/admin/aqbudgetperiods.pl +++ a/admin/aqbudgetperiods.pl @@ -120,7 +120,9 @@ elsif ( $op eq 'add_validate' ) { } else { # ELSE ITS AN ADD my $budget_period_id=AddBudgetPeriod($budget_period_hashref); - print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl?step=2"); + my $step= $input->param( 'step' ); + $template->param( step => $step); + print $input->redirect("/cgi-bin/koha/acqui/acqui-home.pl"); exit; } $op='else'; --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude.inc @@ -13,56 +13,14 @@ border-radius:25px; } -
- ×

+ ×

[% IF displayonboardscreen == "acquisitions" %] - [% IF step == 2 %] -
-
- [% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund - [% IF ( budget_period_description ) %] - [% budget_name %] for Budget '[% budget_period_description %]' - [% END %] - - - -
    - [% IF ( budget_parent_id ) %] -
  1. - Fund parent: - [% budget_parent_name %] - [% budget_parent_id %] - [% budget_parent_name %] - -
  2. - [% END %] - -
  3. - - -
  4. - -
  5. - - -
  6. - -
  7. - - -
  8. - -
    - Cancel - -
    - - - [% ELSE %]

    Create a budget

    +
    1. @@ -93,20 +51,17 @@
    -
    - + - Cancel
- [% END %] + [% ELSIF displayonboardscreen == "label" %] +

testing

-[% ELSIF displayonboardscreen == "label" %] -

testing

-[% END %] + [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude2.inc @@ -0,0 +1,57 @@ + + +
+
+
+ [% IF ( budget_id ) %]Modify[% ELSE %]Add[% END %] Fund + [% IF ( budget_period_description ) %] + [% budget_name %] for Budget '[% budget_period_description %]' + [% END %] + + + +
    + [% IF ( budget_parent_id ) %] +
  1. + Fund parent: + [% budget_parent_name %] + [% budget_parent_id %] - [% budget_parent_name %] + +
  2. + [% END %] +
  3. + + +
  4. + +
  5. + + +
  6. + +
  7. + + +
  8. + +
    + Cancel + +
    +
+
+
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/acqui-home.tt @@ -118,8 +118,12 @@ $(document).ready(function() { [% INCLUDE 'budgets-active-currency.inc' hide = 'yes' %] [% UNLESS ( loop_budget ) %] [% IF ( CAN_user_acquisition_period_manage ) %] - [% displayonboardscreen = "acquisitions" %] - [% INCLUDE onboardinginclude.inc %] + [% displayonboardscreen = "acquisitions" %] + [% IF stepfund == 1 %] + [% INCLUDE onboardinginclude.inc %] + [% ELSE %] + [% INCLUDE onboardinginclude2.inc %] + [% END %] [% ELSE %]
Your administrator must define a budget in Administration
[% END %] --