1 <span id="toggleuserdetails-<% $id %>">
3 <a href="<% $url %>" onclick="ahah('<% $url |n %>&Toggle=0', 'toggleuserdetails-<% $id |n %>'); return false;"><img src="<% RT->Config->Get('WebPath') %>/NoAuth/images/userdetails.png" alt="<% loc('Details') %>" title="<% loc('Details') %>" style="border-style: none" /></a>
5 <a href="<% $url %>" onclick="ahah('<% $url |n %>&Toggle=0', 'toggleuserdetails-<% $id |n %>'); return false;"><img src="<% RT->Config->Get('WebPath') %>/NoAuth/images/close.png" alt="<% loc('Close') %>" title="<% loc('Close') %>" style="border-style: none" /></a>
7 % foreach my $sort (sort { $a <=> $b } keys %attributes) {
8 % my $attr_name = $attributes{$sort}{'AttributeName'};
9 % my $display_name = $attributes{$sort}{'DisplayName'};
10 <li><% loc($display_name) %>: <% $User->$attr_name || '' %></li>
15 <a href="<% $url %>" onclick="ahah('<% $url |n %>&Toggle=1', 'toggleuserdetails-<% $id |n %>'); return false;"><img src="<% RT->Config->Get('WebPath') %>/NoAuth/images/userdetails.png" alt="<% loc('Details') %>" title="<% loc('Details') %>" style="border-style: none" /></a>
20 my $url = RT->Config->Get('WebPath') ."/Helpers/Toggle/UserDetails?id=". $id;
22 # Default Attributes to display
23 # SortOrder => { AttributeName => '',
24 # DisplayName => '', }
26 if ( RT->Config->Get('UserDetailsAttributes') ) {
27 %attributes = RT->Config->Get('UserDetailsAttributes');
30 1 => { AttributeName => 'RealName',
31 DisplayName => 'Real Name',
33 2 => { AttributeName => 'EmailAddress',
34 DisplayName => 'Email',
36 3 => { AttributeName => 'Organization',
37 DisplayName => 'Organization',
44 # Load User only if needed
46 $User = RT::User->new( $session{'CurrentUser'} );