[Rt-commit] rt branch, 4.2/selfservice-display-cf-groupings, created. rt-4.2.0rc2-1-gf9f77c1
Alex Vandiver
alexmv at bestpractical.com
Mon Sep 23 16:05:51 EDT 2013
The branch, 4.2/selfservice-display-cf-groupings has been created
at f9f77c19333535a4a795aa747f72e5d52f9e1719 (commit)
- Log -----------------------------------------------------------------
commit f9f77c19333535a4a795aa747f72e5d52f9e1719
Author: Alex Vandiver <alexmv at bestpractical.com>
Date: Mon Sep 23 16:00:15 2013 -0400
Use custom field groupings on SelfService display page
For backwards compatibility, ungrouped CFs are displayed in the "Basics"
box after Basics and "Basics"-specific CFs. This also moves the table
boundries to resolve [rt3 #26103], aligning all of the labels.
Note that the SelfService update page is unaffected, and does not
respect groupings. However, all CFs are correctly displayed once, which
was not the case with the display page prior to this change.
diff --git a/share/html/Elements/ShowCustomFieldCustomGroupings b/share/html/Elements/ShowCustomFieldCustomGroupings
index c281f4c..5f3dd53 100644
--- a/share/html/Elements/ShowCustomFieldCustomGroupings
+++ b/share/html/Elements/ShowCustomFieldCustomGroupings
@@ -46,7 +46,7 @@
%#
%# END BPS TAGGED BLOCK }}}
<%perl>
-for my $group ( RT::CustomField->CustomGroupings( $Object ), '' ) {
+for my $group ( @Groupings ) {
my %grouping_args = (
title => $group? loc($group) : loc('Custom Fields'),
class => $css_class .' '. ($group? CSSClass("$css_class-$group") : ''),
@@ -63,6 +63,7 @@ for my $group ( RT::CustomField->CustomGroupings( $Object ), '' ) {
<%ARGS>
$Object
$title_href => ""
+ at Groupings => ()
</%ARGS>
<%INIT>
my $css_class = lc(ref($Object)||$Object);
@@ -72,4 +73,6 @@ $css_class = CSSClass($css_class);
$css_class .= '-info-cfs';
my $TitleBoxARGS = delete $ARGS{TitleBoxARGS} || {};
+
+ at Groupings = (RT::CustomField->CustomGroupings( $Object ), '') unless @Groupings;
</%INIT>
diff --git a/share/html/SelfService/Display.html b/share/html/SelfService/Display.html
index 3088b69..134c4a3 100644
--- a/share/html/SelfService/Display.html
+++ b/share/html/SelfService/Display.html
@@ -58,9 +58,14 @@
($LinkBasicsTitle ? (title_href => $title_box_link) : ()),
title_class=> 'inverse',
color => "#993333" &>
- <& /Ticket/Elements/ShowBasics, Ticket => $Ticket &>
- <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket &>
+ <& /Ticket/Elements/ShowBasics, Ticket => $Ticket, UngroupedCFs => 1 &>
</&>
+
+ <& /Elements/ShowCustomFieldCustomGroupings,
+ Object => $Ticket,
+ title_href => ($LinkBasicsTitle ? RT->Config->Get('WebPath')."/SelfService/Update.html" : "" ),
+ Groupings => [ grep {$_ !~ /^(Basics|Dates)$/} RT::CustomField->Groupings( "RT::Ticket" ) ],
+ &>
</td>
<td valign="top" width="50%" class="boxcontainer">
<&| /Widgets/TitleBox, title => loc("Dates"),
diff --git a/share/html/Ticket/Elements/ShowBasics b/share/html/Ticket/Elements/ShowBasics
index ff8d506..fe265c6 100644
--- a/share/html/Ticket/Elements/ShowBasics
+++ b/share/html/Ticket/Elements/ShowBasics
@@ -84,8 +84,12 @@
</tr>
% }
<& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket, Grouping => 'Basics', Table => 0 &>
+% if ($UngroupedCFs) {
+ <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket, Grouping => '', Table => 0 &>
+% }
% $m->callback( %ARGS, CallbackName => 'EndOfList', TicketObj => $Ticket );
</table>
<%ARGS>
$Ticket => undef
+$UngroupedCFs => 0
</%ARGS>
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list