X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_event.html;h=4b95b86f58a62dd3a32c3b4f10d5f12ec2a3d0ca;hp=674004bc7e98a70716229f5866c4c608470e2f12;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hpb=63a268637b2d51a8766412617724b9436439deb6 diff --git a/httemplate/browse/part_event.html b/httemplate/browse/part_event.html index 674004bc7..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' ]; - <%init> @@ -148,9 +174,11 @@ my $html_init = qq!Add a new event!. ' or '. @@ -158,10 +186,11 @@ $html_init .= ''. my $count_query = 'SELECT COUNT(*) FROM part_event WHERE '. $FS::CurrentUser::CurrentUser->agentnums_sql( - 'null_right' => 'Edit global billing events', + 'null_right' => 'Edit global billing events', + 'viewall_right' => 'None', ); -my $join_conditions = FS::part_event_condition->join_conditions_sql; +my $join_conditions = FS::part_event_condition->join_conditions_sql('', 'time' => time); my $order_conditions = FS::part_event_condition->order_conditions_sql;