[Rt-commit] rt branch, 4.0/attributes-on-system-configuration, created. rt-4.0.0rc6-23-g0b45941

Kevin Falcone falcone at bestpractical.com
Thu Mar 10 18:50:30 EST 2011


The branch, 4.0/attributes-on-system-configuration has been created
        at  0b459417e43bfe18100ded0e0c75785b62930669 (commit)

- Log -----------------------------------------------------------------
commit 0b459417e43bfe18100ded0e0c75785b62930669
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Thu Mar 10 18:48:57 2011 -0500

    Add a new table that shows RT::System Attributes
    
    Inspired because you might want to debug someone's custom CSS
    but there is some other useful data in there.
    
    I didn't see any other Attributes for 4.0 that seemed to belong here.
    Showing User Attributes on a User page for SuperUser might be another
    useful debugging trick

diff --git a/share/html/Admin/Tools/Configuration.html b/share/html/Admin/Tools/Configuration.html
index e425040..4ef29a5 100644
--- a/share/html/Admin/Tools/Configuration.html
+++ b/share/html/Admin/Tools/Configuration.html
@@ -190,6 +190,29 @@ for my $type (qw/Tickets Queues Transactions Groups PrivilegedUsers Unprivileged
 </td>
 </table>
 
+<&|/Widgets/TitleBox, title => loc("Global Attributes") &>
+<table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
+<tr class="collection-as-table">
+<th class="collection-as-table"><&|/l&>Name</&></th>
+<th class="collection-as-table"><&|/l&>Value</&></th>
+</tr>
+% my $attrs = $RT::System->Attributes;
+% my $index_size = 0;
+% while ( my $attr = $attrs->Next ) {
+<tr class="<% $index_size%2 ? 'oddline' : 'evenline'%>">
+% if ($attr->Name eq 'UserLogo') {
+%   my $content = $attr->Content;
+%   delete $content->{data};
+<td><% $attr->Name %></td><td><% stringify($content) |n %></td>
+% } else {
+<td><% $attr->Name %></td><td><% stringify($attr->Content) |n %></td>
+% }
+</tr>
+% $index_size++;
+% }
+</table>
+</&>
+
 <&|/Widgets/TitleBox, title => loc("Loaded perl modules")&>
 <table border="0" cellspacing="0" cellpadding="5" width="100%" class="collection">
 <tr class="collection-as-table">

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


More information about the Rt-commit mailing list