diff options
author | Mark Wells <mark@freeside.biz> | 2016-09-08 11:25:59 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-09-08 11:25:59 -0700 |
commit | 87194c546606205e78e36f99ec1f2ae6f0a9cafc (patch) | |
tree | 08fe22e3bf25a0ffbde7257675c617db9a55e42d /httemplate/elements/menu.html | |
parent | 4b75f33fd6c2d0fecf8714f588f2d6d200aa4d47 (diff) |
add UI to manage saved searches, #72101
Diffstat (limited to 'httemplate/elements/menu.html')
-rw-r--r-- | httemplate/elements/menu.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/httemplate/elements/menu.html b/httemplate/elements/menu.html index 62e026921..38509c6af 100644 --- a/httemplate/elements/menu.html +++ b/httemplate/elements/menu.html @@ -87,6 +87,21 @@ my $mobile = $opt{'mobile'} || 0; my $curuser = $FS::CurrentUser::CurrentUser; +# saved searches +tie my %report_saved_searches, 'Tie::IxHash'; +if ( my @searches = grep { $_->disabled eq '' } $curuser->saved_search ) { + foreach my $search (@searches) { + $report_saved_searches{ $search->searchname } = [ + # don't use query_string here; we don't want to override the format + $fsurl . $search->path . '?' . $search->params , '' + ]; + } + $report_saved_searches{'separator'} = ''; + $report_saved_searches{'My saved searches'} = + [ $fsurl. 'browse/saved_search.html', + 'Manage saved searches and subscriptions' ]; +} + #XXX Active tickets not assigned to a customer tie my %report_prospects, 'Tie::IxHash'; @@ -419,6 +434,8 @@ $report_logs{'Outgoing messages'} = [ $fsurl.'search/cust_msg.html', 'View outgo || $curuser->access_right('Configuration'); tie my %report_menu, 'Tie::IxHash'; +$report_menu{'Saved searches'} = [ \%report_saved_searches, 'My saved searches' ] + if keys(%report_saved_searches); $report_menu{'Prospects'} = [ \%report_prospects, 'Prospect reports' ] if $curuser->access_right('List prospects') || $curuser->access_right('List contacts'); |