[Rt-commit] rt branch, 5.0/display-attachment-name-in-history, created. rt-5.0.0alpha1-1-g83992f9237
Blaine Motsinger
blaine at bestpractical.com
Fri Apr 24 19:26:29 EDT 2020
The branch, 5.0/display-attachment-name-in-history has been created
at 83992f9237604e8cdc7002f60a9aa9f22d523886 (commit)
- Log -----------------------------------------------------------------
commit 83992f9237604e8cdc7002f60a9aa9f22d523886
Author: Blaine Motsinger <blaine at bestpractical.com>
Date: Fri Apr 24 18:21:16 2020 -0500
Display the attachment name in ticket history
If a ticket has a lot of attachments it can be cumbersome to hover
over the download link to find the file you want. This commit makes
the filename available on the page and moves the filetype and size
into the tooltip instead.
diff --git a/share/html/Elements/ShowTransactionAttachments b/share/html/Elements/ShowTransactionAttachments
index 53283d2fa2..2662c32ce3 100644
--- a/share/html/Elements/ShowTransactionAttachments
+++ b/share/html/Elements/ShowTransactionAttachments
@@ -71,7 +71,7 @@ foreach my $message ( @{ $Attachments->{ $Parent || 0 } || [] } ) {
% # the defined name denotes a downloadable attachment, else just text content in the transaction.
% my ( $download_alt, $fa_classes );
% if ( length $name ) {
-% $download_alt = loc( 'Download [_1]', $name );
+% $download_alt = loc( 'Download [_1] [_2]', $message->ContentType, $message->FriendlyContentLength );
% $fa_classes = 'fas fa-paperclip';
% }
% else {
@@ -92,7 +92,7 @@ foreach my $message ( @{ $Attachments->{ $Parent || 0 } || [] } ) {
% $m->callback(CallbackName => 'AfterDownloadLinks', ARGSRef => \%ARGS, Object => $Object, Transaction => $Transaction, Attachment => $message);
<br />
-<span class="downloadcontenttype"><% $message->ContentType %> <% $message->FriendlyContentLength %></span>
+<span class="downloadfilename"><% $name %></span>
</div>
% }
%# If there is sub-messages, open a dedicated div
diff --git a/share/static/css/elevator-light/history.css b/share/static/css/elevator-light/history.css
index 678ea59557..eec67f10ba 100644
--- a/share/static/css/elevator-light/history.css
+++ b/share/static/css/elevator-light/history.css
@@ -171,7 +171,7 @@ border: none;
vertical-align: top;
}
-.transaction div.downloadattachment .downloadcontenttype{
+.transaction div.downloadattachment .downloadfilename {
color: #ccc;
display: block;
margin-top: 0.25rem;
-----------------------------------------------------------------------
More information about the rt-commit
mailing list