[freeside-commits] freeside/httemplate/view/elements
svc_Common.html, 1.2, 1.3
Ivan,,,
ivan at wavetail.420.am
Fri Dec 29 00:51:35 PST 2006
- Previous message: [freeside-commits] freeside/httemplate/misc link.cgi,1.11,1.12
- Next message: [freeside-commits] freeside/httemplate/search cust_main.cgi, 1.70,
1.71 cust_svc.html, NONE, 1.1 svc_acct.cgi, 1.38,
1.39 svc_broadband.cgi, 1.2, 1.3 svc_domain.cgi, 1.21,
1.22 svc_external.cgi, 1.4, 1.5 svc_forward.cgi, 1.10,
1.11 svc_phone.cgi, 1.2, 1.3 svc_www.cgi, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/view/elements
In directory wavetail:/tmp/cvs-serv4384/httemplate/view/elements
Modified Files:
svc_Common.html
Log Message:
service refactor!
Index: svc_Common.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/elements/svc_Common.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- svc_Common.html 23 Aug 2006 22:25:39 -0000 1.2
+++ svc_Common.html 29 Dec 2006 08:51:33 -0000 1.3
@@ -12,6 +12,9 @@
% # if not specified all columns (except for the primary key) will be viewable
% # 'fields' => [
% # ]
+% #
+% # # defaults to "edit/$table.cgi?", will have svcnum appended
+% # 'edit_url' =>
%
% my(%opt) = @_;
%
@@ -21,9 +24,15 @@
% #|| [ grep { $_ ne 'svcnum' } dbdef->table($table)->columns ];
% || [ grep { $_ ne 'svcnum' } fields($table) ];
%
-% my($query) = $cgi->keywords;
-% $query =~ /^(\d+)$/;
-% my $svcnum = $1;
+% my $svcnum;
+% if ( $cgi->param('svcnum') ) {
+% $cgi->param('svcnum') =~ /^(\d+)$/ or die "unparsable svcnum";
+% $svcnum = $1;
+% } else {
+% my($query) = $cgi->keywords;
+% $query =~ /^(\d+)$/ or die "no svcnum";
+% $svcnum = $1;
+% }
% my $svc_x = qsearchs( $opt{'table'}, { 'svcnum' => $svcnum } )
% or die "Unknown svcnum $svcnum in ". $opt{'table'}. " table\n";
%
@@ -69,7 +78,8 @@
Service #<B><% $svcnum %></B>
-| <A HREF="<%$p%>edit/<% $opt{'table'} %>.cgi?<%$svcnum%>">Edit this <% $label %></A>
+% my $url = $opt{'edit_url'} || $p. 'edit/'. $opt{'table'}. '.cgi?';
+| <A HREF="<%$url%><%$svcnum%>">Edit this <% $label %></A>
<BR>
<% ntable("#cccccc") %><TR><TD><% ntable("#cccccc",2) %>
- Previous message: [freeside-commits] freeside/httemplate/misc link.cgi,1.11,1.12
- Next message: [freeside-commits] freeside/httemplate/search cust_main.cgi, 1.70,
1.71 cust_svc.html, NONE, 1.1 svc_acct.cgi, 1.38,
1.39 svc_broadband.cgi, 1.2, 1.3 svc_domain.cgi, 1.21,
1.22 svc_external.cgi, 1.4, 1.5 svc_forward.cgi, 1.10,
1.11 svc_phone.cgi, 1.2, 1.3 svc_www.cgi, 1.7, 1.8
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list