diff options
author | Mark Wells <mark@freeside.biz> | 2016-09-08 10:26:23 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-09-08 10:26:23 -0700 |
commit | 54ef6b82c54b5d4c6336ab9fe96aed56fc92963c (patch) | |
tree | 76ffea32cae26db50739910608f1abe7ad6724a0 /httemplate/elements/menu.html | |
parent | 2d2662d900652d9b1f242e9affd5a6e67c453f4d (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 fcfc9fb74..d6ea06891 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'); |