X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=064f511472405f35acfd778d67ca5c1ef10bf392;hb=bd4cf157ffed8f1191724c1975866c3d21fb30df;hp=84cc90299d265387122c984e554431b720684cfd;hpb=17fa39cf364f9876d41c033f63ef0b4f6f8b1bb7;p=freeside.git diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index 84cc90299..064f51147 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,53 +1,54 @@ -% -% my( $cust_main ) = @_; -% -% my $conf = new FS::Conf; -% my $num = $conf->config('cust_main-max_tickets') || 10; -% -% my @tickets = (); -% unless ( $conf->config('ticket_system-custom_priority_field') ) { -% -% @tickets = -% @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) }; -% -% } else { -% -% foreach my $priority ( -% $conf->config('ticket_system-custom_priority_field-values'), '' -% ) { -% last if scalar(@tickets) >= $num; -% push @tickets, -% @{ FS::TicketSystem->customer_tickets( $cust_main->custnum, -% $num - scalar(@tickets), -% $priority, -% ) -% }; -% } -% -% } -% -% - -Tickets +
+ +Create new ticket + in queue +%# fetch list of queues in which the user can create tickets +% my $session = FS::TicketSystem->session(); +% my %queues = FS::TicketSystem->queues($session, 'CreateTicket'); +% if( $conf->exists('ticket_system-force_default_queueid') ) { +<% $queues{$new_param{'Queue'}} %> + +% } +% else { + + +% } +

-(View all tickets for this customer) -(New ticket for this customer) +(View <% $openlabel %> tickets for this customer) +(View resolved tickets for this customer) +

<% include("/elements/table-grid.html") %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; -% - # Subject - Priority - Queue Status + Queue + Owner + Priority + % foreach my $ticket ( @tickets ) { % my $href = FS::TicketSystem->href_ticket($ticket->{id}); % if ( $bgcolor eq $bgcolor1 ) { @@ -55,24 +56,59 @@ % } else { % $bgcolor = $bgcolor1; % } -% + + + + ><% $ticket->{id} %> + + + + ><% $ticket->{subject} %> + + + + <% $ticket->{status} %> + + + + <% $ticket->{queue} %> + + + + <% $ticket->{owner} %> + + + + <% $ticket->{content} + ? $ticket->{content}.' ('.$ticket->{priority}.')' + : $ticket->{priority} + %> + + + - +% } - ><% $ticket->{id} %> + - ><% $ticket->{subject} %> +<%init> - <% $ticket->{content} || $ticket->{priority} %> +my( $conf ) = new FS::Conf; +my( $cust_main ) = @_; +my( @tickets ) = $cust_main->tickets; - <% $ticket->{name} %> +my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum); +my $openlabel = join('/', FS::TicketSystem->statuses ); - <% $ticket->{status} %> - - -% } +my $res_link = FS::TicketSystem->href_customer_tickets( + $cust_main->custnum, + { 'statuses' => [ 'resolved' ] } + ); +my( $new_base, %new_param ) = + FS::TicketSystem->href_params_new_ticket( $cust_main ); - +my $new_link = FS::TicketSystem->href_new_ticket( $cust_main ); +