Bug 38414: (QA follow-up) Adjust templates
Now that we can explicitly list reports with any one of the permissions we need to adjust some displays to ensure we can get to the list view. Additionally I change 'Use saved' to 'View saved' since we may not be able to run. I also fix the action buttons to show 'View' instead of 'Run' if user cannot execute. I adjust reports home to check if the user can use report plugins before showing that link as well Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
56d32231b2
commit
cdd7438ef6
|
|
@ -1,8 +1,8 @@
|
|||
[% USE Koha %]
|
||||
<div id="guided-reports-view-menu" class="sidebar_menu">
|
||||
<h5>Run reports</h5>
|
||||
<h5>View reports</h5>
|
||||
<ul>
|
||||
[% IF ( CAN_user_reports_execute_reports ) %]<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=list">Saved reports</a></li>[% END %]
|
||||
[% IF ( CAN_user_reports_execute_reports || CAN_user_reports_create_reports || CAN_user_reports_delete_reports ) %]<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=list">Saved reports</a></li>[% END %]
|
||||
</ul>
|
||||
<h5>Reports dictionary</h5>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=add_form">Build new</a></li>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_reports_execute_reports ) %]
|
||||
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=list">Use saved</a></li>
|
||||
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=list">View saved</a></li>
|
||||
[% END %]
|
||||
[% IF ( CAN_user_reports_create_reports ) %]
|
||||
<li><a href="/cgi-bin/koha/reports/guided_reports.pl?op=add_form_sql">Create from SQL</a></li>
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@
|
|||
[% END %]
|
||||
|
||||
[% IF ( CAN_user_reports_execute_reports ) %]
|
||||
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=list" class="btn btn-primary">Use saved</a>
|
||||
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=list" class="btn btn-primary">View saved</a>
|
||||
[% END %]
|
||||
|
||||
[% IF ( CAN_user_reports_create_reports ) %]
|
||||
|
|
@ -407,13 +407,14 @@
|
|||
<td>
|
||||
<div class="btn-group dropup">
|
||||
[%# There should be no space between these two buttons, it would render badly %]
|
||||
[% INCLUDE 'throttled-button.inc' element_type='link' href='/cgi-bin/koha/reports/guided_reports.pl?id=' _ savedreport.id _ '&op=run' classes='btn btn-default btn-xs' label=t('Run') attrs={ role => 'button' } %]<a
|
||||
class="btn btn-default btn-xs dropdown-toggle"
|
||||
id="reportactions[% savedreport.id | html %]"
|
||||
role="button"
|
||||
data-bs-toggle="dropdown"
|
||||
href="#"
|
||||
></a>
|
||||
[%- IF ( CAN_user_reports_execute_reports ) -%]
|
||||
[% INCLUDE 'throttled-button.inc' element_type='link' href='/cgi-bin/koha/reports/guided_reports.pl?id=' _ savedreport.id _ '&op=run' classes='btn btn-default btn-xs' label=t('Run') attrs={ role => 'button' } %]
|
||||
[%- ELSE -%]
|
||||
<a class="btn btn-default btn-xs" href="/cgi-bin/koha/reports/guided_reports.pl?id=[% savedreport.id | uri %]&op=show">
|
||||
<i class="fa fa-search" aria-hidden="true"></i> View
|
||||
</a>
|
||||
[% END -%]
|
||||
[%- "" |$raw %]<a class="btn btn-default btn-xs dropdown-toggle" id="reportactions[% savedreport.id | html %]" role="button" data-bs-toggle="dropdown" href="#"></a>
|
||||
<ul class="dropdown-menu" role="menu" aria-labelledby="reportactions[% savedreport.id | html %]">
|
||||
<li
|
||||
><a class="dropdown-item" href="/cgi-bin/koha/reports/guided_reports.pl?id=[% savedreport.id | uri %]&op=show"
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@
|
|||
<h1>Reports</h1>
|
||||
<div class="row">
|
||||
<div class="col-6">
|
||||
[% IF ( CAN_user_reports_execute_reports || CAN_user_reports_create_reports ) %]
|
||||
[% IF ( CAN_user_reports_execute_reports || CAN_user_reports_create_reports || CAN_user_reports_delete_reports ) %]
|
||||
<fieldset class="brief">
|
||||
<h2>Guided reports</h2>
|
||||
[% IF ( CAN_user_reports_create_reports ) %]
|
||||
|
|
@ -44,7 +44,7 @@
|
|||
</p>
|
||||
[% END %]
|
||||
<p>
|
||||
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=list"><i class="fa fa-list"></i> Use saved</a>
|
||||
<a href="/cgi-bin/koha/reports/guided_reports.pl?op=list"><i class="fa fa-list"></i> View saved</a>
|
||||
</p>
|
||||
<form action="/cgi-bin/koha/reports/guided_reports.pl" method="get">
|
||||
<input name="op" value="list" type="hidden" />
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
</ul>
|
||||
</div>
|
||||
|
||||
[% IF plugins_enabled %]
|
||||
[% IF ( plugins_enabled && CAN_user_plugins_report ) %]
|
||||
<div class="rep_plugins">
|
||||
<h2>Report plugins</h2>
|
||||
<ul>
|
||||
|
|
|
|||
Loading…
Reference in New Issue