diff options
Diffstat (limited to 'rt/share/html/Elements/ShowLinks')
-rwxr-xr-x | rt/share/html/Elements/ShowLinks | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/rt/share/html/Elements/ShowLinks b/rt/share/html/Elements/ShowLinks index 569bad39c..e3b3ef509 100755 --- a/rt/share/html/Elements/ShowLinks +++ b/rt/share/html/Elements/ShowLinks @@ -47,7 +47,7 @@ %# END BPS TAGGED BLOCK }}} <table> <tr> - <td class="labeltop"><&|/l&>Depends on</&>: (<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>: <span class="create">(<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</span></td> <td class="value"> <%PERL> @@ -77,7 +77,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) { </td> </tr> <tr> - <td class="labeltop"><&|/l&>Depended on by</&>: (<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>: <span class="create">(<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</span></td> <td class="value"> <ul> % while (my $Link = $Ticket->DependedOnBy->Next) { @@ -87,15 +87,15 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) { </td> </tr> <tr> - <td class="labeltop"><&|/l&>Parents</&>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>: <span class="create">(<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</span></td> <td class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></td> </tr> <tr> - <td class="labeltop"><&|/l&>Children</&>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>: <span class="create">(<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</span></td> <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td> </tr> <tr> - <td class="labeltop"><&|/l&>Refers to</&>: (<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>: <span class="create">(<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</span></td> <td class="value"> <ul> % while (my $Link = $Ticket->RefersTo->Next) { @@ -105,7 +105,7 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) { </td> </tr> <tr> - <td class="labeltop"><&|/l&>Referred to by</&>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td> + <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>: <span class="create">(<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</span></td> <td class="value"> <ul> % while (my $Link = $Ticket->ReferredToBy->Next) { @@ -124,14 +124,15 @@ for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) { <%INIT> +my $id = $Ticket->id; + my $clone = {}; my $path = RT->Config->Get('WebPath') . '/Ticket/Create.html?Queue=' . $Ticket->Queue . '&CloneTicket=' - . $Ticket->id; - + . $id; for my $relation ( qw(RefersTo ReferredToBy)) { @@ -142,15 +143,14 @@ for my $relation ( $clone->{$field} = $path . "&$field=" . join( '%20', - ( map { $_->$other() } @{ $Ticket->$relation->ItemsArrayRef } ), - $Ticket->id ); + ( map { $_->$other() } @{ $Ticket->$relation->ItemsArrayRef } ), $id ); } for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) { my $mode = $RT::Ticket::LINKTYPEMAP{$relation}->{Mode}; my $type = $RT::Ticket::LINKTYPEMAP{$relation}->{Type}; my $field = $mode eq 'Base' ? 'new-' . $type : $type . '-new'; - $clone->{$field} = $path . "&$field=". $Ticket->id ; + $clone->{$field} = $path . "&$field=$id"; } </%INIT> |