Bug 12214: (follow-up) Clean up reports-toolbar.inc, show Edit link when SQL has...
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / includes / reports-toolbar.inc
1 <div id="toolbar" class="btn-toolbar">
2     [% IF ( CAN_user_reports_create_reports ) %]
3         <div class="btn-group">
4             <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New report <span class="caret"></span></button>
5             <ul class="dropdown-menu">
6                 <li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>
7                 <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
8             </ul>
9         </div>
10     [% END %]
11
12     [% IF ( showsql || execute || editsql || save_successful ) %]
13         [% UNLESS ( editsql ) # Do not show edit button on edit page %]
14             [% IF ( CAN_user_reports_create_reports ) %]
15                 <div class="btn-group">
16                     <a id="editreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Edit%20SQL">
17                         <i class="icon-pencil"></i> Edit
18                     </a>
19                 </div>
20             [% END %]
21         [% END %]
22
23         [% UNLESS ( errors ) # Unless there are errors saving a report %]
24             <div class="btn-group">
25                 <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
26                     <i class="icon-play"></i> Run report
27                 </a>
28             </div>
29         [% END %]
30     [% END %]
31 </div>