X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fshare%2Fhtml%2FElements%2FEditLinks;h=b6fb97c9e3d7698ae098e84c0ba385f367741e69;hp=6a3f4b6b5ec9bcd2dab8f751545116b8f7153436;hb=de9d037528895f7151a9aead6724ce2df95f9586;hpb=3d0a1bb06b895c5be6e3f0517d355442a6b1e125 diff --git a/rt/share/html/Elements/EditLinks b/rt/share/html/Elements/EditLinks index 6a3f4b6b5..b6fb97c9e 100755 --- a/rt/share/html/Elements/EditLinks +++ b/rt/share/html/Elements/EditLinks @@ -2,7 +2,7 @@ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2017 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -52,59 +52,59 @@ - + - + - + - + - + - + @@ -113,68 +113,14 @@
<& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Depends on'), Relation => 'DependsOn' &>: % while (my $link = $Object->DependsOn->Next) { - - <& ShowLink, URI => $link->TargetURI &>
+ +
% }
<& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>: % while (my $link = $Object->DependedOnBy->Next) { - - <& ShowLink, URI => $link->BaseURI &>
+ +
% }
<& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Parents'), Relation => 'Parents' &>: % while (my $link = $Object->MemberOf->Next) { % next if $link->Target and $link->Target =~ m(^freeside://); - - <& ShowLink, URI => $link->TargetURI &>
+ +
% }
<& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Children'), Relation => 'Children' &>: % while (my $link = $Object->Members->Next) { - - <& ShowLink, URI => $link->BaseURI &>
+ +
% }
<& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Refers to'), Relation => 'RefersTo' &>: % while (my $link = $Object->RefersTo->Next) { - - <& ShowLink, URI => $link->TargetURI &>
+ +
%}
<& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:<& ShowRelationLabel, Object => $Object, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>: % while (my $link = $Object->ReferredToBy->Next) { % # Skip reminders -% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->Type eq 'reminder'); - - <& ShowLink, URI => $link->BaseURI &>
+% next if (UNIVERSAL::isa($link->BaseObj, 'RT::Ticket') && $link->BaseObj->__Value('Type') eq 'reminder'); + +
% }
<&|/l&>(Check box to delete)
- +

<&|/l&>New Links

-% if (ref($Object) eq 'RT::Ticket') { -<&|/l&>Enter tickets or URIs to link tickets to. Separate multiple entries with spaces. -
<&|/l&>You may enter links to Articles as "a:###", where ### represents the number of the Article. -% $m->callback( CallbackName => 'ExtraLinkInstructions' ); -

-% } elsif (ref($Object) eq 'RT::Queue') { -<&|/l&>Enter queues or URIs to link queues to. Separate multiple entries with spaces. -
-% } else { -<&|/l&>Enter objects or URIs to link objects to. Separate multiple entries with spaces.
-% } - -% if ($Merge) { - - - - -% } - - - - - - - - - - - - - - - - - - - - - - - - -% $m->callback( CallbackName => 'NewLink' ); -
<&|/l&>Merge into: <&|/l&>(only one ticket)
<& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:
<& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:
<& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:
<& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:
<& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:
<& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:
+<& AddLinks, %ARGS &> - -<%INIT> -my $id; -if ($Object && $Object->Id) { - $id = $Object->Id; -} else { - $id = 'new'; -} - - <%ARGS> $Object => undef -$Merge => 0