projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
no need for FS calendar buttons in RT 4.2
[freeside.git]
/
rt
/
share
/
html
/
Elements
/
ShowLink
diff --git
a/rt/share/html/Elements/ShowLink
b/rt/share/html/Elements/ShowLink
index
0bd0019
..
4693034
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
7
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,25
+45,29
@@
%# 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%>">
-% if ($URI->IsLocal) {
% my $member = $URI->Object;
% my $member = $URI->Object;
-% if (UNIVERSAL::isa($member, "RT::Ticket")) {
-% my $inactive = $member->QueueObj->IsInactiveStatus($member->Status);
+% if (blessed($member) and $member->isa("RT::Ticket") and $member->CurrentUserHasRight('ShowTicket')) {
+% my $class = $member->QueueObj->IsInactiveStatus($member->Status)
+% ? 'ticket-inactive'
+% : 'ticket-active';
+% $class .= ' '.CSSClass($member->Status);
-<span class="<% $
inactive ? 'ticket-inactive' : ''
%>">
-<
%$member->Id%>: (<& /Elements/ShowUser, User => $member->OwnerObj &>) <%$member->Subject%> [<% loc($member->Status) %>]
+<span class="<% $
class
%>">
+<
a href="<% $href %>"><%$member->Id%>: <%$member->Subject || ''%> [<% loc($member->Status) %>]</a> (<& /Elements/ShowUser, User => $member->OwnerObj &>)
</span>
</span>
-% } elsif ( UNIVERSAL::can($member, 'Name')) {
-<%$URI->Resolver->AsString%>: <%$member->Name%>
% } else {
% } else {
-<
%$URI->Resolver->AsString%
>
+<
a href="<% $href %>"><%$URI->AsString%></a
>
% }
% }
-% } else {
-<%$URI->Resolver->AsString%>
-% }
-</a>
<%ARGS>
$URI => undef
</%ARGS>
<%ARGS>
$URI => undef
</%ARGS>
+
+<%INIT>
+my $href = $URI->AsHREF;
+if ( $URI->IsLocal ) {
+ my $base = RT->Config->Get('WebBaseURL');
+ # URI->rel doesn't contain the leading '/'
+ $href = '/' . URI->new($href)->rel($base);
+}
+</%INIT>