[freeside-commits] freeside/httemplate/view svc_dsl.cgi,1.8,1.9

Ivan,,, ivan at wavetail.420.am
Sun Mar 27 16:01:49 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv29859/httemplate/view

Modified Files:
	svc_dsl.cgi 
Log Message:
de-uglify DSL notes, RT#7111

Index: svc_dsl.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/svc_dsl.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- svc_dsl.cgi	7 Dec 2010 19:04:43 -0000	1.8
+++ svc_dsl.cgi	27 Mar 2011 23:01:47 -0000	1.9
@@ -25,7 +25,7 @@
 };
 
 my $svc_cb = sub {
-    my( $cgi,$svc_x, $part_svc,$cust_pkg, $fields1,$opt) = @_;
+    my( $cgi,$svc_dsl, $part_svc,$cust_pkg, $fields1,$opt) = @_;
 
     my @exports = $part_svc->part_export_dsl_pull;
     die "more than one DSL-pulling export attached to svcpart ".$part_svc->svcpart
@@ -53,13 +53,34 @@
     my $status = '';
     if($export->exporttype eq 'ikano') {
 	push @fields, qw ( username password isp_chg isp_prev staticips );
-	$status = "Ikano " . $svc_x->vendor_order_type . " order #"
-		. $svc_x->vendor_order_id . "   Status: " 
-		. $svc_x->vendor_order_status;
+        $status = "Ikano " . $svc_dsl->vendor_order_type . " order #"
+                . $svc_dsl->vendor_order_id . "   Status: " 
+                . $svc_dsl->vendor_order_status;
     }
     # else add any other export-specific stuff here
    
     $footer = "<B>$status</B>";
-    $footer .= "<BR><BR><BR><B>Order Notes:</B><BR>".$export->notes_html($svc_x);
+
+    my @notes = $svc_dsl->notes;
+    if ( @notes ) {
+
+      my $conf = new FS::Conf;
+      my $date_format = $conf->config('date_format') || '%m/%d/%Y';
+
+      $footer .=
+        "<BR><BR>Order Notes<BR>". ntable('#cccccc', 2). #id="dsl_notes"
+        '<TR><TH>Date</TH><TH>By</TH><TH>Priority</TH><TH>Note</TH></TR>';
+
+      foreach my $note ( @notes ) {
+        $footer .= "<TR>
+            <TD>".time2str("$date_format %H:%M",$note->date)."</TD>
+            <TD>".$note->by."</TD>
+            <TD>". ($note->priority eq 'N' ? 'Normal' : 'High') ."</TD>
+            <TD>".$note->note."</TD></TR>";
+      }
+
+      $footer .= '</TABLE>';
+
+    }
 };
 </%init>



More information about the freeside-commits mailing list