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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-15 / +29 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-37 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
        [% 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="fa fa-pencil"></i> Edit
18
                    </a>
19
                </div>
20
            [% END %]
21
        [% END %]
22
13
23
        [% IF ( CAN_user_reports_create_reports ) %]
14
        [% IF ( CAN_user_reports_create_reports ) %]
24
            <div class="btn-group">
15
            <div class="btn-group">
25
                <a class="confirmdelete btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&phase=Delete%20Saved">
16
                <button data-toggle="dropdown" class="btn btn-small dropdown-toggle"><i class="fa fa-pencil"></i> Edit <span class="caret"></span></button>
26
                    <i class="fa fa-remove"></i> Delete
17
                    <ul class="dropdown-menu">
27
                </a>
18
                            <li>
19
                                <a id="editreport" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Edit%20SQL">
20
                                    <i class="fa fa-fw fa-pencil"></i> Edit
21
                                </a>
22
                            </li>
23
                            <li>
24
                                <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>
25
                            </li>
26
                            <li>
27
                                <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>
28
                            </li>
29
                    </ul>
30
            </div>
31
        [% END %]
32
33
        [% IF ( CAN_user_tools_schedule_tasks ) %]
34
            <div class="btn-group">
35
                <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>
36
            </div>
37
        [% END %]
38
39
        [% IF ( save_successful ) %]
40
            <div class="btn-group">
41
                <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>
28
            </div>
42
            </div>
29
        [% END %]
43
        [% END %]
30
44
31
        [% UNLESS ( errors ) # Unless there are errors saving a report %]
45
        [% UNLESS ( errors ) # Unless there are errors saving a report %]
32
            <div class="btn-group">
46
            <div class="btn-group">
33
                <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
47
                <a id="runreport" class="btn btn-small" href="/cgi-bin/koha/reports/guided_reports.pl?reports=[% id %]&amp;phase=Run%20this%20report">
34
                    <i class="fa fa-play"></i> Run report
48
                    <i class="fa fa-fw fa-play"></i> Run report
35
                </a>
49
                </a>
36
            </div>
50
            </div>
37
        [% END %]
51
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt (-3 / +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>
252
- 

Return to bug 16000