diff options
author | ivan <ivan> | 2008-01-24 21:16:42 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-01-24 21:16:42 +0000 |
commit | f8a8f142236a338fde4b733df48e022d19748c88 (patch) | |
tree | 62493453606d5f4a7cebf41ae3e968ecb6699483 /httemplate | |
parent | 2944d0c54b87b84a0d0e2e2691de413e31991d06 (diff) |
slightly more sane names for customer tickets hash, display ticket owners on customer view page
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/view/cust_main/tickets.html | 77 |
1 files changed, 53 insertions, 24 deletions
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html index c9c3b6d1b..b5d581d50 100644 --- a/httemplate/view/cust_main/tickets.html +++ b/httemplate/view/cust_main/tickets.html @@ -1,30 +1,25 @@ -% -% my( $cust_main ) = @_; -% my( @tickets ) = $cust_main->tickets; -% - <A NAME="tickets"><FONT SIZE="+2">Tickets</FONT></A> <BR> -(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum) %>">View <% join('/', FS::TicketSystem->statuses ) %> tickets for this customer</A>) -(<A HREF="<% FS::TicketSystem->href_customer_tickets($cust_main->custnum, { 'statuses' => [ 'resolved' ] } ) %>">View resolved tickets for this customer</A>) +(<A HREF="<% $open_link %>">View <% $openlabel %> tickets for this customer</A>) +(<A HREF="<% $res_link %>">View resolved tickets for this customer</A>) <BR> -(<A HREF="<% FS::TicketSystem->href_new_ticket($cust_main, join(', ', grep { $_ !~ /^(POST|FAX)$/ } $cust_main->invoicing_list ) ) %>">Create new ticket for this customer</A>) +(<A HREF="<% $new_link %>">Create new ticket for this customer</A>) <% include("/elements/table-grid.html") %> % my $bgcolor1 = '#eeeeee'; % my $bgcolor2 = '#ffffff'; % my $bgcolor = ''; -% - <TR> <TH CLASS="grid" BGCOLOR="#cccccc">#</TH> <TH CLASS="grid" BGCOLOR="#cccccc">Subject</TH> - <TH CLASS="grid" BGCOLOR="#cccccc">Priority</TH> - <TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH> <TH CLASS="grid" BGCOLOR="#cccccc">Status</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Queue</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Owner</TH> + <TH CLASS="grid" BGCOLOR="#cccccc">Priority</TH> </TR> + % foreach my $ticket ( @tickets ) { % my $href = FS::TicketSystem->href_ticket($ticket->{id}); % if ( $bgcolor eq $bgcolor1 ) { @@ -32,24 +27,58 @@ % } else { % $bgcolor = $bgcolor1; % } -% + <TR> + + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <A HREF=<%$href%>><% $ticket->{id} %></A> + </TD> + + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <A HREF=<%$href%>><% $ticket->{subject} %></A> + </TD> + + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <% $ticket->{status} %> + </TD> + + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <% $ticket->{queue} %> + </TD> + + <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <% $ticket->{owner} %> + </TD> + + <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>"> + <% $ticket->{content} + ? $ticket->{content}.' ('.$ticket->{priority}.')' + : $ticket->{priority} + %> + </TD> + + </TR> -<TR> +% } - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF=<%$href%>><% $ticket->{id} %></A></TD> +</TABLE> - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><A HREF=<%$href%>><% $ticket->{subject} %></A></TD> +<%init> - <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{content} || $ticket->{priority} %></TD> +my( $cust_main ) = @_; +my( @tickets ) = $cust_main->tickets; - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{name} %></TD> +my $open_link = FS::TicketSystem->href_customer_tickets($cust_main->custnum); +my $openlabel = join('/', FS::TicketSystem->statuses ); - <TD CLASS="grid" BGCOLOR="<% $bgcolor %>"><% $ticket->{status} %></TD> +my $res_link = FS::TicketSystem->href_customer_tickets( + $cust_main->custnum, + { 'statuses' => [ 'resolved' ] } + ); -</TR> -% } - - -</TABLE> +my $new_link = FS::TicketSystem->href_new_ticket( + $cust_main, + join(', ', $cust_main->invoicing_list_emailonly ) + ); +</%init> |