From 9cb01b1aed97bcbe897e779dc268800a2b1538ae Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Thu, 8 Sep 2016 11:25:59 -0700 Subject: add UI to manage saved searches, #72101 --- httemplate/search/elements/search-html.html | 24 +++++++++++++++++++----- httemplate/search/elements/search.html | 1 + 2 files changed, 20 insertions(+), 5 deletions(-) (limited to 'httemplate/search') diff --git a/httemplate/search/elements/search-html.html b/httemplate/search/elements/search-html.html index 12f6c1e04..3ea38aee8 100644 --- a/httemplate/search/elements/search-html.html +++ b/httemplate/search/elements/search-html.html @@ -136,22 +136,36 @@ - <% $opt{'download_label'} || 'Download full results' %>
+ <% $opt{'download_label'} || 'Download results:' %> % $cgi->param('_type', "$xlsname.xls" ); - as query_string %>">Excel spreadsheet
+ query_string %>">Spreadsheet |  % $cgi->param('_type', 'csv'); - as query_string %>">CSV file
+ query_string %>">CSV |  % if ( defined($opt{xml_elements}) ) { % $cgi->param('_type', 'xml'); - as query_string %>">XML file
+ query_string %>">XML |  % } % $cgi->param('_type', 'html-print'); - as query_string %>">printable copy + query_string %>">webpage +%# "save search" -- for now, obey disable_download and the 'Download +%# report data' ACL, because saving a search allows the user to receive +%# copies of the data. +
+%# XXX should do a check here on whether the user already has this +%# search saved... + <& /elements/popup_link.html, + 'action' => $fsurl.'/edit/saved_search.html?title='. + uri_escape($opt{title}), + 'label' => 'Save this search', + 'actionlabel' => 'Save this search', + 'width' => 650, + 'height' => 500, + &> % $cgi->param('_type', "html" ); % } diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html index 8b85324c9..4ef8c25d3 100644 --- a/httemplate/search/elements/search.html +++ b/httemplate/search/elements/search.html @@ -179,6 +179,7 @@ Example: &> +% # if changing this, also update saved search behavior to match! % if ( $type eq 'csv' ) { % <% include('search-csv.html', header=>$header, rows=>$rows, opt=>\%opt ) %> -- cgit v1.2.1