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

Alex Vandiver alexmv at bestpractical.com
Thu Jun 6 02:23:18 EDT 2013


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

- Log -----------------------------------------------------------------
commit 8242be3d66db585a77c1580286ec1af0d866ecc7
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..c281f4c 100644
--- a/share/html/Elements/ShowCustomFieldCustomGroupings
+++ b/share/html/Elements/ShowCustomFieldCustomGroupings
@@ -45,14 +45,18 @@
 %# 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,
-&>
+<%perl>
+for my $group ( RT::CustomField->CustomGroupings( $Object ), '' ) {
+    my %grouping_args = (
+        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,
+    );
+    $m->callback( CallbackName => 'TitleBox', Object => $Object, Grouping => $group, ARGSRef => \%grouping_args );
+</%perl>
+<&| /Widgets/TitleBox, %grouping_args &>
 <& ShowCustomFields, %ARGS, Object => $Object, Grouping => $group &>
 </&>
 % }

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


More information about the Rt-commit mailing list