X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fnotes.html;h=c02af386616f6cedd02a3868676340fed93fc1f1;hb=e1e2c5a12697fc16078f46d1e59358de5684ee16;hp=deba956ae544d3b2d1e6ec1a2d51246052789fe1;hpb=95606bc9db41352511c886773a311f2166cc6cf2;p=freeside.git diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index deba956ae..c02af3866 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -16,29 +16,6 @@ % my $notecount = scalar($cust_main->notes(0)); % if ( ! $conf->exists('cust_main-disable_notes') || $notecount) { -% unless ( $view eq 'notes' && $cust_main->comments !~ /[^\s\n\r]/ ) { -

- <% mt('Notes') |h %> -

- -% } - -% if ( $curuser->access_right('Add customer note') && -% ! $conf->exists('cust_main-disable_notes') -% ) { - - <& /elements/popup_link-cust_main.html, - 'label' => emt('Add customer note'), - 'action' => $p. 'edit/cust_main_note.cgi', - 'actionlabel' => emt('Enter customer note'), - 'cust_main' => $cust_main, - 'width' => 616, - 'height' => 538, #575 - &> - -% } -
- % # actually display notes <& notes/notes.html, 'cust_main' => $cust_main &>
@@ -49,24 +26,17 @@ % if( $curuser->access_right('View attachments') ) { % # List attachments <& notes/attachments.html, 'cust_main' => $cust_main &> -% # "Attach file" link -% if(! $conf->config('disable_cust_attachment') -% and $curuser->access_right('Add attachment')) { -<& /elements/popup_link-cust_main.html, - 'label' => emt('Attach file'), - 'action' => $p.'edit/cust_main_attach.cgi', - 'actionlabel' => emt('Upload file'), - 'cust_main' => $cust_main, - 'width' => 480, - 'height' => 296, -&> -% } - % if ($cgi->param('show_deleted')) { ">(<% mt('Show active attachments') |h %>) -% } elsif($curuser->access_right('View deleted attachments')) { +% } elsif ( $curuser->access_right('View deleted attachments') +% && FS::Record->scalar_sql( +% 'SELECT 1 FROM cust_attachment WHERE custnum = ? '. +% ' AND disabled IS NOT NULL AND disabled > 0 LIMIT 1', +% $custnum ) +% ) +% { ">(<% mt('Show deleted attachments') |h %>)