X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_main.html;h=cd5e51f256e2318698fb07ecbd8277b31066cbda;hp=a2ecd047c4cdb81f8b21038e4dc34db819569239;hb=7153190ee1bfeb6d3ad9e6da270a41a949333a7e;hpb=3e200e9a6316815514fe1b5d2e04364ef2e34b63 diff --git a/httemplate/search/cust_main.html b/httemplate/search/cust_main.html index a2ecd047c..cd5e51f25 100755 --- a/httemplate/search/cust_main.html +++ b/httemplate/search/cust_main.html @@ -1,5 +1,6 @@ <% include( 'elements/search.html', 'title' => 'Customer Search Results', + 'menubar' => $menubar, 'name' => 'customers', 'query' => $sql_query, 'count_query' => $count_query, @@ -30,11 +31,6 @@ ], ) %> -<%once> - -my $link = [ "${p}view/cust_main.cgi?", 'custnum' ]; - - <%init> die "access denied" @@ -89,4 +85,23 @@ my $count_query = delete($sql_query->{'count_query'}); my @extra_headers = @{ delete($sql_query->{'extra_headers'}) }; my @extra_fields = @{ delete($sql_query->{'extra_fields'}) }; +my $link = [ "${p}view/cust_main.cgi?", 'custnum' ]; + +### +# email links +### + +my $menubar = []; + +if ( $FS::CurrentUser::CurrentUser->access_right('Bulk send customer notices') ) { + + my $uri = new URI::URL; + $uri->query_form( \%search_hash ); + my $query = $uri->query; + + push @$menubar, 'Email a notice to these customers' => + "${p}misc/email-customers.html?$query", + +} +