From 1310df3f6589358f6ec0b9ba1ee5b1b0ea061c23 Mon Sep 17 00:00:00 2001
From: Katrin Fischer <katrin.fischer.83@web.de>
Date: Mon, 21 Sep 2020 12:46:48 +0000
Subject: [PATCH] Bug 24834: Display report number on editing or running a
 report

The only place the report ID was shown when editing or running a
report was in the URL. With this patch, we also show it in the
heading, the breadcrumbs and the page title.

To test:
- Create a new SQL report.
- Save the report.
- Edit the report.
- Verify that the report id now shows in the breadcrumbs and page title.
- Run your report.
- Verify the report id shows in the page heading, title and breadcrumbs.

Signed-off-by: Michael A <madamyk@ckls.org>

Signed-off-by: Michael Adamyk <madamyk@ckls.org>
---
 .../prog/en/modules/reports/guided_reports_start.tt            | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
index 153d7b7ced..8cbc59f4b2 100644
--- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/guided_reports_start.tt
@@ -28,9 +28,9 @@
     [%- ELSIF ( showsql ) -%]
         &rsaquo; Saved reports &rsaquo; SQL view
     [%- ELSIF ( execute ) -%]
-        &rsaquo; Saved reports &rsaquo; [% name | html %] Report
+        &rsaquo; Saved reports &rsaquo; Report [% name | html %]
     [%- ELSIF ( editsql ) -%]
-        &rsaquo; Saved reports &rsaquo; Edit SQL report
+        &rsaquo; Saved reports &rsaquo; Edit report [% reportname | html %]
     [%- END -%]
     [%- IF ( build1 ) -%]
         &rsaquo; Build a report, step 1 of 6: Choose a module
@@ -75,9 +75,9 @@
     [% ELSIF ( showsql ) %]
         &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; SQL view
     [% ELSIF ( editsql ) %]
-        &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; Edit SQL report
+        &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; Edit report <em>[% reportname | html %] ([% id | html %])</em>
     [% ELSIF ( execute ) %]
-        &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; <em>[% name | html %]</em> Report
+        &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Use%20saved">Saved reports</a> &rsaquo; Report <em>[% name | html %] ([% id | html %])</em>
     [% ELSIF ( build1 || build2 || build3 || build4 || build5 || build6 ) %]
         &rsaquo; <a href="/cgi-bin/koha/reports/guided_reports.pl?phase=Build%20new">Build a report</a>
         [% IF ( build1 ) %]
@@ -838,7 +838,7 @@
                 [% END # /IF ( enter_params ) %]
 
                 [% IF ( execute ) %]
-                    <h1>[% name | html %]</h1>
+                    <h1>[% name | html %] <span id="report_id">([% id %])</span></h1>
                     [% IF ( notes ) %]
                         <p><span class="label">Notes:</span> [% notes | html %]</p>
                     [% END %]
-- 
2.11.0