[Rt-commit] rt branch, 4.2/cf-groupings-callback, created. rt-4.1.8-551-g39abe7c

Alex Vandiver alexmv at bestpractical.com
Wed Jun 5 18:28:04 EDT 2013


The branch, 4.2/cf-groupings-callback has been created
        at  39abe7ccf039a33f7aed3d677864e2dec800c98e (commit)

- Log -----------------------------------------------------------------
commit 39abe7ccf039a33f7aed3d677864e2dec800c98e
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Wed Jun 5 18:28:01 2013 -0400

    Add a callback which can manipulate the args to the grouping's titlebox

diff --git a/share/html/Elements/ShowCustomFieldCustomGroupings b/share/html/Elements/ShowCustomFieldCustomGroupings
index 2a6ed96..f88eb91 100644
--- a/share/html/Elements/ShowCustomFieldCustomGroupings
+++ b/share/html/Elements/ShowCustomFieldCustomGroupings
@@ -45,16 +45,17 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-% foreach my $group ( RT::CustomField->CustomGroupings( $Object ), '' ) {
-<&| /Widgets/TitleBox,
-    title => $group? loc($group) : loc('Custom Fields'),
-    class => $css_class .' '. ($group? CSSClass("$css_class-$group") : ''),
-    hide_empty => 1,
-    title_href => $title_href ? "$title_href?id=".$Object->id.($group?";Grouping=".$m->interp->apply_escapes($group, 'u'):"") : undef,
-    %$TitleBoxARGS,
-&>
-<& ShowCustomFields, %ARGS, Object => $Object, Grouping => $group &>
-</&>
+<%perl>
+for my $group ( RT::CustomField->CustomGroupings( $Object ), '' ) {
+    my %grouping_args = (%$TitleBoxARGS,
+        title => $group? loc($group) : loc('Custom Fields'),
+        class => $css_class .' '. ($group? CSSClass("$css_class-$group") : ''),
+        hide_empty => 1,
+        title_href => $title_href ? "$title_href?id=".$Object->id.($group?";Grouping=".$m->interp->apply_escapes($group, 'u'):"") : undef,
+    );
+    $m->callback( CallbackName => 'TitleBox', Object => $Object, Grouping => $group, ARGSRef => \%grouping_args );
+</%perl>
+<&|/Widgets/TitleBox, %grouping_args &><& ShowCustomFields, %ARGS, Grouping => $group &></&>
 % }
 <%ARGS>
 $Object

-----------------------------------------------------------------------


More information about the Rt-commit mailing list