Koha/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc
Josef Moravec 804677265e Bug 16239: Update templates
Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
2017-01-13 14:41:22 +00:00

71 lines
3.7 KiB
HTML

<div id="toolbar" class="btn-toolbar">
[% IF ( CAN_user_reports_create_reports ) %]
<div class="btn-group">
<button class="btn btn-default btn-sm 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 ) %]
[% IF ( CAN_user_reports_create_reports ) %]
[% UNLESS ( editsql ) # Do not show edit button on edit page %]
<div class="btn-group">
<a id="editreport" class="btn btn-default btn-sm" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Edit%20SQL">
<i class="fa fa-pencil"></i> Edit
</a>
</div>
[% END %]
<div class="btn-group">
<a class="btn btn-default btn-sm" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% original_sql || sql |uri %]&amp;reportname=[% reportname |uri %]&amp;notes=[% notes |uri %]">
<i class="fa fa-copy"></i> Duplicate
</a>
</div>
[% END %]
[% IF ( CAN_user_reports_delete_reports ) %]
<div class="btn-group">
<a class="delete btn btn-default btn-sm" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved">
<i class="fa fa-trash"></i> Delete
</a>
</div>
[% END %]
[% UNLESS ( errors ) # Unless there are errors saving a report %]
<div class="btn-group">
<a id="runreport" class="btn btn-default btn-sm" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
<i class="fa fa-play"></i> Run report
</a>
</div>
<div class="btn-group">
<a class="btn btn-default btn-sm" href="/cgi-bin/koha/tools/scheduler.pl?id=[% id %]">
<i class="fa fa-clock-o"></i> Schedule
</a>
</div>
[% END %]
[% IF ( execute ) %]
<div class="btn-group">
<button class="btn btn-default btn-sm dropdown-toggle" data-toggle="dropdown" id="format"><i class="fa fa-upload"></i> Download <span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a id="csv" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=csv&amp;sql=[% sql |uri %]&amp;reportname=[% name |uri %]">Comma separated text</a></li>
<li><a id="tab" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=tab&amp;sql=[% sql |uri %]&amp;reportname=[% name |uri %]">Tab separated text</a></li>
<li><a id="ods" href="/cgi-bin/koha/reports/guided_reports.pl?reports=1&phase=Export&amp;format=ods&amp;sql=[% sql |uri %]&amp;reportname=[% name |uri %]">Open Document Spreadsheet</a></li>
</ul>
</div>
[% END %]
[% END %]
</div>
<script type="text/javascript">
var MSG_CONFIRM_DELETE = _("Are you sure you want to delete this report? This cannot be undone.");
$(document).ready(function(){
$(".delete").on("click",function(){
return confirmDelete(MSG_CONFIRM_DELETE);
});
});
</script>