summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main
diff options
context:
space:
mode:
authormark <mark>2011-07-21 22:52:38 +0000
committermark <mark>2011-07-21 22:52:38 +0000
commit4987c433ba77d64a0ef73c445a3d4afde9d080d3 (patch)
tree178e9404e2442eab75ea4e7d46e80b41f9a49b0a /httemplate/view/cust_main
parent7ce72ac58f66c833588474d73b54882fa6142252 (diff)
ticket display sort order, #13199
Diffstat (limited to 'httemplate/view/cust_main')
-rw-r--r--httemplate/view/cust_main/misc.html9
-rw-r--r--httemplate/view/cust_main/tickets.html8
2 files changed, 17 insertions, 0 deletions
diff --git a/httemplate/view/cust_main/misc.html b/httemplate/view/cust_main/misc.html
index ed9b91a61..5987459a5 100644
--- a/httemplate/view/cust_main/misc.html
+++ b/httemplate/view/cust_main/misc.html
@@ -125,6 +125,15 @@
% }
+% if ( $conf->exists('ticket_system-selfservice_edit_subject') ) {
+
+ <TR>
+ <TD ALIGN="right"><% mt('Edit ticket subjects') %></TD>
+ <TD BGCOLOR="#ffffff"><% $cust_main->edit_subject ? 'yes' : 'no' %></TD>
+ </TR>
+
+% }
+
</TABLE></TD></TR></TABLE>
<%init>
diff --git a/httemplate/view/cust_main/tickets.html b/httemplate/view/cust_main/tickets.html
index e0262b895..863c66be4 100644
--- a/httemplate/view/cust_main/tickets.html
+++ b/httemplate/view/cust_main/tickets.html
@@ -132,6 +132,14 @@ my( $new_base, %new_param ) =
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';