[Rt-commit] rt branch, 4.4/attachments-list, repushed

Shawn Moore shawn at bestpractical.com
Fri May 6 11:55:04 EDT 2016


The branch 4.4/attachments-list was deleted and repushed:
       was 61fb65e4edad319d11cb63ecbbbb1dc4a9809a47
       now 884669be5e4a984d2e60aad9744f44fe60a1caaf

1:  dd89c59 = 1:  dd89c59 Add a parameter to hide the titlebox in ShowAttachments
2:  c4aed50 = 2:  c4aed50 Use the existing template and stylings of attachment display for reuse
3:  9de4ca7 = 3:  9de4ca7 Replace explicit <font> tag with CSS
4:  3530501 ! 4:  1a25f83 Filter out empty attachment names in SQL rather than Perl
    @@ -2,7 +2,7 @@
     
         Filter out empty attachment names in SQL rather than Perl
         
    -        Cloning is necessary when you ShowHistory is set to immediate,
    +        Cloning is necessary when ShowHistory is set to immediate,
             as the Attachments object is shared across this template and
             the transaction log; without ->Clone, all messages are filtered
             away.
5:  d1ea5a6 ! 5:  8b35ca8 Add a way to display just the last N attachments
    @@ -1,18 +1,6 @@
     Author: Shawn M Moore <shawn at bestpractical.com>
     
         Add a way to display just the last N attachments
    -
    -diff --git a/share/html/Ticket/Elements/AddAttachments b/share/html/Ticket/Elements/AddAttachments
    ---- a/share/html/Ticket/Elements/AddAttachments
    -+++ b/share/html/Ticket/Elements/AddAttachments
    -@@
    -       Selectable   => 1,
    -       HideTitleBox => 1,
    -       Checked      => \@AttachExisting,
    -+      Count        => 5,
    -     &>
    -   </td>
    - </tr>
     
     diff --git a/share/html/Ticket/Elements/ShowAttachments b/share/html/Ticket/Elements/ShowAttachments
     --- a/share/html/Ticket/Elements/ShowAttachments
    @@ -47,16 +35,3 @@
      </%ARGS>
      
     
    -diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
    ---- a/share/html/Ticket/Elements/ShowSummary
    -+++ b/share/html/Ticket/Elements/ShowSummary
    -@@
    -         class => 'ticket-info-people',
    -     &><& /Ticket/Elements/ShowPeople, Ticket => $Ticket &></&>
    - % $m->callback( %ARGS, CallbackName => 'AfterPeople' );
    --    <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
    -+    <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments, Count => 5 &>
    - % $m->callback( %ARGS, CallbackName => 'AfterAttachments' );
    -     <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
    - % $m->callback( %ARGS, CallbackName => 'LeftColumn' );
    -
6:  95bcd0c ! 6:  651cb49 Display only latest 5 attachments, with an AJAX "Show all" link
    @@ -1,6 +1,6 @@
     Author: Shawn M Moore <shawn at bestpractical.com>
     
    -    Add ajaxified "Show all attachments" button
    +    Display only latest 5 attachments, with an AJAX "Show all" link
         
         Fixes: I#31710
     
    @@ -73,6 +73,18 @@
     +&>
     +% $m->abort();
     
    +diff --git a/share/html/Ticket/Elements/AddAttachments b/share/html/Ticket/Elements/AddAttachments
    +--- a/share/html/Ticket/Elements/AddAttachments
    ++++ b/share/html/Ticket/Elements/AddAttachments
    +@@
    +       Selectable   => 1,
    +       HideTitleBox => 1,
    +       Checked      => \@AttachExisting,
    ++      Count        => 5,
    +     &>
    +   </td>
    + </tr>
    +
     diff --git a/share/html/Ticket/Elements/ShowAttachments b/share/html/Ticket/Elements/ShowAttachments
     --- a/share/html/Ticket/Elements/ShowAttachments
     +++ b/share/html/Ticket/Elements/ShowAttachments
    @@ -126,3 +138,16 @@
         }
         unshift( @{ $documents{ $attach->Filename } }, $attach );
     
    +diff --git a/share/html/Ticket/Elements/ShowSummary b/share/html/Ticket/Elements/ShowSummary
    +--- a/share/html/Ticket/Elements/ShowSummary
    ++++ b/share/html/Ticket/Elements/ShowSummary
    +@@
    +         class => 'ticket-info-people',
    +     &><& /Ticket/Elements/ShowPeople, Ticket => $Ticket &></&>
    + % $m->callback( %ARGS, CallbackName => 'AfterPeople' );
    +-    <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments &>
    ++    <& /Ticket/Elements/ShowAttachments, Ticket => $Ticket, Attachments => $Attachments, Count => 5 &>
    + % $m->callback( %ARGS, CallbackName => 'AfterAttachments' );
    +     <& /Ticket/Elements/ShowRequestor, Ticket => $Ticket &>
    + % $m->callback( %ARGS, CallbackName => 'LeftColumn' );
    +
7:  a278d42 = 7:  c453a8a Preserve selected attachments when loading the rest in via ajax
8:  588482f = 8:  ec1f85b Always pull out attachments in newest-first order
9:  61fb65e ! 9:  884669b Only show "include attachments" if we have attachments
    @@ -22,13 +22,12 @@
     +my $HasExisting = 0;
     +
     +if ($TicketObj && $TicketObj->id) {
    -+    my $Existing = $Ticket->Attachments;
    -+    $Existing = $Attachments->Clone;
    ++    my $Existing = $TicketObj->Attachments;
     +    $Existing->Limit(
     +        FIELD    => 'Filename',
     +        OPERATOR => '!=',
     +        VALUE    => '',
     +    );
    -+    $HasExisting if $Existing->Count;
    ++    $HasExisting = 1 if $Existing->Count;
     +}
      </%INIT>



More information about the rt-commit mailing list