1 (<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>)
2 (<A HREF="<% $res_link %>">View resolved tickets for this customer</A>)
4 (<A HREF="<% $new_link %>">Create new ticket for this customer</A>)
6 <% include("/elements/table-grid.html") %>
7 % my $bgcolor1 = '#eeeeee';
8 % my $bgcolor2 = '#ffffff';
12 <TH CLASS="grid" BGCOLOR="#cccccc">#</TH>
13 <TH CLASS="grid" BGCOLOR="#cccccc">Subject</TH>
14 <TH CLASS="grid" BGCOLOR="#cccccc">Status</TH>
15 <TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH>
16 <TH CLASS="grid" BGCOLOR="#cccccc">Owner</TH>
17 <TH CLASS="grid" BGCOLOR="#cccccc">Priority</TH>
20 % foreach my $ticket ( @tickets ) {
21 % my $href = FS::TicketSystem->href_ticket($ticket->{id});
22 % if ( $bgcolor eq $bgcolor1 ) {
23 % $bgcolor = $bgcolor2;
25 % $bgcolor = $bgcolor1;
30 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
31 <A HREF=<%$href%>><% $ticket->{id} %></A>
34 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
35 <A HREF=<%$href%>><% $ticket->{subject} %></A>
38 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
39 <% $ticket->{status} %>
42 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
43 <% $ticket->{queue} %>
46 <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
47 <% $ticket->{owner} %>
50 <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
52 ? $ticket->{content}.' ('.$ticket->{priority}.')'
65 my( $cust_main ) = @_;
66 my( @tickets ) = $cust_main->tickets;
68 my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum);
69 my $openlabel = join('/', FS::TicketSystem->statuses );
71 my $res_link = FS::TicketSystem->href_customer_tickets(
73 { 'statuses' => [ 'resolved' ] }
76 my $new_link = FS::TicketSystem->href_new_ticket(
78 join(', ', $cust_main->invoicing_list_emailonly )