% if ( $Toggle ) { <% loc('Details') %>
<% loc('Close') %>
% } else { <% loc('Details') %> % }
<%init> my $url = RT->Config->Get('WebPath') ."/Helpers/Toggle/UserDetails?id=". $id; # Default Attributes to display # SortOrder => { AttributeName => '', # DisplayName => '', } my %attributes; if ( RT->Config->Get('UserDetailsAttributes') ) { %attributes = RT->Config->Get('UserDetailsAttributes'); } else { %attributes = ( 1 => { AttributeName => 'RealName', DisplayName => 'Real Name', }, 2 => { AttributeName => 'EmailAddress', DisplayName => 'Email', }, 3 => { AttributeName => 'Organization', DisplayName => 'Organization', }, ); } my $User; # Load User only if needed if ( $Toggle ) { $User = RT::User->new( $session{'CurrentUser'} ); $User->Load( $id ); } <%args> $id $Toggle => 0