<TR>
<TH CLASS="grid" BGCOLOR="#cccccc">Date</TH>
- <TH CLASS="grid" BGCOLOR="#cccccc">Time</TH>
+% if ( $conf->exists('cust_main_note-display_times') ) {
+ <TH CLASS="grid" BGCOLOR="#cccccc">Time</TH>
+% }
<TH CLASS="grid" BGCOLOR="#cccccc">Person</TH>
<TH CLASS="grid" BGCOLOR="#cccccc">Note</TH>
+% if ($curuser->access_right('Edit customer note') ) {
+ <TH CLASS="grid" BGCOLOR="#cccccc"> </TH>
+% }
</TR>
% my $bgcolor1 = '#eeeeee';
% ";notenum=$notenum",
% 'actionlabel' => 'Edit customer note',
% 'width' => 616,
-% 'height' => 408,
+% 'height' => 538, #575
% 'frame' => 'top',
% );
% my $clickjs = qq!onclick="$onclick"!;
<TR>
<% note_datestr($note,$conf,$bgcolor) %>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <% $note->otaker%>
+ <% $note->usernum ? $note->access_user->name : $note->otaker %>
</TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- <%$note->comments%><% $edit %>
+ <% $note->comments | defang %>
</TD>
+% if($edit) {
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $edit %></TD>
+% }
</TR>
% } #end display notes
% }
<%init>
+use HTML::Defang;
+
my $conf = new FS::Conf;
my $curuser = $FS::CurrentUser::CurrentUser;
sub note_datestr {
my($note, $conf, $bgcolor) = @_ or return '';
- my $td = '<TD CLASS="grid" BGCOLOR="$bgcolor" ALIGN="right">';
+ my $td = qq{<TD CLASS="grid" BGCOLOR="$bgcolor" ALIGN="right">};
my $format = "$td%b %o, %Y</TD>";
$format .= "$td%l:%M%P</TD>"
if $conf->exists('cust_main_note-display_times');