[Rt-commit] rt branch, 4.4/search-results-header-order-indicator, repushed

? sunnavy sunnavy at bestpractical.com
Mon Oct 1 15:39:57 EDT 2018


The branch 4.4/search-results-header-order-indicator was deleted and repushed:
       was 77899ddd2a870e24a17597238b99960ee3985b94
       now 3f9bed3fbc013fa469ea3955bb75ff26ad0263ac

1: 01d0596d0 ! 1: 2c27f4854 Add order indicator to search results header
    @@ -9,6 +9,13 @@
      $generic_query_args->{'Format'} = $FormatString if grep $_ eq 'Format', @PassArguments;
      
      my $item = 0;
    ++
    ++my %order_desc = (
    ++    1 => loc('first'),
    ++    2 => loc('second'),
    ++    3 => loc('third'),
    ++    4 => loc('fourth'),
    ++);
     +
     +my %order_by;
     +for my $i ( 0 .. $#OrderBy ) {
    @@ -25,7 +32,13 @@
              );
     +
     +        if ( $order_by{$attr} ) {
    -+            $m->out( qq{ $order_by{$attr}{index} <i class="$order_by{$attr}{class}"></i>} );
    ++            my $title = loc(
    ++                "Results are [_1] ordered by [_2] in [_3] order.",
    ++                $order_desc{ $order_by{$attr}{index} } || $order_by{$attr}{index},
    ++                loc( $attr ),
    ++                $order_by{$attr}{class} eq 'asc' ? loc('ascending') : loc('descending')
    ++            );
    ++            $m->out( qq{ <span class="order" title="$title">($order_by{$attr}{index} <i class="$order_by{$attr}{class}"></i> )</span>} );
     +        }
          }
          else {
    @@ -39,19 +52,23 @@
          content: '\a0\a0\a0\a0';
      }
     +
    -+th.collection-as-table i {
    ++th.collection-as-table span.order {
    ++    padding: 0 2px;
    ++}
    ++
    ++th.collection-as-table span.order i {
     +    border: solid black;
     +    border-width: 0 2px 2px 0;
     +    display: inline-block;
     +    padding: 2px;
     +}
     +
    -+th.collection-as-table i.asc {
    ++th.collection-as-table span.order i.asc {
     +    transform: rotate(-135deg);
     +    -webkit-transform: rotate(-135deg);
     +}
     +
    -+th.collection-as-table i.desc {
    ++th.collection-as-table span.order i.desc {
     +    transform: rotate(45deg);
     +    -webkit-transform: rotate(45deg);
     +}
2: 77899ddd2 ! 2: 3f9bed3fb Test order indicator in search results header
    @@ -17,9 +17,9 @@
          is $agent->value('OrderBy', 3), 'Requestor.EmailAddress';
      
          $agent->follow_link_ok({id => 'page-results'});
    -+    $agent->text_contains('# 1', 'order number 1');
    ++    $agent->text_contains('# (1', 'order number 1');
     +    $agent->content_contains('1 <i class="desc"></i>', 'arrow 1');
    -+    $agent->text_contains('Requestor 2', 'order number 2');
    ++    $agent->text_contains('Requestor (2', 'order number 2');
     +    $agent->content_contains('2 <i class="asc"></i>', 'arrow 2');
     +
          ok( $agent->find_link(



More information about the rt-commit mailing list