summaryrefslogtreecommitdiff
path: root/httemplate/search/elements
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-09-08 10:26:23 -0700
committerMark Wells <mark@freeside.biz>2016-09-08 10:26:23 -0700
commit54ef6b82c54b5d4c6336ab9fe96aed56fc92963c (patch)
tree76ffea32cae26db50739910608f1abe7ad6724a0 /httemplate/search/elements
parent2d2662d900652d9b1f242e9affd5a6e67c453f4d (diff)
add UI to manage saved searches, #72101
Diffstat (limited to 'httemplate/search/elements')
-rw-r--r--httemplate/search/elements/search-html.html24
-rw-r--r--httemplate/search/elements/search.html1
2 files changed, 20 insertions, 5 deletions
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 @@
<TD ALIGN="right" CLASS="noprint">
- <% $opt{'download_label'} || 'Download full results' %><BR>
+ <% $opt{'download_label'} || 'Download results:' %>
% $cgi->param('_type', "$xlsname.xls" );
- as <A HREF="<% "$self_url?". $cgi->query_string %>">Excel spreadsheet</A><BR>
+ <A HREF="<% "$self_url?". $cgi->query_string %>">Spreadsheet</A>&nbsp;|&nbsp;
% $cgi->param('_type', 'csv');
- as <A HREF="<% "$self_url?". $cgi->query_string %>">CSV file</A><BR>
+ <A HREF="<% "$self_url?". $cgi->query_string %>">CSV</A>&nbsp;|&nbsp;
% if ( defined($opt{xml_elements}) ) {
% $cgi->param('_type', 'xml');
- as <A HREF="<% "$self_url?". $cgi->query_string %>">XML file</A><BR>
+ <A HREF="<% "$self_url?". $cgi->query_string %>">XML</A>&nbsp;|&nbsp;
% }
% $cgi->param('_type', 'html-print');
- as <A HREF="<% "$self_url?". $cgi->query_string %>">printable copy</A>
+ <A HREF="<% "$self_url?". $cgi->query_string %>">webpage</A>
+%# "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.
+ <BR>
+%# 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,
+ &>
</TD>
% $cgi->param('_type', "html" );
% }
diff --git a/httemplate/search/elements/search.html b/httemplate/search/elements/search.html
index b6ee7b373..0f71218c2 100644
--- a/httemplate/search/elements/search.html
+++ b/httemplate/search/elements/search.html
@@ -179,6 +179,7 @@ Example:
&>
</%doc>
+% # if changing this, also update saved search behavior to match!
% if ( $type eq 'csv' ) {
%
<% include('search-csv.html', header=>$header, rows=>$rows, opt=>\%opt ) %>