projects
/
manu
/
RT-Extension-UserDetails.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add missing ending ">" that prevented image to appear in some recent non-freesoftware...
[manu/RT-Extension-UserDetails.git]
/
html
/
Elements
/
ShowUserDetails
diff --git
a/html/Elements/ShowUserDetails
b/html/Elements/ShowUserDetails
index
0e756bd
..
8d7a78c
100644
(file)
--- a/
html/Elements/ShowUserDetails
+++ b/
html/Elements/ShowUserDetails
@@
-1,8
+1,8
@@
<span id="toggleuserdetails-<% $id %>">
% if ( $Toggle ) {
<span id="toggleuserdetails-<% $id %>">
% if ( $Toggle ) {
-<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>
+<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>
<div id="userdetails">
<div id="userdetails">
-<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>
+<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>
<ul>
% foreach my $sort (sort { $a <=> $b } keys %attributes) {
% my $attr_name = $attributes{$sort}{'AttributeName'};
<ul>
% foreach my $sort (sort { $a <=> $b } keys %attributes) {
% my $attr_name = $attributes{$sort}{'AttributeName'};
@@
-12,7
+12,7
@@
</ul>
</div>
% } else {
</ul>
</div>
% } else {
-<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>
+<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>
% }
</span>
% }
</span>
@@
-22,8
+22,11
@@
my $url = RT->Config->Get('WebPath') ."/Helpers/Toggle/UserDetails?id=". $id;
# Default Attributes to display
# SortOrder => { AttributeName => '',
# DisplayName => '', }
# 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',
},
1 => { AttributeName => 'RealName',
DisplayName => 'Real Name',
},
@@
-32,14
+35,10
@@
unless ( RT->Config->Get('UserDetailsAttributes') ) {
},
3 => { AttributeName => 'Organization',
DisplayName => 'Organization',
},
3 => { AttributeName => 'Organization',
DisplayName => 'Organization',
- },
+ },
);
}
);
}
-my %attributes = RT->Config->Get('UserDetailsAttributes');
-
-
-
my $User;
# Load User only if needed
my $User;
# Load User only if needed