% for ( \%Base, \%Target ) {
%     no strict 'refs';
  <tr>
    <td class="labeltop"><&|/l&><% $_->{Name} %></&>:</td>
    <td class="value">
    <ul>
% my $method = $_->{Method};
% while (my $Link = $Asset->$method->Next) {
%     my $uri_method = $_->{Mode} . 'URI';
%     if ( ( $SkipTickets || $ShowOnlyTickets ) && $Link->$uri_method->IsLocal ) {
%         my $object = $_->{Mode} eq 'Base' ? $Link->TargetObj : $Link->BaseObj;
%         if ( $SkipTickets && $method eq 'ReferredToBy' && ref( $Link->BaseObj ) eq 'RT::Ticket' ) { next; }
%         if ( $ShowOnlyTickets && ref( $object ) ne 'RT::Ticket' ) { next; }
%         if ( $SkipResolvedTickets && ref( $object ) eq 'RT::Ticket'
%              && $object->QueueObj->IsInactiveStatus( $object->Status ) ) { next; }
%     }
<li><& /Elements/ShowLink, URI => $_->{Mode} eq 'Base' ? $Link->TargetURI : $Link->BaseURI &>
% }
</ul>
    </td>
  </tr>
% }

<%INIT>
my ($Target, $Base_name, $Target_name);

$Base_name = $Map->{$Base}{Name};
$Target = $Map->{$Base}{Mate};
$Target_name = $Map->{$Target}{Name};

my %Base   = ( Name => $Base_name,   Method => $Base,   Mode => 'Base' );
my %Target = ( Name => $Target_name, Method => $Target, Mode => 'Target' );
</%INIT>

<%ARGS>
$Asset
$Base
$Map
$SkipTickets => 1
$SkipResolvedTickets => 0
$ShowOnlyTickets => 0
</%ARGS>
