[Rt-commit] rt branch, 3.8-trunk, updated. rt-3.8.7-48-g1c4d8bd

sartak at bestpractical.com sartak at bestpractical.com
Thu Dec 17 13:46:16 EST 2009


The branch, 3.8-trunk has been updated
       via  1c4d8bd9b02cb8c880b2b8e9dfc4262e878b8282 (commit)
      from  e4a6c049db98b1f0891d6624e454ad6d490b34f4 (commit)

Summary of changes:
 share/html/Elements/ShowLinks |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)

- Log -----------------------------------------------------------------
commit 1c4d8bd9b02cb8c880b2b8e9dfc4262e878b8282
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 13:45:53 2009 -0500

    Refactor ShowLinks so that we can change how each relation label is displayed

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 569bad3..9a8e2a2 100755
--- a/share/html/Elements/ShowLinks
+++ b/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"><% $relation_label->(loc('Depends on')) |n %>: (<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</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"><% $relation_label->(loc('Depended on by')) |n %>: (<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</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"><% $relation_label->(loc('Parents')) |n %>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</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"><% $relation_label->(loc('Children')) |n %>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</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"><% $relation_label->(loc('Refers to')) |n %>: (<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</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"><% $relation_label->(loc('Referred to by')) |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
     <td class="value">
     <ul>
 % while (my $Link = $Ticket->ReferredToBy->Next) {
@@ -153,6 +153,11 @@ for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
     $clone->{$field} = $path . "&$field=". $Ticket->id ;
 }
 
+my $relation_label = sub {
+    my $name = shift;
+    return $name;
+};
+
 </%INIT>
 
 <%ARGS>

-----------------------------------------------------------------------


More information about the Rt-commit mailing list