%# BEGIN LICENSE BLOCK
%# 
%#  Copyright (c) 2002-2003 Jesse Vincent <jesse@bestpractical.com>
%#  
%#  This program is free software; you can redistribute it and/or modify
%#  it under the terms of version 2 of the GNU General Public License 
%#  as published by the Free Software Foundation.
%# 
%#  A copy of that license should have arrived with this
%#  software, but in any event can be snarfed from www.gnu.org.
%# 
%#  This program is distributed in the hope that it will be useful,
%#  but WITHOUT ANY WARRANTY; without even the implied warranty of
%#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
%#  GNU General Public License for more details.
%# 
%# END LICENSE BLOCK
<tr>
<td class="label"></td>
<td class="value"><i><&|/l&>Enter articles, tickets, or other URLs related to this article.</&>
<& LinkEntryInstructions &></i>
% unless ($id eq 'new') {
<i><&|/l&>(Check boxes to delete)</&></i><br />
% }
</td>
</tr>
<tr>
<td class="label"><&|/l&>Refers to</&>:</td>
<td><input name="<%$id%>-RefersTo" value="<%$ARGS{$id.'-RefersTo'}||''%>" /><br />
<ul>
% if ($id ne 'new') {
%   my $refersto = $ArticleObj->RefersTo;
%   while (my $link = $refersto->Next) {
%     my $member = $link->TargetURI;
<li>
<input type="CHECKBOX" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" />
%     if ($link->TargetURI->IsLocal) {
<a href="<%$member->Resolver->HREF%>"><% loc($member->Object->ObjectTypeStr) %> <%$member->Object->Id%></a>: 
%       if (UNIVERSAL::isa($member->Object, "RT::FM::Article") or UNIVERSAL::can($member->Object, 'Name')) {
<%$member->Object->Name%>
%       } elsif (UNIVERSAL::isa($member->Object, "RT::Ticket") or UNIVERSAL::can($member->Object, 'Subject')) {
<%$member->Object->Subject%>
%       }
</a>
%     } else {
<a href="<%$member->Resolver->HREF%>"><%$link->Target%></a>
%     }
%   }
% }
</ul>
</td>
</tr>
<tr>
<td class="label"><&|/l&>Referred to by</&>:</td>
<td><input name="RefersTo-<%$id%>" value="<%$ARGS{'RefersTo-'.$id}||''%>" />
<br />
<ul>
% if ($id ne 'new') {
%   my $referredtoby = $ArticleObj->ReferredToBy;
%   while (my $link = $referredtoby->Next) {
%     my $member = $link->BaseURI;
<li>
<input type="CHECKBOX" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" />
%     if ($link->BaseURI->IsLocal) {
<a href="<%$member->Resolver->HREF%>"><% loc($member->Object->ObjectTypeStr) %> <%$member->Object->Id%>: 
%       if (UNIVERSAL::isa($member->Object, "RT::FM::Article") or UNIVERSAL::can($member->Object, 'Name')) {
<%$member->Object->Name%>
%       } elsif (UNIVERSAL::isa($member->Object, "RT::Ticket") or UNIVERSAL::can($member->Object, 'Subject')) {
<%$member->Object->Subject%>
%       }
</a>
%     } else {
<a href="<%$member->Resolver->HREF%>"><%$link->Base%></a>
%     }
%   }
% }
</ul>
</td>
</tr>
<%ARGS>
$ArticleObj => undef
$id => undef
</%ARGS>
