projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rt 4.0.20 (RT#13852)
[freeside.git]
/
rt
/
share
/
html
/
Elements
/
ShowLink
diff --git
a/rt/share/html/Elements/ShowLink
b/rt/share/html/Elements/ShowLink
index
0bd0019
..
35b2638
100644
(file)
--- a/
rt/share/html/Elements/ShowLink
+++ b/
rt/share/html/Elements/ShowLink
@@
-2,7
+2,7
@@
%#
%# COPYRIGHT:
%#
%#
%# COPYRIGHT:
%#
-%# This software is Copyright (c) 1996-201
1
Best Practical Solutions, LLC
+%# This software is Copyright (c) 1996-201
4
Best Practical Solutions, LLC
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
%# <sales@bestpractical.com>
%#
%# (Except where explicitly superseded by other copyright notices)
@@
-45,17
+45,19
@@
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
-<a href="<%
$URI->Resolver->HREF
%>">
+<a href="<%
$href
%>">
% if ($URI->IsLocal) {
% my $member = $URI->Object;
% if ($URI->IsLocal) {
% my $member = $URI->Object;
-% if (UNIVERSAL::isa($member, "RT::Ticket")) {
+% my $has_name = UNIVERSAL::can($member, 'Name') || (UNIVERSAL::can($member, '_Accessible') && $member->_Accessible('Name', 'read'));
+% if (UNIVERSAL::isa($member, "RT::Ticket") and $member->CurrentUserHasRight('ShowTicket')) {
% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
<span class="<% $inactive ? 'ticket-inactive' : '' %>">
% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
<span class="<% $inactive ? 'ticket-inactive' : '' %>">
-<%$member->Id%>: (<& /Elements/ShowUser, User => $member->OwnerObj &>) <%$member->Subject%> [<% loc($member->Status) %>]
+
+<%$member->Id%>: (<& /Elements/ShowUser, User => $member->OwnerObj &>) <%$member->Subject || ''%> [<% loc($member->Status) %>]
</span>
</span>
-% } elsif (
UNIVERSAL::can($member, 'Name')
) {
+% } elsif (
$has_name
) {
<%$URI->Resolver->AsString%>: <%$member->Name%>
% } else {
<%$URI->Resolver->AsString%>
<%$URI->Resolver->AsString%>: <%$member->Name%>
% } else {
<%$URI->Resolver->AsString%>
@@
-67,3
+69,12
@@
<%ARGS>
$URI => undef
</%ARGS>
<%ARGS>
$URI => undef
</%ARGS>
+
+<%INIT>
+my $href = $URI->Resolver->HREF;
+if ( $URI->IsLocal ) {
+ my $base = RT->Config->Get('WebBaseURL');
+ # URI->rel doesn't contain the leading '/'
+ $href = '/' . URI->new($href)->rel($base);
+}
+</%INIT>