X-Git-Url: http://git.home-dn.net/?p=manu%2FRT-Extension-UserDetails.git;a=blobdiff_plain;f=html%2FElements%2FShowUserDetails;h=8d7a78cc8450febb766d9a8b22f5c6f3bb3ede90;hp=0e756bddbab6b61f1fc957e774b11fa59a08efe5;hb=5fc0b8191f58e1ec94cd4320e20afcb3d298c424;hpb=7800b5fbf66b41202edd9c76c0a45cb14c0e362d diff --git a/html/Elements/ShowUserDetails b/html/Elements/ShowUserDetails index 0e756bd..8d7a78c 100644 --- a/html/Elements/ShowUserDetails +++ b/html/Elements/ShowUserDetails @@ -1,8 +1,8 @@ % if ( $Toggle ) { - +<% loc('Details') %>
- +<% loc('Close') %>
% } else { - +<% loc('Details') %> % }
@@ -22,8 +22,11 @@ my $url = RT->Config->Get('WebPath') ."/Helpers/Toggle/UserDetails?id=". $id; # Default Attributes to display # SortOrder => { AttributeName => '', # DisplayName => '', } -unless ( RT->Config->Get('UserDetailsAttributes') ) { - RT->Config->Set('UserDetailsAttributes', +my %attributes; +if ( RT->Config->Get('UserDetailsAttributes') ) { + %attributes = RT->Config->Get('UserDetailsAttributes'); +} else { + %attributes = ( 1 => { AttributeName => 'RealName', DisplayName => 'Real Name', }, @@ -32,14 +35,10 @@ unless ( RT->Config->Get('UserDetailsAttributes') ) { }, 3 => { AttributeName => 'Organization', DisplayName => 'Organization', - }, + }, ); } -my %attributes = RT->Config->Get('UserDetailsAttributes'); - - - my $User; # Load User only if needed