[freeside-commits] freeside/httemplate/view/cust_main tickets.html, 1.18, 1.19
Mark Wells
mark at wavetail.420.am
Mon Jun 27 00:11:03 PDT 2011
Update of /home/cvs/cvsroot/freeside/httemplate/view/cust_main
In directory wavetail.420.am:/tmp/cvs-serv29076/httemplate/view/cust_main
Modified Files:
tickets.html
Log Message:
self-service ticket priority and edit subject, #13199
Index: tickets.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/cust_main/tickets.html,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -w -d -r1.18 -r1.19
--- tickets.html 16 May 2011 16:29:49 -0000 1.18
+++ tickets.html 27 Jun 2011 07:11:01 -0000 1.19
@@ -12,8 +12,7 @@
<A id="CreateTicketLink" HREF="<% $new_link %>"><% mt('Create new ticket') |h %></A>
<% mt('in queue') |h %>
%# fetch list of queues in which the user can create tickets
-% my $session = FS::TicketSystem->session();
-% my %queues = FS::TicketSystem->queues($session, 'CreateTicket');
+% my %queues = FS::TicketSystem->queues('', 'CreateTicket');
% if( $conf->exists('ticket_system-force_default_queueid') ) {
<B><% $queues{$new_param{'Queue'}} %></B>
<INPUT TYPE="hidden" NAME="Queue" VALUE="<% $new_param{'Queue'} %>">
@@ -46,7 +45,12 @@
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Status') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Queue') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Owner') |h %></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Due') |h %></TH>
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Estimated Time') |h %></TH>
<TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Priority') |h %></TH>
+% if ( $ss_priority ) {
+ <TH CLASS="grid" BGCOLOR="#cccccc"><% mt('Customer Priority') |h %></TH>
+% }
</TR>
% foreach my $ticket ( @tickets ) {
@@ -79,6 +83,14 @@
<% $ticket->{owner} %>
</TD>
+ <TD CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% $date_formatter->($ticket->{due}) %>
+ </TD>
+
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% $ticket->{timeestimated} %>
+ </TD>
+
<TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
<% $ticket->{content}
? $ticket->{content}.' ('.$ticket->{priority}.')'
@@ -86,6 +98,12 @@
%>
</TD>
+% if ( $ss_priority ) {
+ <TD ALIGN="right" CLASS="grid" BGCOLOR="<% $bgcolor %>">
+ <% $ticket->{"CF.{$ss_priority}"} %>
+ </TD>
+% }
+
</TR>
% }
@@ -93,6 +111,8 @@
</TABLE>
<%init>
+use Date::Format 'time2str';
+use Date::Parse 'str2time';
my( $conf ) = new FS::Conf;
my( $cust_main ) = @_;
@@ -102,7 +122,7 @@
my $openlabel = join('/', FS::TicketSystem->statuses );
my $res_link = FS::TicketSystem->href_customer_tickets(
- $cust_main->custnum,
+ $cust_main->Custnum,
{ 'statuses' => [ 'resolved' ] }
);
@@ -111,4 +131,14 @@
my $new_link = FS::TicketSystem->href_new_ticket( $cust_main );
+my $ss_priority = FS::TicketSystem->selfservice_priority;
+
+my $format = $conf->config('date_format') || '%Y-%m-%d';
+
+my $date_formatter = sub {
+ my $time = str2time($_[0], 'GMT');
+ # exclude times within 24 hours of zero
+ ($time > 86400) ? time2str($format, $time) : '';
+};
+
</%init>
More information about the freeside-commits
mailing list