diff options
author | ivan <ivan> | 2004-12-09 09:21:43 +0000 |
---|---|---|
committer | ivan <ivan> | 2004-12-09 09:21:43 +0000 |
commit | 8d4abaa99403699aa5b5f02e899d2ea33980f913 (patch) | |
tree | 08cb2a528d281f9f5861fc94b8f3657abf57b8a7 /httemplate/view/cust_main/tickets.html | |
parent | 8127468dc459a8257ab7c15cca10801b9b2a3551 (diff) |
more RT integration
Diffstat (limited to 'httemplate/view/cust_main/tickets.html')
-rw-r--r-- | httemplate/view/cust_main/tickets.html | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html new file mode 100644 index 000000000..61c94d61f --- /dev/null +++ b/httemplate/view/cust_main/tickets.html @@ -0,0 +1,54 @@ +<% + my( $cust_main ) = @_; + + my $conf = new FS::Conf; + my $num = 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, + ) + }; + } + + } + +%> + +Highest priority tickets +(<A HREF="<%= FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View all tickets for this customer</A>) +(<A HREF="<%= FS::TicketSystem->href_new_ticket($cust_main->custnum) %>">New ticket for this customer</A>) +<%= table() %> +<TR> + <TH>#</TH> + <TH>Subject</TH> + <TH>Priority</TH> + <TH>Queue</TH> + <TH>Status</TH> +</TR> +<% foreach my $ticket ( @tickets ) { + my $href = FS::TicketSystem->href_ticket($ticket->{id}); +%> +<TR> + <TD><A HREF=<%=$href%>><%= $ticket->{id} %></A></TD> + <TD><A HREF=<%=$href%>><%= $ticket->{subject} %></A></TD> + <TD ALIGN="right"><%= $ticket->{content} || $ticket->{priority} %></TD> + <TD><%= $ticket->{name} %></TD> + <TD><%= $ticket->{status} %></TD> +</TR> +<% } %> +</TABLE> + |