[freeside-commits] freeside/httemplate/browse cgp_rule.html, 1.1, 1.2
Ivan,,,
ivan at wavetail.420.am
Thu Apr 29 19:32:40 PDT 2010
- Previous message: [freeside-commits] freeside/httemplate/elements select-cgp_rule_action.html, 1.1.2.5, 1.1.2.6 select-cgp_rule_condition.html, 1.1.2.4, 1.1.2.5
- Next message: [freeside-commits] freeside/FS/FS cgp_rule_action.pm, 1.3, 1.4 cgp_rule_condition.pm, 1.3, 1.4 Schema.pm, 1.214, 1.215 Mason.pm, 1.34, 1.35
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/browse
In directory wavetail.420.am:/tmp/cvs-serv19603/httemplate/browse
Modified Files:
cgp_rule.html
Log Message:
communigate (phase 2): rules: show conditions/actions on rule browse, fix rule edit for conditions and actions without op/param, fix rule edit stickiness on errors. RT#7514
Index: cgp_rule.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/browse/cgp_rule.html,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- cgp_rule.html 23 Apr 2010 06:43:40 -0000 1.1
+++ cgp_rule.html 30 Apr 2010 02:32:38 -0000 1.2
@@ -7,13 +7,15 @@
'order_by' => 'ORDER BY priority DESC',
},
'count_query' => $count_query,
- 'header' => [ 'Priority', 'Name', '' ],
+ 'header' => [ 'Priority', 'Name', 'Conditions', 'Actions', '' ],
'fields' => [ sub { shift->priority || 'Inactive'; },
'name',
+ $condition_sub,
+ $action_sub,
sub { 'Delete'; },
],
#'align'
- 'links' => [ $edit_sub, $edit_sub, $del_sub ],
+ 'links' => [ $edit_sub, $edit_sub, '', '', $del_sub ],
)
%>
<%init>
@@ -40,6 +42,40 @@
qq(<A HREF="$view">View this $svc_label</A><BR><BR>).
qq!<A HREF="${p}edit/cgp_rule.html?svcnum=$svcnum">Add new rule</A><BR><BR>!;
+my $condition_sub = sub {
+ my $cgp_rule = shift;
+
+ [ map {
+ [
+ { data => $_->condition,
+ #align =>
+ },
+ { data => $_->op,
+ align => 'center',
+ },
+ { data => $_->params,
+ #align =>
+ },
+ ];
+ }
+ $cgp_rule->cgp_rule_condition
+ ];
+};
+
+my $action_sub = sub {
+ my $cgp_rule = shift;
+
+ [ map {
+ [
+ { data => $_->action },
+ #{ data => '<pre>'.$_->params.'</pre>' }, #gets very big.. limit to
+ { data => $_->params }, # some actions?
+ ];
+ }
+ $cgp_rule->cgp_rule_action
+ ];
+};
+
my $edit_sub = [ $p.'edit/cgp_rule.html?', 'rulenum' ];
my $del_sub = [ $p.'misc/delete-cgp_rule.html?', 'rulenum' ]; #XXX javascript areyousure or something
- Previous message: [freeside-commits] freeside/httemplate/elements select-cgp_rule_action.html, 1.1.2.5, 1.1.2.6 select-cgp_rule_condition.html, 1.1.2.4, 1.1.2.5
- Next message: [freeside-commits] freeside/FS/FS cgp_rule_action.pm, 1.3, 1.4 cgp_rule_condition.pm, 1.3, 1.4 Schema.pm, 1.214, 1.215 Mason.pm, 1.34, 1.35
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list