X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_event.html;h=4b95b86f58a62dd3a32c3b4f10d5f12ec2a3d0ca;hb=bd5c864f75fd5d4aaddd60d2ba1ebc15f14a9aa8;hp=4a0582633c906a3bb886cfab82a452e8a799d490;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git
diff --git a/httemplate/browse/part_event.html b/httemplate/browse/part_event.html
index 4a0582633..4b95b86f5 100644
--- a/httemplate/browse/part_event.html
+++ b/httemplate/browse/part_event.html
@@ -22,14 +22,14 @@
'Action',
],
'fields' => [ 'eventpart',
- 'event',
+ $event_sub,
$eventtable_sub,
$check_freq_sub,
$conditions_sub,
$action_sub,
],
'links' => [ $link,
- $link,
+ '',
'',
'',
'',
@@ -40,6 +40,34 @@
%>
<%once>
+my $link = [ $p.'edit/part_event.html?', 'eventpart' ];
+
+my $event_sub = sub {
+ my $part_event = shift;
+ my $onclick = include('/elements/popup_link_onclick.html',
+ action => $p.'view/part_event-targets.html?eventpart='.
+ $part_event->eventpart,
+ actionlabel => 'Event query', #no, XSS - '.$part_event->event,
+ width => 650,
+ height => 420,
+ close_text => 'Close',
+ );
+ [#rows
+ [#subcolumns
+ {
+ 'data' => encode_entities($part_event->event),
+ 'link' => $p.'edit/part_event.html?'.$part_event->eventpart,
+ },
+ {
+ 'data' => '(query) ',
+ 'size' => '-1',
+ 'data_style' => 'b',
+ 'onclick' => $onclick,
+ },
+ ],
+ ];
+};
+
my $eventtable_labels = FS::part_event->eventtable_labels;
my $eventtable_sub = sub { $eventtable_labels->{ shift->eventtable }; };
@@ -131,8 +159,6 @@ my $action_sub = sub {
};
-my $link = [ $p.'edit/part_event.html?', 'eventpart' ];
-
%once>
<%init>
@@ -144,14 +170,27 @@ my $html_init =
#XXX better description
'Events are billing, collection or other actions triggered when certain '.
'customer, invoice, package or other conditions are met.
'.
- qq!Add a new event
!;
+ qq!