From 30c3ff2acf90e1386fae00759078899c859faf36 Mon Sep 17 00:00:00 2001 From: jeff Date: Tue, 3 Oct 2006 22:44:28 +0000 Subject: Enhanced customer notes --- httemplate/view/cust_main/notes.html | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100755 httemplate/view/cust_main/notes.html (limited to 'httemplate/view/cust_main/notes.html') diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html new file mode 100755 index 000000000..c1a33b020 --- /dev/null +++ b/httemplate/view/cust_main/notes.html @@ -0,0 +1,74 @@ +% +% 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) ) { + + + + + +%#<% 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; +% } +% +% + + + <% note_datestr($note,$conf,$bgcolor) %> + + + + +% } #end display notes + +
+  <%$note->otaker%>  + +  <%$note->comments%> +
+% } else { + +
+% } +% +%#subroutines +% +%sub note_datestr { +% my($note, $conf, $bgcolor) = @_ or return ''; +% my $format=qq{%b}. +% qq{ %o,}. +% qq{ %Y }; +% $format .= qq{ %l}. +% qq{:}. +% qq{%M}. +% qq{ %P } +% if $conf->exists('cust_main_note-display_times'); +% ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g; +% $strip; +% } +% + -- cgit v1.2.1 From 576c6b48428aa95e0fd80db011fe73c0b728c88b Mon Sep 17 00:00:00 2001 From: jeff Date: Fri, 27 Oct 2006 17:01:31 +0000 Subject: editable notes --- httemplate/view/cust_main/notes.html | 41 +++++++++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 10 deletions(-) (limited to 'httemplate/view/cust_main/notes.html') diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index c1a33b020..75bf30e41 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -1,5 +1,6 @@ % % my $conf = new FS::Conf; +% my $curuser = $FS::CurrentUser::CurrentUser; % % $cgi->param('custnum') =~ /^(\d+)$/ % or die "No customer specified (bad URL)!"; @@ -20,6 +21,11 @@ body { background: #e8e8e8 } + + + + + %#<% include('/elements/table-grid.html') %> @@ -35,12 +41,27 @@ body { background: #e8e8e8 } % $bgcolor = $bgcolor1; % } % +% my $pop = popurl(3); +% my $notenum = $note->notenum; +% my $clickjs = qq!onclick="overlib( OLiframeContent('${pop}edit/! . +% qq!cust_main_note.cgi?custnum=$custnum&! . +% qq!notenum=$notenum', 616, ! . +% qq!386, 'cust_main_note_popup' ), CAPTION, 'Edit customer ! . +% qq!note', STICKY, AUTOSTATUSCAP, MIDX, 0, MIDY, 0, ! . +% qq!CLOSECLICK, FRAME, top); return false;"!; % +% my ($el, $eel); +% if ($curuser->access_right('Edit customer note') ) { +% $el = qq!!; +% $eel = qq!!; +% }else{ +% $el = $eel = ''; +% } - <% note_datestr($note,$conf,$bgcolor) %> + <% note_datestr($note,$conf,$bgcolor, $el, $eel) %> }. -% qq{}. -% qq{}; -% $format .= qq{}. -% qq{}. -% qq{}. -% qq{} +% my($note, $conf, $bgcolor, $el, $eel) = @_ or return ''; +% my $format=qq{}. +% qq{}. +% qq{}; +% $format .= qq{}. +% qq{}. +% qq{}. +% qq{} % if $conf->exists('cust_main_note-display_times'); % ( my $strip = time2str($format, $note->_date) ) =~ s/ (\d)/$1/g; % $strip; -- cgit v1.2.1 From 88a07a3c2aac1fff33bd1f400ee5c0672ce716a0 Mon Sep 17 00:00:00 2001 From: jeff Date: Sun, 26 Nov 2006 23:06:37 +0000 Subject: more ajaxy customer notes --- httemplate/view/cust_main/notes.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'httemplate/view/cust_main/notes.html') diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index 75bf30e41..f10eccf57 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -9,8 +9,6 @@ % my $cust_main = qsearchs('cust_main', {'custnum' => $custnum} ); % die "Custimer not found!" unless $cust_main; % -% my (@notes) = $cust_main->notes(); -% if ( scalar(@notes) ) { +% my (@notes) = $cust_main->notes(); +% if ( scalar(@notes) ) { + @@ -28,7 +29,6 @@ body { background: #e8e8e8 }
-  <%$note->otaker%>  + <% $el %>  <%$note->otaker%>  <% $eel %>  <%$note->comments%> @@ -58,14 +79,14 @@ body { background: #e8e8e8 } %#subroutines % %sub note_datestr { -% my($note, $conf, $bgcolor) = @_ or return ''; -% my $format=qq{%b %o, %Y  %l:%M %P $el%b$eel$el %o,$eel$el %Y $eel$el %l$eel$el:$eel$el%M$eel$el %P $eel
-%#<% include('/elements/table-grid.html') %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; @@ -71,9 +71,7 @@ body { background: #e8e8e8 } % } #end display notes
-% } else { -
% } % %#subroutines -- cgit v1.2.1 From 0c81ee14be99875c8f9f9e34a442a23543333611 Mon Sep 17 00:00:00 2001 From: ivan Date: Mon, 22 Jan 2007 11:39:46 +0000 Subject: fix elements/ links here too --- httemplate/view/cust_main/notes.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'httemplate/view/cust_main/notes.html') diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html index f10eccf57..f2d116930 100755 --- a/httemplate/view/cust_main/notes.html +++ b/httemplate/view/cust_main/notes.html @@ -22,10 +22,10 @@ body { background: #e8e8e8 } % my (@notes) = $cust_main->notes(); % if ( scalar(@notes) ) { - - - - + + + + -- cgit v1.2.1