From 7705a195a7675b247d128f56e8453d945220826e Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Mon, 31 Oct 2016 13:50:16 +0000 Subject: [PATCH] Bug 17516 - Add CSV export option to item search after displaying output to screen To test: 1 - Perform an item search 2 - Note you now have a link to output to csv 3 - Click that link 4 - Page should not change and you should recieve a csv 5 - Ensure nothing breaks 6 - Sign off High five! Signed-off-by: Claire Gravely Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- .../prog/en/modules/catalogue/itemsearch.tt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt index 55f553eb1d..646a05f208 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ -228,7 +228,8 @@ + ''; var results_heading = "

" + _("Item search results") + "

"; results_heading += "

" + _("Go to advanced search") + "

"; - results_heading += "

" + _("Edit search") + "

"; + results_heading += "

" + _("Edit search") + ""; + results_heading += " | " + _("Output results to csv") + "

"; $('#results-wrapper').empty().html(results_heading + table); var params = []; @@ -353,6 +354,15 @@ $(this).hide(); return false; }); + + $("body").on("click",".resultstocsv",function(e) { + e.preventDefault(); + $('#format-csv').prop("checked",true); + $('#itemsearchform').submit(); + hideForm(); + $('#format-html').prop("checked",true); + return false; + }); }); //]]> -- 2.39.5