404a11a9a5
Currently, if you are editing or viewing the results of running a report and you decide you want to delete it, you have to go back to the list of saved reports to do so. This patch adds a "Delete" link in some convenient places. To test: - Apply the patch - Make sure you have at least one saved report - Make sure you have the create_reports permission - Go to the Show, Edit and Run screens and verify the Delete link is present and functional, including the JavaScript confirmation dialogue - Change to a user without the create_reports permission and check that the Delete link is not displayed on the Show, Edit and Run screens - Sign ye off merrily! Version 2: This version makes sure the JavaScript confirmation is shown before an actual delete is carried out. Signed-off-by: Heather Braum <hbraum@nekls.org> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
39 lines
1.9 KiB
HTML
39 lines
1.9 KiB
HTML
<div id="toolbar" class="btn-toolbar">
|
|
[% IF ( CAN_user_reports_create_reports ) %]
|
|
<div class="btn-group">
|
|
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New report <span class="caret"></span></button>
|
|
<ul class="dropdown-menu">
|
|
<li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>
|
|
<li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
|
|
</ul>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% IF ( showsql || execute || editsql || save_successful ) %]
|
|
[% UNLESS ( editsql ) # Do not show edit button on edit page %]
|
|
[% IF ( CAN_user_reports_create_reports ) %]
|
|
<div class="btn-group">
|
|
<a id="editreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL">
|
|
<i class="fa fa-pencil"></i> Edit
|
|
</a>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% IF ( CAN_user_reports_create_reports ) %]
|
|
<div class="btn-group">
|
|
<a class="confirmdelete btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved">
|
|
<i class="fa fa-remove"></i> Delete
|
|
</a>
|
|
</div>
|
|
[% END %]
|
|
|
|
[% UNLESS ( errors ) # Unless there are errors saving a report %]
|
|
<div class="btn-group">
|
|
<a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report">
|
|
<i class="fa fa-play"></i> Run report
|
|
</a>
|
|
</div>
|
|
[% END %]
|
|
[% END %]
|
|
</div>
|