X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fnotes.html;h=c02af386616f6cedd02a3868676340fed93fc1f1;hb=2a9d2460814b37e07d7cb83392723146a60d34c7;hp=75bf30e41cec60cabb40322b970bb6e7b375ce5b;hpb=576c6b48428aa95e0fd80db011fe73c0b728c88b;p=freeside.git
diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html
index 75bf30e41..c02af3866 100755
--- a/httemplate/view/cust_main/notes.html
+++ b/httemplate/view/cust_main/notes.html
@@ -1,95 +1,67 @@
-%
-% my $conf = new FS::Conf;
-% my $curuser = $FS::CurrentUser::CurrentUser;
-%
-% $cgi->param('custnum') =~ /^(\d+)$/
-% or die "No customer specified (bad URL)!";
-% my $custnum = $1;
-%
-% my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} );
-% die "Custimer not found!" unless $cust_main;
-%
-% my (@notes) = $cust_main->notes();
-% if ( scalar(@notes) ) {
-
-
+% # actually display notes
+<& notes/notes.html, 'cust_main' => $cust_main &>
+
+% } # end of notes
-
-
-
-
+% # Attachments
+% # XXX at some point move all of this into notes/attachments.html
+% if( $curuser->access_right('View attachments') ) {
+% # List attachments
+<& notes/attachments.html, 'cust_main' => $cust_main &>
+% if ($cgi->param('show_deleted')) {
+">(<% mt('Show active attachments') |h %>)
+% } 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 %>)
+% }
+% }
-
- <% $el %> <%$note->otaker%> <% $eel %> - | -- <%$note->comments%> - | -