X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Ftickets.html;h=863c66be454f544a11be30e6dcb99419bd6f2094;hb=16f5b89319d2f2b409b307dcdc2aaa901e2be7fd;hp=7a511a962d516ec85978fce13ed9d5e8e500c4be;hpb=9414a814e49a86a832e4f56ec1a6bcc927f55e6b;p=freeside.git
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index 7a511a962..863c66be4 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -9,37 +9,48 @@ function updateTicketLink() {
keys %new_param),'Queue=') %>" + selector.options[selector.selectedIndex].value;
}
-Create new ticket
- in queue
+<% mt('Create new ticket') |h %>
+ <% mt('in queue') |h %>
+%# fetch list of queues in which the user can create tickets
+% my %queues = FS::TicketSystem->queues('', 'CreateTicket');
+% if( $conf->exists('ticket_system-force_default_queueid') ) {
+<% $queues{$new_param{'Queue'}} %>
+
+% }
+% else {
-
+% }
+
-(View <% $openlabel %> tickets for this customer)
-(View resolved tickets for this customer)
+(<% mt("View $openlabel tickets for this customer") |h %>)
+(<% mt('View resolved tickets for this customer') |h %>)
-<% include("/elements/table-grid.html") %>
+<& /elements/table-grid.html &>
% my $bgcolor1 = '#eeeeee';
% my $bgcolor2 = '#ffffff';
% my $bgcolor = '';
- # |
- Subject |
- Status |
- Queue |
- Owner |
- Priority |
+ <% mt('#') |h %> |
+ <% mt('Subject') |h %> |
+ <% mt('Status') |h %> |
+ <% mt('Queue') |h %> |
+ <% mt('Owner') |h %> |
+ <% mt('Due') |h %> |
+ <% mt('Estimated Time') |h %> |
+ <% mt('Priority') |h %> |
+% if ( $ss_priority ) {
+ <% mt('Customer Priority') |h %> |
+% }
% foreach my $ticket ( @tickets ) {
@@ -71,6 +82,14 @@ function updateTicketLink() {
<% $ticket->{owner} %>
|
+
+
+ <% $date_formatter->($ticket->{due}) %>
+ |
+
+
+ <% $ticket->{timeestimated} %>
+ |
<% $ticket->{content}
@@ -78,7 +97,13 @@ function updateTicketLink() {
: $ticket->{priority}
%>
|
-
+
+% if ( $ss_priority ) {
+
+ <% $ticket->{"CF.{$ss_priority}"} %>
+ |
+% }
+
% }
@@ -86,7 +111,10 @@ function updateTicketLink() {
<%init>
+use Date::Format 'time2str';
+use Date::Parse 'str2time';
+my( $conf ) = new FS::Conf;
my( $cust_main ) = @_;
my( @tickets ) = $cust_main->tickets;
@@ -98,13 +126,27 @@ my $res_link = FS::TicketSystem->href_customer_tickets(
{ 'statuses' => [ 'resolved' ] }
);
-my( $new_base, %new_param ) = FS::TicketSystem->href_params_new_ticket(
- $cust_main,
- join(', ', $cust_main->invoicing_list_emailonly ) );
+my( $new_base, %new_param ) =
+ FS::TicketSystem->href_params_new_ticket( $cust_main );
+
+my $new_link = FS::TicketSystem->href_new_ticket( $cust_main );
+
+my $ss_priority = FS::TicketSystem->selfservice_priority;
+if ( $ss_priority ) {
+ use sort 'stable';
+ no warnings 'uninitialized';
+ @tickets = sort {
+ ($b->{'content'} eq $a->{'content'}) &&
+ $b->{'_selfservice_priority'} <=> $a->{'_selfservice_priority'}
+ } @tickets;
+}
+
+my $format = $conf->config('date_format') || '%Y-%m-%d';
-my $new_link = FS::TicketSystem->href_new_ticket(
- $cust_main,
- join(', ', $cust_main->invoicing_list_emailonly )
- );
+my $date_formatter = sub {
+ my $time = str2time($_[0], 'GMT');
+ # exclude times within 24 hours of zero
+ ($time > 86400) ? time2str($format, $time) : '';
+};
%init>