From bdbd489428fd392e6d4c096e88fa42cda2283c56 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 1 Sep 2017 00:54:44 +0000 Subject: [PATCH] Bug 19233: Add ability to send itemnumbers in report results to batch modification To test: 1 - Apply patch 2 - Run a report with an itemnumber column 3 - Note there is a linked '^' after column title 4 - Hover over the '^' 5 - You should see a tooltip 'Send visible items to batch modification' 6 - Click the '^' 7 - You should be sent to batch item modification with itemnumbers that were visible in report Signed-off-by: George Signed-off-by: BWS Sandboxes Signed-off-by: Katrin Fischer Signed-off-by: Julian Maurice Signed-off-by: Jonathan Druart --- .../modules/reports/guided_reports_start.tt | 28 +++++++++++++++++-- 1 file changed, 26 insertions(+), 2 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 ba47ba4c1f..67e8891129 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 @@ -705,14 +705,29 @@ canned reports and writing custom SQL reports.

[% pagination_bar %]
[% UNLESS ( errors ) %] +
+ -[% FOREACH header_ro IN header_row %][% END %] +[% FOREACH header_ro IN header_row %] + [% IF header_ro.cell == 'itemnumber' %] + + [% ELSE %] + + [% END %] + [% END %] [% FOREACH result IN results %] - [% FOREACH cell IN result.cells %][% END %] + [% FOREACH cells IN result.cells %] + [% place = loop.index %] + [% IF header_row.$place.cell == 'itemnumber' %] + + [% END %] + + [% END %] [% END %]
[% header_ro.cell %]
[% header_ro.cell %] ^[% header_ro.cell %]
[% cell.cell %][% cells.cell %]
+
[% END %] [% END %] @@ -955,6 +970,9 @@ Sub report: delColumn(); }); + $(".send_to_item_mod").click(function(e){ + e.preventDefault(); + $("#report_results").attr("action","/cgi-bin/koha/tools/batchMod.pl"); + $("#report_results").submit(); + }); + [% IF (saved1) %] var rtable = $("#table_reports").dataTable($.extend(true, {}, dataTablesDefaults, { 'iDisplayLength': [% Koha.Preference('NumSavedReports') %], -- 2.39.5