From e2a2c05f8f6c5eeb4f91228b67251421600d3864 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 --- .../en/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 706e1d683c..ca696e1cb7 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 %] @@ -959,6 +974,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.14.2