[freeside-commits] freeside/httemplate/browse part_svc.cgi, 1.34, 1.35
Ivan,,,
ivan at wavetail.420.am
Fri May 8 17:39:15 PDT 2009
- Previous message: [freeside-commits] freeside/httemplate/edit part_pkg.cgi, 1.106, 1.107
- Next message: [freeside-commits] freeside/FS/FS Schema.pm, 1.137, 1.138 part_svc.pm, 1.32, 1.33 part_svc_column.pm, 1.5, 1.6 svc_acct.pm, 1.257, 1.258
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv7914/httemplate/browse
Modified Files:
part_svc.cgi
Log Message:
add ability to configure service labels per-package (still need to actually use the labels), RT#4081
Index: part_svc.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/part_svc.cgi,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- part_svc.cgi 13 Jan 2008 20:38:30 -0000 1.34
+++ part_svc.cgi 9 May 2009 00:39:13 -0000 1.35
@@ -55,6 +55,8 @@
<TH CLASS="grid" BGCOLOR="#cccccc">Field</TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc">Label</TH>
+
<TH COLSPAN=2 CLASS="grid" BGCOLOR="#cccccc">Modifier</TH>
</TR>
@@ -65,8 +67,15 @@
% my @dfields = $svc_x->fields;
% push @dfields, 'usergroup' if $svcdb eq 'svc_acct'; #kludge
% my @fields =
-% grep { $svc_x->pvf($_)
-% or $_ ne 'svcnum' && $part_svc->part_svc_column($_)->columnflag }
+% grep { my $col = $part_svc->part_svc_column($_);
+% my $def = FS::part_svc->svc_table_fields($svcdb)->{$_};
+% $svc_x->pvf($_)
+% or $_ ne 'svcnum' && (
+% $col->columnflag || ( $col->columnlabel !~ /^\S*$/
+% && $col->columnlabel ne $def->{'label'}
+% )
+% )
+% }
% @dfields ;
% my $rowspan = scalar(@fields) || 1;
% my $url = "${p}edit/part_svc.cgi?". $part_svc->svcpart;
@@ -128,21 +137,25 @@
</TD>
% unless ( @fields ) {
-% for ( 1..3 ) {
+% for ( 1..4 ) {
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"</TD>
% }
% }
%
% my($n1)='';
% foreach my $field ( @fields ) {
-% my $formatter =
-% FS::part_svc->svc_table_fields($svcdb)->{$field}->{format}
-% || sub { shift };
-% my $flag = $part_svc->part_svc_column($field)->columnflag;
%
+% #a few lines of false laziness w/edit/part_svc.cgi
+% my $def = FS::part_svc->svc_table_fields($svcdb)->{$field};
+% my $formatter = $def->{format} || sub { shift };
+%
+% my $part_svc_column = $part_svc->part_svc_column($field);
+% my $label = $part_svc_column->columnlabel || $def->{'label'};
+% my $flag = $part_svc_column->columnflag;
<% $n1 %>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $field %></TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $label %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $flag{$flag} %></TD>
<TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
- Previous message: [freeside-commits] freeside/httemplate/edit part_pkg.cgi, 1.106, 1.107
- Next message: [freeside-commits] freeside/FS/FS Schema.pm, 1.137, 1.138 part_svc.pm, 1.32, 1.33 part_svc_column.pm, 1.5, 1.6 svc_acct.pm, 1.257, 1.258
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list