[Rt-commit] rt branch, another_utf8_rework, created. rt-3.8.7-53-g93972ff

Ruslan Zakirov ruz at bestpractical.com
Fri Dec 18 20:15:44 EST 2009


The branch, another_utf8_rework has been created
        at  93972ffeb04f37b48b17ebdba7af0b232a358e4e (commit)

- Log -----------------------------------------------------------------
commit e4a6c049db98b1f0891d6624e454ad6d490b34f4
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 13:25:10 2009 -0500

    Ignore .prove files

diff --git a/.gitignore b/.gitignore
index c5006d5..842d793 100644
--- a/.gitignore
+++ b/.gitignore
@@ -36,6 +36,7 @@ config.pld
 *~
 *.swp
 *.swo
+.prove
 
 # RT4 junk
 META.yml

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>

commit f559033c8aec58f6f3fd42b93c8e2b6b3113671e
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 14:11:00 2009 -0500

    Link each relation label to a search for such tickets

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 9a8e2a2..dfa251f 100755
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Depends on')) |n %>: (<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Depends on'), 'DependsOn', 'Base') |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"><% $relation_label->(loc('Depended on by')) |n %>: (<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Depended on by'), 'DependsOn', 'Target') |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"><% $relation_label->(loc('Parents')) |n %>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Parents'), 'MemberOf', 'Base') |n %>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td>
     <td class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Children')) |n %>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Children'), 'MemberOf', 'Target') |n %>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td>
     <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Refers to')) |n %>: (<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Refers to'), 'RefersTo', 'Base') |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"><% $relation_label->(loc('Referred to by')) |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Referred to by'), 'RefersTo', 'Target') |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
     <td class="value">
     <ul>
 % while (my $Link = $Ticket->ReferredToBy->Next) {
@@ -154,8 +154,17 @@ for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
 }
 
 my $relation_label = sub {
-    my $name = shift;
-    return $name;
+    my $name     = shift;
+    my $relation = shift;
+    my $type     = shift;
+
+    my $search_type = $type eq 'Base' ? 'Target' : 'Base';
+    my $search_relation = RT::Ticket->LINKDIRMAP->{$relation}{$search_type};
+
+    my $Query = $search_relation . ' = ' . $Ticket->id;
+    my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
+
+    return '<a href="' . $SearchURL . '">' . $name . '</a>';
 };
 
 </%INIT>

commit d5846df7c24b54b27ff446f99ad4ee446e2229e5
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 14:22:35 2009 -0500

    Look up the mode in LINKTYPEMAP instead of hardcoding things

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index dfa251f..6a974d7 100755
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Depends on'), 'DependsOn', 'Base') |n %>: (<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Depends on'), 'DependsOn') |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"><% $relation_label->(loc('Depended on by'), 'DependsOn', 'Target') |n %>: (<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Depended on by'), 'DependedOnBy') |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"><% $relation_label->(loc('Parents'), 'MemberOf', 'Base') |n %>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Parents'), '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"><% $relation_label->(loc('Children'), 'MemberOf', 'Target') |n %>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Children'), '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"><% $relation_label->(loc('Refers to'), 'RefersTo', 'Base') |n %>: (<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Refers to'), 'RefersTo') |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"><% $relation_label->(loc('Referred to by'), 'RefersTo', 'Target') |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><% $relation_label->(loc('Referred to by'), 'ReferredToBy') |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
     <td class="value">
     <ul>
 % while (my $Link = $Ticket->ReferredToBy->Next) {
@@ -156,10 +156,11 @@ for my $relation ( qw(MemberOf Members DependsOn DependedOnBy)) {
 my $relation_label = sub {
     my $name     = shift;
     my $relation = shift;
-    my $type     = shift;
 
-    my $search_type = $type eq 'Base' ? 'Target' : 'Base';
-    my $search_relation = RT::Ticket->LINKDIRMAP->{$relation}{$search_type};
+    my $typemap = RT::Ticket->LINKTYPEMAP->{$relation};
+    my $search_mode = $typemap->{Mode};
+    my $search_type = $typemap->{Type};
+    my $search_relation = RT::Ticket->LINKDIRMAP->{$search_type}{$search_mode};
 
     my $Query = $search_relation . ' = ' . $Ticket->id;
     my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);

commit 096c03ed631632bcfcdbd33c6c5c5f6b1e2b6edb
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 14:43:48 2009 -0500

    Refactor the anonymous function into an Element

diff --git a/share/html/Elements/ShowLinks b/share/html/Elements/ShowLinks
index 6a974d7..ad370c7 100755
--- a/share/html/Elements/ShowLinks
+++ b/share/html/Elements/ShowLinks
@@ -47,7 +47,7 @@
 %# END BPS TAGGED BLOCK }}}
 <table>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Depends on'), 'DependsOn') |n %>: (<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>: (<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"><% $relation_label->(loc('Depended on by'), 'DependedOnBy') |n %>: (<a href="<%$clone->{'new-DependsOn'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>: (<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"><% $relation_label->(loc('Parents'), 'Parents') |n %>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>: (<a href="<%$clone->{'MemberOf-new'}%>"><% loc('Create') %></a>)</td>
     <td class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Children'), 'Children') |n %>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>: (<a href="<%$clone->{'new-MemberOf'}%>"><% loc('Create') %></a>)</td>
     <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td>
   </tr>
   <tr>
-    <td class="labeltop"><% $relation_label->(loc('Refers to'), 'RefersTo') |n %>: (<a href="<%$clone->{'RefersTo-new'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>: (<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"><% $relation_label->(loc('Referred to by'), 'ReferredToBy') |n %>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>: (<a href="<%$clone->{'new-RefersTo'}%>"><% loc('Create') %></a>)</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,32 +143,16 @@ 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";
 }
 
-my $relation_label = sub {
-    my $name     = shift;
-    my $relation = shift;
-
-    my $typemap = RT::Ticket->LINKTYPEMAP->{$relation};
-    my $search_mode = $typemap->{Mode};
-    my $search_type = $typemap->{Type};
-    my $search_relation = RT::Ticket->LINKDIRMAP->{$search_type}{$search_mode};
-
-    my $Query = $search_relation . ' = ' . $Ticket->id;
-    my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
-
-    return '<a href="' . $SearchURL . '">' . $name . '</a>';
-};
-
 </%INIT>
 
 <%ARGS>
diff --git a/share/html/Elements/ShowRelationLabel b/share/html/Elements/ShowRelationLabel
new file mode 100644
index 0000000..3c1ed15
--- /dev/null
+++ b/share/html/Elements/ShowRelationLabel
@@ -0,0 +1,62 @@
+%# BEGIN BPS TAGGED BLOCK {{{
+%# 
+%# COPYRIGHT:
+%# 
+%# This software is Copyright (c) 1996-2009 Best Practical Solutions, LLC
+%#                                          <jesse at bestpractical.com>
+%# 
+%# (Except where explicitly superseded by other copyright notices)
+%# 
+%# 
+%# LICENSE:
+%# 
+%# This work is made available to you under the terms of Version 2 of
+%# the GNU General Public License. A copy of that license should have
+%# been provided with this software, but in any event can be snarfed
+%# from www.gnu.org.
+%# 
+%# This work 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.
+%# 
+%# You should have received a copy of the GNU General Public License
+%# along with this program; if not, write to the Free Software
+%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+%# 02110-1301 or visit their web page on the internet at
+%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
+%# 
+%# 
+%# CONTRIBUTION SUBMISSION POLICY:
+%# 
+%# (The following paragraph is not intended to limit the rights granted
+%# to you to modify and distribute this software under the terms of
+%# the GNU General Public License and is only of importance to you if
+%# you choose to contribute your changes and enhancements to the
+%# community by submitting them to Best Practical Solutions, LLC.)
+%# 
+%# By intentionally submitting any modifications, corrections or
+%# derivatives to this work, or any other work intended for use with
+%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
+%# you are the copyright holder for those contributions and you grant
+%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
+%# royalty-free, perpetual, license to use, copy, create derivative
+%# works based on those contributions, and sublicense and distribute
+%# those contributions and any derivatives thereof.
+%# 
+%# END BPS TAGGED BLOCK }}}
+<a href="<%$SearchURL |n %>"><%$Label%></a>
+<%INIT>
+my $typemap = RT::Ticket->LINKTYPEMAP->{$Relation};
+my $search_mode = $typemap->{Mode};
+my $search_type = $typemap->{Type};
+my $search_relation = RT::Ticket->LINKDIRMAP->{$search_type}{$search_mode};
+
+my $Query = $search_relation . ' = ' . $id;
+my $SearchURL = RT->Config->Get('WebPath') . '/Search/Results.html?' . $m->comp('/Elements/QueryString', Query => $Query);
+</%INIT>
+<%ARGS>
+$id
+$Label
+$Relation
+</%ARGS>

commit bf387cecf3ba48e6fa836fad478061778f29146b
Author: Shawn M Moore <sartak at bestpractical.com>
Date:   Thu Dec 17 14:51:16 2009 -0500

    use ShowRelationLabel in EditLinks too

diff --git a/share/html/Elements/EditLinks b/share/html/Elements/EditLinks
index 637762e..90acb46 100755
--- a/share/html/Elements/EditLinks
+++ b/share/html/Elements/EditLinks
@@ -52,7 +52,7 @@
 
 <table>
   <tr>
-    <td class="labeltop"><&|/l&>Depends on</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:</td>
     <td class="value">
 % while (my $link = $Object->DependsOn->Next) {
       <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
@@ -61,7 +61,7 @@
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><&|/l&>Depended on by</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:</td>
     <td class="value">
 % while (my $link = $Object->DependedOnBy->Next) {
       <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
@@ -70,7 +70,7 @@
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><&|/l&>Parents</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:</td>
     <td class="value">
 % while (my $link = $Object->MemberOf->Next) {
       <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
@@ -79,7 +79,7 @@
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><&|/l&>Children</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:</td>
     <td class="value">
 % while (my $link = $Object->Members->Next) {
       <input type="checkbox" class="checkbox" name="DeleteLink-<%$link->Base%>-<%$link->Type%>-" value="1" />
@@ -88,7 +88,7 @@
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><&|/l&>Refers to</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:</td>
     <td class="value">
 % while (my $link = $Object->RefersTo->Next) {
       <input type="checkbox" class="checkbox" name="DeleteLink--<%$link->Type%>-<%$link->Target%>" value="1" />
@@ -97,7 +97,7 @@
     </td>
   </tr>
   <tr>
-    <td class="labeltop"><&|/l&>Referred to by</&>:</td>
+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:</td>
     <td class="value">
 % while (my $link = $Object->ReferredToBy->Next) {
 % # Skip reminders
@@ -134,27 +134,27 @@
   </tr>
 % }
   <tr>
-    <td class="label"><&|/l&>Depends on</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:</td>
     <td class="entry"><input name="<%$id%>-DependsOn" /></td>
   </tr>
   <tr>
-    <td class="label"><&|/l&>Depended on by</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:</td>
     <td class="entry"><input name="DependsOn-<%$id%>" /></td>
   </tr>
   <tr>
-    <td class="label"><&|/l&>Parents</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:</td>
     <td class="entry"><input name="<%$id%>-MemberOf" /></td>
   </tr>
   <tr>
-    <td class="label"><&|/l&>Children</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:</td>
     <td class="entry"> <input name="MemberOf-<%$id%>" /></td>
   </tr>
   <tr>
-    <td class="label"><&|/l&>Refers to</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:</td>
     <td class="entry"><input name="<%$id%>-RefersTo" /></td>
   </tr>
   <tr>
-    <td class="label"><&|/l&>Referred to by</&>:</td>
+    <td class="label"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:</td>
     <td class="entry"> <input name="RefersTo-<%$id%>" /></td>
   </tr>
 % $m->callback( CallbackName => 'NewLink' );

commit 93972ffeb04f37b48b17ebdba7af0b232a358e4e
Author: Emmanuel Lacour <elacour at easter-eggs.com>
Date:   Fri Dec 18 11:02:07 2009 +0100

    Fix some documentation typo in rt-clean-session

diff --git a/sbin/rt-clean-sessions.in b/sbin/rt-clean-sessions.in
index ac736e6..7be5ce9 100644
--- a/sbin/rt-clean-sessions.in
+++ b/sbin/rt-clean-sessions.in
@@ -139,11 +139,11 @@ rt-clean-sessions - clean old and duplicate RT sessions
 
     rt-clean-sessions [--debug] [--older <NUM>[H|D|M|Y]]
 
-    rt-clean sessions
-    rt-clean sessions --debug
-    rt-clean sessions --older 10D
-    rt-clean sessions --debug --older 1M
-    rt-clean sessions --older 10D --skip-user
+    rt-clean-sessions
+    rt-clean-sessions --debug
+    rt-clean-sessions --older 10D
+    rt-clean-sessions --debug --older 1M
+    rt-clean-sessions --older 10D --skip-user
 
 =head1 DESCRIPTION
 
@@ -162,7 +162,7 @@ Script is safe because data in the sessions is temporary and can be deleted.
 Date interval in the C<< <NUM>[<unit>] >> format. Default unit is D(ays),
 H(our), M(onth) and Y(ear) are also supported.
 
-For exmaple: C<rt-clean sessions --older 1M> would delete all sessions that are
+For example: C<rt-clean-sessions --older 1M> would delete all sessions that are
 older than 1 month.
 
 =item skip-user

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


More information about the Rt-commit mailing list