[Rt-commit] rt branch, 4.4/hide-unset-fields-in-display, repushed

? sunnavy sunnavy at bestpractical.com
Thu Dec 5 08:57:27 EST 2013


The branch 4.4/hide-unset-fields-in-display was deleted and repushed:
       was 6ee26179a62795d4f36f7d85092cbffa46d8a830
       now ed6ae311a3f1730b722209ca060290edc29f5f60

1:  052d3f4 < -:  ------- overdue html fix
2:  08f5368 < -:  ------- we missed .overdue css before
3:  d60bf72 ! 1:  7f8f47c hide possible empty fields for people|dates|links
    @@ -6,94 +6,22 @@
     --- a/share/html/Elements/ShowLinks
     +++ b/share/html/Elements/ShowLinks
     @@
    - %#
      %# END BPS TAGGED BLOCK }}}
      <table>
    --  <tr>
    --    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:\
    --% if ($can_create) {
    --        <span class="create">(<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</span>
    --% }
    --    </td>
    --    <td class="value">
    -+% if ( $can_create || $Ticket->DependsOn->Count ) {
    - <%PERL>
    - my ( @active, @inactive, @not_tickets );
    - for my $link ( @{ $Ticket->DependsOn->ItemsArrayRef } ) {
    + % for my $type (@display) {
    ++% if ( $clone{$type} || $Object->$type->Count ) {
    +   <tr>
    +     <td class="labeltop">
    +       <& ShowRelationLabel, Object => $Object, Label => $labels{$type}.':', Relation => $type &>
     @@
    -     }
    - }
    - </%PERL>
    -+  <tr>
    -+    <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depends on'), Relation => 'DependsOn' &>:\
    -+% if ($can_create) {
    -+        <span class="create">(<a href="<%$clone->{'DependsOn-new'}%>"><% loc('Create') %></a>)</span>
    -+% }
    -+    </td>
    -+    <td class="value">
    - <ul>
    - % for my $Link (@not_tickets, @active, @inactive) {
    - <li><& ShowLink, URI => $Link &></li>
    -@@
    - </ul>
    +       <& ShowLinksOfType, Object => $Object, Type => $type, Recurse => ($type eq 'Members') &>
          </td>
        </tr>
    -+% }
    -+
    -+% if ( $can_create || $Ticket->DependedOnBy->Count ) {
    -   <tr>
    -     <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Depended on by'), Relation => 'DependedOnBy' &>:\
    - % if ($can_create) {
    -@@
    - </ul>
    -     </td>
    -   </tr>
    -+% }
    -+
    -+% if ( $can_create || $Ticket->MemberOf->Count ) {
    -   <tr>
    -     <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Parents'), Relation => 'Parents' &>:\
    - % if ($can_create) {
    -@@
    -     </td>
    -     <td class="value"><& /Ticket/Elements/ShowParents, Ticket => $Ticket &></td>
    -   </tr>
    -+% }
    -+
    -+% if ( $can_create || $Ticket->Members->Count ) {
    -   <tr>
    -     <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Children'), Relation => 'Children' &>:\
    - % if ($can_create) {
    -@@
    -     </td>
    -     <td class="value"><& /Ticket/Elements/ShowMembers, Ticket => $Ticket &></td>
    -   </tr>
    -+% }
    -+
    -+% if ( $can_create || $Ticket->RefersTo->Count ) {
    -   <tr>
    -     <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Refers to'), Relation => 'RefersTo' &>:\
    - % if ($can_create) {
    -@@
    - </ul>
    -     </td>
    -   </tr>
    -+% }
    -+
    -+
    -+% if ( $can_create || $Ticket->ReferredToBy->Count ) {
    -   <tr>
    -     <td class="labeltop"><& ShowRelationLabel, id => $id, Label => loc('Referred to by'), Relation => 'ReferredToBy' &>:\
    - % if ($can_create) {
    -@@
    - </ul>
    -     </td>
    -   </tr>
    -+% }
    -+
    +-% }
    ++% } }
      % # Allow people to add more rows to the table
      % $m->callback( %ARGS );
    - </table>
    +   <& /Elements/ShowCustomFields, Object => $Object, Grouping => 'Links', Table => 0 &>
     
     diff --git a/share/html/Ticket/Elements/ShowDates b/share/html/Ticket/Elements/ShowDates
     --- a/share/html/Ticket/Elements/ShowDates
    @@ -170,7 +98,7 @@
          <td class="value"><& ShowGroupMembers, Group => $Ticket->AdminCc, Ticket => $Ticket &></td>
        </tr>
     +% }
    +   <& /Ticket/Elements/ShowCustomFields, Ticket => $Ticket, Grouping => 'People', Table => 0 &>
      </table>
      <%INIT>
    - </%INIT>
     
4:  6ee2617 ! 2:  ed6ae31 tests of hiding unset fields
    @@ -10,7 +10,7 @@
     +use strict;
     +use warnings;
     +
    -+use RT::Test tests => 36;
    ++use RT::Test tests => undef;
     +
     +my @link_labels = (
     +    'Depends on',
    @@ -34,13 +34,13 @@
     +    Subject   => 'depend ticket',
     +    Starts    => '2011-07-08 00:00:00',
     +    Started   => '2011-07-09 00:00:00',
    -+    Told      => '2011-07-10 00:00:00',
     +    Resolved  => '2011-07-11 00:00:00',
     +    Due       => '2011-07-12 00:00:00',
     +    Cc        => 'foo at example.com',
     +    AdminCc   => 'admin at example.com',
     +    DependsOn => [ $dep->id ],
     +);
    ++$bar->SetTold;
     +
     +my ( $baseurl, $m ) = RT::Test->started_ok;
     +
    @@ -84,3 +84,5 @@
     +    $m->content_contains( "Depends on", "has Depends on as it is set" );
     +}
     +
    ++undef $m;
    ++done_testing;



More information about the rt-commit mailing list