|
Lines 1-44
Link Here
|
| 1 |
[% UNLESS ( no_add ) %] |
1 |
<div id="toolbar" class="btn-toolbar"> |
| 2 |
<div id="toolbar"> |
2 |
[% IF ( CAN_user_reports_create_reports ) %]<div class="btn-group"> |
| 3 |
<script type="text/javascript"> |
3 |
<button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="icon-plus"></i> New report <span class="caret"></span></button> |
| 4 |
//<![CDATA[ |
4 |
<ul class="dropdown-menu"> |
| 5 |
$(document).ready(function() { |
5 |
<li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li> |
| 6 |
$("#newmenuc").empty(); |
6 |
<li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li> |
| 7 |
$("#newsql").remove(); |
7 |
</ul> |
| 8 |
yuiToolbar(); |
8 |
</div>[% END %] |
| 9 |
}); |
9 |
[% IF ( showsql || execute || editsql || save_successful ) %]xx |
| 10 |
|
10 |
[% UNLESS ( errors ) %][%# Unless there are errors saving a report %] |
| 11 |
// YUI Toolbar Functions |
11 |
[% UNLESS ( editsql ) %][%# Do not show edit button on edit page %] |
| 12 |
function yuiToolbar() { |
12 |
[% 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="icon-pencil"></i> Edit</a></div>[% END %] |
| 13 |
[% IF ( CAN_user_reports_create_reports ) %] |
13 |
[% END %] |
| 14 |
var newmenu = [ |
14 |
<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="icon-play"></i> Run report</a></div> |
| 15 |
{ text: _("Guided report"), url: "/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new" }, |
15 |
[% END %] |
| 16 |
{ text: _("SQL report"), url: "/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL" } |
16 |
[% END %] |
| 17 |
] |
|
|
| 18 |
new YAHOO.widget.Button({ |
| 19 |
type: "menu", |
| 20 |
label: _("New"), |
| 21 |
name: "newmenubutton", |
| 22 |
menu: newmenu, |
| 23 |
container: "newmenuc" |
| 24 |
}); |
| 25 |
new YAHOO.widget.Button("editreport");[% END %] |
| 26 |
new YAHOO.widget.Button("runreport"); |
| 27 |
} |
| 28 |
//]]> |
| 29 |
</script> |
| 30 |
|
| 31 |
<ul class="toolbar"> |
| 32 |
[% IF ( CAN_user_reports_create_reports ) %]<li id="newmenuc"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">New guided report</a> </li>[% END %] |
| 33 |
<li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li> |
| 34 |
[% IF ( showsql || execute || editsql || save_successful ) %] |
| 35 |
[% UNLESS ( errors ) %][%# Unless there are errors saving a report %] |
| 36 |
[% UNLESS ( editsql ) %][%# Do not show edit button on edit page %] |
| 37 |
[% IF ( CAN_user_reports_create_reports ) %]<li><a id="editreport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Edit%20SQL">Edit</a></li>[% END %] |
| 38 |
[% END %] |
| 39 |
<li><a id="runreport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Run%20this%20report">Run report</a></li> |
| 40 |
[% END %] |
| 41 |
[% END %] |
| 42 |
</ul> |
| 43 |
</div> |
17 |
</div> |
| 44 |
[% END %] |
|
|
| 45 |
- |