Koha/koha-tmpl/intranet-tmpl/prog/en/includes/budgets-admin-toolbar.inc
Jonathan Druart 9c5b819100 Bug 15009: QA follow-up
This patch adds a test to check the unicity of auth cats, simplify
the GetBudgetAuthCats subroutine and make it return an arrayref of scalar
instead of an arrayref of hashref with only 1 key.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2016-04-29 13:00:21 +00:00

61 lines
3.4 KiB
HTML

<div id="toolbar" class="btn-toolbar">
[% IF ( budget_period_id ) %]
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form">New budget</a></li>
[% IF ( budget_period_locked || !CAN_user_acquisition_budget_add_del ) %]
<li class="disabled">
[% ELSE %]
<li>
[% END %]
<a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&amp;budget_period_id=[% budget_period_id %]">New fund for [% budget_period_description %]</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form&amp;budget_period_id=[% budget_period_id %]">Edit budget [% budget_period_description %]</a></li>
<li><a href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=duplicate_form&amp;budget_period_id=[% budget_period_id %]">Duplicate budget [% budget_period_description %]</a></li>
</ul>
</div>
<div class="btn-group">
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-pencil"></i> Planning <span class="caret"></span></button>
<ul class="dropdown-menu">
[% IF ( CAN_user_acquisition_planning_manage ) %]
<li>
[% ELSE %]
<li class="disabled">
[% END %]
<a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&amp;authcat=MONTHS">Plan by months</a></li>
[% IF ( CAN_user_acquisition_planning_manage ) %]
<li>
[% ELSE %]
<li class="disabled">
[% END %]
<a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&amp;authcat=BRANCHES">Plan by libraries</a></li>
[% IF ( CAN_user_acquisition_planning_manage ) %]
<li>
[% ELSE %]
<li class="disabled">
[% END %]
<a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&amp;authcat=ITEMTYPES">Plan by item types</a></li>
[% FOREACH auth_cats_loo IN auth_cats_loop %]
[% IF ( CAN_user_acquisition_planning_manage ) %]
<li>
[% ELSE %]
<li class="disabled">
[% END %]
<a href="/cgi-bin/koha/admin/aqplan.pl?budget_period_id=[% budget_period_id %]&amp;authcat=[% auth_cats_loo %]">Plan by [% auth_cats_loo %]</a>
</li>
[% END %]
</ul>
</div>
[% ELSE %]
<div class="btn-group"><a class="btn btn-small" id="newrootbudget" href="/cgi-bin/koha/admin/aqbudgetperiods.pl?op=add_form"><i class="fa fa-plus"></i> New budget</a></div>
[% END %]
</div>