Created attachment 66680 [details] [review] 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
Hm, will that only work if you name the column itemnumber?
Patch tested with a sandbox, by George <george@nekls.org>
Created attachment 67087 [details] [review] 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 <george@nekls.org> Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com>
(In reply to Katrin Fischer from comment #2) > Hm, will that only work if you name the column itemnumber? My test indicates that this is the case. The column must be named "itemnumber."
Created attachment 67186 [details] [review] Bug 19233: (follow-up) Send itemnumbers in report results to batch modification This patch changes the obscure "^" symbol to a styled link with the text "Batch modify." I think the only disadvantage of this is that it takes up more space, but it is outweighed by the improved clarity. This patch also makes minor indentation corrections to new lines of HTML.
This is a bit of a translation issue, but I like the idea of this and can't come up with a way to avoid the problem right now. could we use a placeholder that would still allow a translated heading? "Exemplarnummer <<itemnumber>>"?
Created attachment 67805 [details] [review] 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 <george@nekls.org> Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 67806 [details] [review] Bug 19233: (follow-up) Send itemnumbers in report results to batch modification This patch changes the obscure "^" symbol to a styled link with the text "Batch modify." I think the only disadvantage of this is that it takes up more space, but it is outweighed by the improved clarity. This patch also makes minor indentation corrections to new lines of HTML. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
It's a neat little feature, even with the translation issue.
Created attachment 69920 [details] [review] 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 <george@nekls.org> Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Created attachment 69921 [details] [review] Bug 19233: (follow-up) Send itemnumbers in report results to batch modification This patch changes the obscure "^" symbol to a styled link with the text "Batch modify." I think the only disadvantage of this is that it takes up more space, but it is outweighed by the improved clarity. This patch also makes minor indentation corrections to new lines of HTML. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Patches have been rebased on current master.
Created attachment 72566 [details] [review] 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 <george@nekls.org> Signed-off-by: BWS Sandboxes <ByWaterSandboxes@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Created attachment 72567 [details] [review] Bug 19233: (follow-up) Send itemnumbers in report results to batch modification This patch changes the obscure "^" symbol to a styled link with the text "Batch modify." I think the only disadvantage of this is that it takes up more space, but it is outweighed by the improved clarity. This patch also makes minor indentation corrections to new lines of HTML. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
+ $(".send_to_item_mod").click(function(e){ + e.preventDefault(); + $("#report_results").attr("action","/cgi-bin/koha/tools/batchMod.pl"); + $("#report_results").submit(); + }); This sounds hacky at first glance, why this trick?
(In reply to Jonathan Druart from comment #16) > + $(".send_to_item_mod").click(function(e){ > + e.preventDefault(); > + > $("#report_results").attr("action","/cgi-bin/koha/tools/batchMod.pl"); > + $("#report_results").submit(); > + }); > > This sounds hacky at first glance, why this trick? Ah, I believe I was thinking we could expand the options here, allow sending the itemnumbers elsewhere as well ('Add to list','batch delete' etc.) Setting the action in the JS let me plan for different actions depending on where we send. I implemented batch-mod as a starting point
If not used it should be removed.
Created attachment 73344 [details] [review] Bug 19233: (follow-up) Don't use JS trickery to set form action
Created attachment 73345 [details] [review] Bug 19233: (follow-up) Use a button to submit form
Created attachment 73346 [details] [review] Bug 19233: (follow-up) Use a button to submit form
Created attachment 73347 [details] [review] Bug 19233: (follow-up) Use a button to submit form
Created attachment 73356 [details] [review] Bug 19233: Restore styling of the button
Pushed to master for 18.05, thanks to everybody involved!
Awesome work all, enhancement, not backported for stable