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:31:17 -0700 |
| commit | 9cb01b1aed97bcbe897e779dc268800a2b1538ae (patch) | |
| tree | f66df1c5e6f89a305bfcd1ca70c3ea8450c58ca5 /httemplate/elements/menu.html | |
| parent | 4496a23e58b830db4c2d10ad17dfb0d531b15859 (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 cdb1d733c..621165de4 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'; @@ -412,6 +427,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'); |
