View | Details | Raw Unified | Return to bug 16000
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-17 / +25 lines)
Lines 1-7 Link Here
1
<div id="toolbar" class="btn-toolbar">
1
<div id="toolbar" class="btn-toolbar">
2
    [% IF ( CAN_user_reports_create_reports ) %]
2
    [% IF ( CAN_user_reports_create_reports ) %]
3
        <div class="btn-group">
3
        <div class="btn-group">
4
            <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus"></i> New report <span class="caret"></span></button>
4
            <button class="btn btn-small dropdown-toggle" data-toggle="dropdown"><i class="fa fa-fw fa-plus"></i> New report <span class="caret"></span></button>
5
            <ul class="dropdown-menu">
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>
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>
7
                <li id="newsql"><a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create%20report%20from%20SQL">New SQL report</a> </li>
Lines 9-42 Link Here
9
        </div>
9
        </div>
10
    [% END %]
10
    [% END %]
11
11
12
    [% IF ( showsql || execute || editsql || save_successful ) %]
12
    [% IF ( showsql || execute || save_successful ) %]
13
        [% IF ( CAN_user_reports_create_reports ) %]
13
        [% IF ( CAN_user_reports_create_reports ) %]
14
            [% UNLESS ( editsql ) # Do not show edit button on edit page %]
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="fa fa-pencil"></i> Edit
18
                    </a>
19
                </div>
20
            [% END %]
21
            <div class="btn-group">
14
            <div class="btn-group">
22
                <a class="btn btn-small" title="Duplicate this saved report" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% sql %]&amp;reportname=[% reportname %]&amp;notes=[% notes %]">
15
                <button data-toggle="dropdown" class="btn btn-small dropdown-toggle"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button>
23
                    <i class="fa fa-copy"></i> Duplicate
16
                    <ul class="dropdown-menu">
24
                </a>
17
                            <li>
18
                                <a id="editreport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Edit%20SQL">
19
                                    <i class="fa fa-fw fa-pencil"></i> Edit
20
                                </a>
21
                            </li>
22
                            <li>
23
                                <a id="duplicatereport" href="/cgi-bin/koha/reports/guided_reports.pl?phase=Create report from SQL&amp;sql=[% sql |uri %]&amp;reportname=[% reportname |uri %]&amp;notes=[% notes |uri %]"><i class="fa fa-fw fa-copy"></i> Duplicate</a>
24
                            </li>
25
                            <li>
26
                                <a id="deletereport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Delete%20Saved"><i class="fa fa-fw fa-trash"></i> Delete</a>
27
                            </li>
28
                    </ul>
25
            </div>
29
            </div>
26
        [% END %]
30
        [% END %]
27
31
28
        [% IF ( CAN_user_reports_create_reports ) %]
32
        [% IF ( CAN_user_tools_schedule_tasks ) %]
29
            <div class="btn-group">
33
            <div class="btn-group">
30
                <a class="confirmdelete btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved">
34
                <a id="schedulereport" class="btn btn-small" href="/cgi-bin/koha/tools/scheduler.pl?id=[% id %]"><i class="fa fa-clock-o"></i> Schedule</a>
31
                    <i class="fa fa-remove"></i> Delete
35
            </div>
32
                </a>
36
        [% END %]
37
38
        [% IF ( save_successful ) %]
39
            <div class="btn-group">
40
                <a id="showreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Show%20SQL"><i class="fa fa-fw fa-search"></i> Show</a>
33
            </div>
41
            </div>
34
        [% END %]
42
        [% END %]
35
43
36
        [% UNLESS ( errors ) # Unless there are errors saving a report %]
44
        [% UNLESS ( errors ) # Unless there are errors saving a report %]
37
            <div class="btn-group">
45
            <div class="btn-group">
38
                <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
46
                <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
39
                    <i class="fa fa-play"></i> Run report
47
                    <i class="fa fa-fw fa-play"></i> Run report
40
                </a>
48
                </a>
41
            </div>
49
            </div>
42
            <div class="btn-group">
50
            <div class="btn-group">
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-2 / +16 lines)
Lines 167-172 $(document).ready(function(){ Link Here
167
        }
167
        }
168
    });
168
    });
169
169
170
    $("#deletereport").on("click",function(){
171
        $(".btn-group").removeClass("open");
172
        if(confirm(_("Are you sure you want to delete this saved report?"))){
173
            return true;
174
        } else {
175
            return false;
176
        }
177
    });
178
170
[% IF (create || editsql || save) %]
179
[% IF (create || editsql || save) %]
171
    $("#select_group").change(function() {
180
    $("#select_group").change(function() {
172
        if($(this).attr('checked')) {
181
        if($(this).attr('checked')) {
Lines 230-236 $(document).ready(function(){ Link Here
230
[% ELSIF ( showsql ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; SQL view
239
[% ELSIF ( showsql ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; SQL view
231
[% ELSIF ( editsql ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; Edit SQL report
240
[% ELSIF ( editsql ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; Edit SQL report
232
[% ELSIF ( execute ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; <em>[% name %]</em> Report
241
[% ELSIF ( execute ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; <em>[% name %]</em> Report
233
[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]&rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a>
242
[% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]
243
    [% guided = 1 %]
244
    &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a>
234
    [% IF ( build1 ) %]&rsaquo; Step 1 of 6: Choose a module
245
    [% IF ( build1 ) %]&rsaquo; Step 1 of 6: Choose a module
235
    [% ELSIF ( build2 ) %]&rsaquo; Step 2 of 6: Pick a report type
246
    [% ELSIF ( build2 ) %]&rsaquo; Step 2 of 6: Pick a report type
236
    [% ELSIF ( build3 ) %]&rsaquo; Step 3 of 6: Select columns for display
247
    [% ELSIF ( build3 ) %]&rsaquo; Step 3 of 6: Select columns for display
Lines 245-251 $(document).ready(function(){ Link Here
245
<div id="bd">
256
<div id="bd">
246
<div id="yui-main">
257
<div id="yui-main">
247
    <div class="yui-b">
258
    <div class="yui-b">
248
    [% INCLUDE "reports-toolbar.inc" %]
259
260
    [% UNLESS ( editsql || create || enter_params || guided || save ) %]
261
        [% INCLUDE "reports-toolbar.inc" %]
262
    [% END %]
249
263
250
[% IF ( start ) %]
264
[% IF ( start ) %]
251
    <h2>Guided reports</h2>
265
    <h2>Guided reports</h2>
(-)a/reports/guided_reports.pl (-1 / +1 lines)
Lines 240-245 elsif ( $phase eq 'Update SQL'){ Link Here
240
            $template->param(
240
            $template->param(
241
                'save_successful'       => 1,
241
                'save_successful'       => 1,
242
                'reportname'            => $reportname,
242
                'reportname'            => $reportname,
243
                'sql'                   => $sql,
243
                'id'                    => $id,
244
                'id'                    => $id,
244
            );
245
            );
245
            logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
246
            logaction( "REPORTS", "MODIFY", $id, "$reportname | $sql" ) if C4::Context->preference("ReportsLog");
246
- 

Return to bug 16000