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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-toolbar.inc (-2 / +2 lines)
Lines 59-66 Link Here
59
                            <a href="#">[% c.message | html %] ([% c.nb | html %])</a>
59
                            <a href="#">[% c.message | html %] ([% c.nb | html %])</a>
60
                        </li>
60
                        </li>
61
                    [% END %]
61
                    [% END %]
62
                    <li role="separator" class="divider"></li>
62
                    <li role="separator" class="divider mana-comment-divider"></li>
63
                    <li class="mana-other-comment"><a href="#">Other</a> </li>
63
                    <li class="mana-other-comment"><a href="#">New</a> </li>
64
                </ul>
64
                </ul>
65
            </div>
65
            </div>
66
66
(-)a/reports/guided_reports.pl (-7 / +16 lines)
Lines 93-98 elsif ($session and not $input->param('clear_filters')) { Link Here
93
93
94
my $op = $input->param('op') || q||;
94
my $op = $input->param('op') || q||;
95
95
96
if ( $phase eq 'Show SQL' || $phase eq 'Edit SQL' || $phase eq 'Run this report') {
97
98
    my $id = $input->param('reports');
99
    my $report = Koha::Reports->find($id);
100
    if ( C4::Context->preference('Mana') == 1 && $report->mana_id ) {
101
        my $comments = Koha::SharedContent::get_entity_comments(
102
            'report', $report->mana_id
103
        );
104
        $template->param( 'mana_comments' => $comments );
105
    }
106
}
107
96
my @errors = ();
108
my @errors = ();
97
if ( !$phase ) {
109
if ( !$phase ) {
98
    $template->param( 'start' => 1 );
110
    $template->param( 'start' => 1 );
Lines 173-179 elsif ( $phase eq 'Delete Saved') { Link Here
173
}		
185
}		
174
186
175
elsif ( $phase eq 'Show SQL'){
187
elsif ( $phase eq 'Show SQL'){
176
	
188
177
    my $id = $input->param('reports');
189
    my $id = $input->param('reports');
178
    my $report = Koha::Reports->find($id);
190
    my $report = Koha::Reports->find($id);
179
    $template->param(
191
    $template->param(
Lines 182-191 elsif ( $phase eq 'Show SQL'){ Link Here
182
        'notes'      => $report->notes,
194
        'notes'      => $report->notes,
183
        'sql'     => $report->savedsql,
195
        'sql'     => $report->savedsql,
184
        'showsql' => 1,
196
        'showsql' => 1,
185
        'mana_success' => $input->param('mana_success'),
186
        'mana_success' => scalar $input->param('mana_success'),
197
        'mana_success' => scalar $input->param('mana_success'),
187
        'mana_id' => $report->{mana_id},
198
        'mana_id' => $report->mana_id,
188
        'mana_comments' => $report->{comments}
189
    );
199
    );
190
}
200
}
191
201
Lines 204-211 elsif ( $phase eq 'Edit SQL'){ Link Here
204
        'public' => $report->public,
214
        'public' => $report->public,
205
        'usecache' => $usecache,
215
        'usecache' => $usecache,
206
        'editsql'    => 1,
216
        'editsql'    => 1,
207
        'mana_id' => $report->{mana_id},
217
        'mana_id' => $report->mana_id,
208
        'mana_comments' => $report->{comments}
209
    );
218
    );
210
}
219
}
211
220
Lines 710-715 elsif ($phase eq 'Run this report'){ Link Here
710
        $sql   = $original_sql = $report->savedsql;
719
        $sql   = $original_sql = $report->savedsql;
711
        $name  = $report->report_name;
720
        $name  = $report->report_name;
712
        $notes = $report->notes;
721
        $notes = $report->notes;
722
        $template->param( mana_id => $report->mana_id );
713
723
714
        my @rows = ();
724
        my @rows = ();
715
        my @allrows = ();
725
        my @allrows = ();
716
- 

Return to bug 22193