X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=e90ae5276e8fb04c89103609c3af037db26dff66;hb=140b381af1008dad929b4d3b87aa1e54747d534f;hp=d6ddfa64c9cb679233e2e09b9fc2473db9bd23b4;hpb=57323a695e58b58cc8892784d356995f6e41bfcd;p=freeside.git
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index d6ddfa64c..e90ae5276 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -1,54 +1,117 @@
-<%
- my( $cust_main ) = @_;
+
+
- my $conf = new FS::Conf;
- my $num = 10;
+(View <% $openlabel %> tickets for this customer)
+(View resolved tickets for this customer)
+
- my @tickets = ();
- unless ( $conf->config('ticket_system-custom_priority_field') ) {
+<% include("/elements/table-grid.html") %>
+% my $bgcolor1 = '#eeeeee';
+% my $bgcolor2 = '#ffffff';
+% my $bgcolor = '';
- @tickets =
- @{ FS::TicketSystem->customer_tickets($cust_main->custnum, $num) };
-
- } else {
+
+ # |
+ Subject |
+ Status |
+ Queue |
+ Owner |
+ Priority |
+
- 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,
- )
- };
- }
+% foreach my $ticket ( @tickets ) {
+% my $href = FS::TicketSystem->href_ticket($ticket->{id});
+% if ( $bgcolor eq $bgcolor1 ) {
+% $bgcolor = $bgcolor2;
+% } else {
+% $bgcolor = $bgcolor1;
+% }
- }
+
+
+
+ ><% $ticket->{id} %>
+ |
+
+
+ ><% $ticket->{subject} %>
+ |
+
+
+ <% $ticket->{status} %>
+ |
+
+
+ <% $ticket->{queue} %>
+ |
+
+
+ <% $ticket->{owner} %>
+ |
+
+
+ <% $ticket->{content}
+ ? $ticket->{content}.' ('.$ticket->{priority}.')'
+ : $ticket->{priority}
+ %>
+ |
+
+
-%>
+% }
-Highest priority tickets
-(View all tickets for this customer)
-(New ticket for this customer)
-<%= table() %>
-
- # |
- Subject |
- Priority |
- Queue |
- Status |
-
-<% foreach my $ticket ( @tickets ) {
- my $href = FS::TicketSystem->href_ticket($ticket->{id});
-%>
-
- ><%= $ticket->{id} %> |
- ><%= $ticket->{subject} %> |
- <%= $ticket->{content} || $ticket->{priority} %> |
- <%= $ticket->{name} %> |
- <%= $ticket->{status} %> |
-
-<% } %>
+<%init>
+
+my( $conf ) = new FS::Conf;
+my( $cust_main ) = @_;
+my( @tickets ) = $cust_main->tickets;
+
+my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum);
+my $openlabel = join('/', FS::TicketSystem->statuses );
+
+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,
+ join(', ', $cust_main->invoicing_list_emailonly ) );
+
+my $new_link = FS::TicketSystem->href_new_ticket(
+ $cust_main,
+ join(', ', $cust_main->invoicing_list_emailonly )
+ );
+
+%init>