[Bps-public-commit] r20146 - in RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket: . Elements

ruz at bestpractical.com ruz at bestpractical.com
Wed Nov 25 15:00:11 EST 2009


Author: ruz
Date: Wed Nov 25 15:00:08 2009
New Revision: 20146

Added:
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/Elements/
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/Elements/Tabs/
   RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/Elements/Tabs/Default

Log:
* replace Ticket/Elements/Tabs overlay with a callback

Added: RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/Elements/Tabs/Default
==============================================================================
--- (empty file)
+++ RT-Extension-rt_cpan_org/html/Callbacks/rt_cpan_org/Ticket/Elements/Tabs/Default	Wed Nov 25 15:00:08 2009
@@ -0,0 +1,23 @@
+<%ARGS>
+$Ticket => undef
+$actions => {}
+</%ARGS>
+<%INIT>
+return unless $Ticket;
+
+# we want to hide Comments on rt.cpan.org
+
+my $loc_comment = loc('Comment');
+foreach my $k ( keys %$actions ) {
+    next unless $actions->{$k}{'title'} eq $loc_comment;
+
+    delete $actions->{$k};
+}
+
+my $loc_resolve = loc('Resolve');
+foreach my $k ( keys %$actions ) {
+    next unless $actions->{$k}{'title'} eq $loc_resolve;
+
+    $actions->{$k}{'path'} =~ s{\bAction=Comment\b}{Action=Respond};
+}
+</%INIT>



More information about the Bps-public-commit mailing list