X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fsearch%2Fqueue.html;h=22032b13c13d16707e9dd261fea3611821f109e9;hp=fa6c1a1cac1eb8842ae21ac2889dde8ef1ced27c;hb=833cfe5c9938d33c3e6b97ed610c25a7afa6eb04;hpb=c8cccb4a92adceb943c635fe62dad0d034462ce0 diff --git a/httemplate/search/queue.html b/httemplate/search/queue.html index fa6c1a1ca..22032b13c 100644 --- a/httemplate/search/queue.html +++ b/httemplate/search/queue.html @@ -1,24 +1,10 @@ -% -% -%my $hashref = {}; -% -%my $conf = new FS::Conf; -%my $dangerous = $conf->exists('queue_dangerous_controls'); -% -%my $noactions = 0; -% -%my $count_query = 'SELECT COUNT(*) FROM queue'; # + $hashref -% -%my $areboxes = 0; -% -% -<% include( 'elements/search.html', +<& elements/search.html, 'title' => 'Job Queue', - 'menubar' => [ 'Main menu' => $p, ], 'name' => 'jobs', + 'html_form' => qq!
!, 'query' => { 'table' => 'queue', 'hashref' => $hashref, - 'extra_sql' => 'ORDER BY jobnum', + 'order_by' => 'ORDER BY jobnum', }, 'count_query' => $count_query, 'header' => [ '#', @@ -27,6 +13,7 @@ 'Date', 'Status', 'Account', # unless $hashref->{'svcnum'} + 'Employee', '', # checkbox column ], 'fields' => [ @@ -64,10 +51,14 @@ || ( ! $noactions && $status =~ /^failed/ || $status =~ /^locked/ + || $status =~ /^done/ ); if ( $changable ) { + $status .= qq! (!; + $status .= + qq!  retry |! + unless $status =~ /^done/; $status .= - qq! ( retry |!. qq! remove )!; } $status; @@ -88,6 +79,11 @@ }, sub { my $queue = shift; + my $access_user = $queue->access_user; + return $access_user ? $access_user->username : ''; + }, + sub { + my $queue = shift; my $jobnum = $queue->jobnum; my $status = $queue->status; my $changable = $dangerous @@ -114,12 +110,38 @@ # ], 'html_foot' => sub { if ( $areboxes ) { + '
'. + ''. '
'. - '
'; + '
'. + ''; } else { ''; } }, - ) + +&> +<%init> + +die "access denied" + unless $FS::CurrentUser::CurrentUser->access_right('Job queue'); + +my $hashref = {}; + +my $conf = new FS::Conf; +my $dangerous = $conf->exists('queue_dangerous_controls'); + +my $noactions = 0; + +my $count_query = 'SELECT COUNT(*) FROM queue'; # + $hashref + +my $areboxes = 0; -%> +