[freeside-commits] freeside/httemplate/view/cust_main notes.html,
NONE, 1.1
Jeff Finucane,420,,
jeff at wavetail.420.am
Tue Oct 3 15:44:30 PDT 2006
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail:/tmp/cvs-serv13462/httemplate/view/cust_main
Added Files:
notes.html
Log Message:
Enhanced customer notes
--- NEW FILE: notes.html ---
%
% my $conf = new FS::Conf;
%
% $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) ) {
<STYLE TYPE="text/css">
body { background: #e8e8e8 }
.inv table { border: none }
.inv TH { border: none }
.inv TD { border: none }
</STYLE>
<TABLE CLASS="inv" CELLSPACING=0 CELLPADDING=0 BORDER=0 >
%#<% include('/elements/table-grid.html') %>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
%
% foreach my $note (@notes) {
%
% if ( $bgcolor eq $bgcolor1 ) {
% $bgcolor = $bgcolor2;
% } else {
% $bgcolor = $bgcolor1;
% }
%
%
<TR>
<% note_datestr($note,$conf,$bgcolor) %>
<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
<%$note->otaker%>
</TD>
<TD CLASS="inv" BGCOLOR="<% $bgcolor %>">
<%$note->comments%>
</TD>
</TR>
% } #end display notes
</TABLE>
% } else {
<BR>
% }
%
%#subroutines
%
%sub note_datestr {
% my($note, $conf, $bgcolor) = @_ or return '';
% my $format=qq{<TD class="inv" bgcolor="$bgcolor" align="left"><B>%b</B></TD>}.
% qq{<TD class="inv" bgcolor="$bgcolor" align="right"><B> %o,</B></TD>}.
% qq{<TD class="inv" bgcolor="$bgcolor" align="right"><B> %Y </B></TD>};
% $format .= qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="right"><B> %l</TD>}.
% qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="center"><B>:</B></TD>}.
% qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left"><B>%M</B></TD>}.
% qq{<TD class="inv" bgcolor="$bgcolor" ALIGN="left"><B> %P </B></TD>}
% if $conf->exists('cust_main_note-display_times');
% ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g;
% $strip;
% }
%
More information about the freeside-commits
mailing list