From 94715cec86ead7f75e86f6e42d666d78afdaf43f 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 --- .../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 5902b92..5311927 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 @@ -75,6 +75,9 @@ function load_group_subgroups () { } $(document).ready(function(){ + + $('[data-toggle="tooltip"]').tooltip(); + $('#limit').change(function() { $('#limitselect').submit(); }); @@ -92,6 +95,12 @@ $("#delColumn").on("click",function(){ 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') %], @@ -920,14 +929,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 %] -- 2.1.4