@@ -, +, @@ --- C4/Budgets.pm | 10 +++++- acqui/acqui-home.pl | 36 ++++++++++++---------- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 34 ++++++++++++++++++++ .../prog/en/includes/onboardinginclude1.inc | 21 +++---------- .../prog/en/includes/onboardinginclude2.inc | 19 ++---------- .../prog/en/includes/onboardinginclude3.inc | 21 ++----------- .../prog/en/modules/acqui/acqui-home.tt | 24 +-------------- .../prog/en/modules/admin/aqbudgetperiods.tt | 2 +- 8 files changed, 74 insertions(+), 93 deletions(-) --- a/C4/Budgets.pm +++ a/C4/Budgets.pm @@ -148,9 +148,17 @@ sub GetPeriodsCount { # ------------------------------------------------------------------- +=head2 GetHighestBudgetPeriod + + &my $budgetid = C4::Budgets->GetHighestBudgetPeriod(); + +Retrieve the highest budget + +=cut + sub GetHighestBudgetPeriod{ my $dbh = C4::Context->dbh; - warn my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods"); + my $data = $dbh->selectrow_array("SELECT MAX(budget_period_id) FROM aqbudgetperiods"); return $data; } # ------------------------------------------------------------------- --- a/acqui/acqui-home.pl +++ a/acqui/acqui-home.pl @@ -53,6 +53,7 @@ my ( $template, $loggedinuser, $cookie, $userflags ) = get_template_and_user( my $status = $query->param('status') || "ASKED"; my $suggestions_count = CountSuggestion($status); +my $userid = $query->param('userid'); my $budget_arr = GetBudgetHierarchy; @@ -124,11 +125,6 @@ $template->param( suggestions_count => $suggestions_count, ); - - - - - my $aqstep; my $cur = Koha::Acquisition::Currencies->get_active; @@ -141,18 +137,24 @@ if ( $cur ) { my $budget = GetPeriodsCount(); my $budgetid = C4::Budgets->GetHighestBudgetPeriod(); if (!@budget_loop){ -if (!$cur) { - $aqstep = 1; - $template->param( step => $aqstep ); -} elsif ($budget && $budgetid == 1){ - $aqstep = 3; - $template->param( step => $aqstep ); -} elsif ($budgetid > 1) { - print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl"); - exit; -} else { - $aqstep = 2; - $template->param( step => $aqstep ); + if (!$cur) { + $aqstep = 1; + $template->param( step => $aqstep ); + } elsif ($budget && $budgetid == 1){ + $aqstep = 3; + $template->param( step => $aqstep ); + } elsif ($budgetid > 1) { + print $query->redirect("/cgi-bin/koha/admin/aqbudgetperiods.pl"); + exit; + } else { + $aqstep = 2; + $template->param( step => $aqstep ); + } } + +if ( C4::Context->IsSuperLibrarian() ) { + my $displayonboard = 1; + $template->param( displayonboard => $displayonboard ); } + output_html_with_http_headers $query, $cookie, $template->output; --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3034,3 +3034,37 @@ div#aqhelp{ padding:20px; width:50%; } + +#onboardingModal{ + z-index:1; + background-color:#EDF4F6; + padding: .2em 0; + width: 32%; + float:right; + position:relative; + top: 10px; + padding-left:10px; + padding-right:10px; + border-radius:10px; +} + +#acqui-onboard{ + text-align: center; + padding-bottom:15px; +} + +#currency_code_onboard{ + width:40%; +} + +#budget_period_description_onboard{ + width:55%; +} + +#budget_name_onboard{ + width:55%; +} + +#budget_code_onboard{ + width:55%; +} --- a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/onboardinginclude1.inc @@ -1,21 +1,8 @@ - -
Start by completing this form to create a currency which you will be used to create your first budget and fund.
+
Start by completing this form to create a currency which you will use to create your first budget and fund.
A fund is the accounting value you use to create orders