Feature #32240
closed
Add download buttons in Files columns of the issues list
Added by Go MAEDA about 5 years ago.
Updated almost 5 years ago.
Description
You can add the "Files" column to the issues list. In the column, names of the attached files are shown and each filename is linked to the preview page of the file.
I think the UI can be improved to place a download icon beside the filename, like attachments on issue pages or wiki pages. Currently, you need to click twice to download the file (1. click the filename on the issues list, 2. click the download link on the preview page). If the column has download buttons, you can reduce an extra one click.
Before:
After:
Files
Go MAEDA wrote:
[...] Currently, you need to click twice to download the file [...]
I am not able to test this currently, but what about right-click -> save as? Doesn't that work in any way?
Mischa The Evil wrote:
I am not able to test this currently, but what about right-click -> save as? Doesn't that work in any way?
Unfortunately, it does not work. It saves the HTML content of the preview page (AttachmentsController#show).
Go MAEDA wrote:
If the column has download buttons, you can reduce an extra one click.
Added download buttons to "Files" column. I attached a patch.
In my opinion, there are too many icons in the listing which make the "Files" column more obvious than the other columns (my first reaction is look on that column). If we really want to have the download links available in the listing, what about of showing the icon only on hover?
Marius BALTEANU wrote:
In my opinion, there are too many icons in the listing which make the "Files" column more obvious than the other columns (my first reaction is look on that column). If we really want to have the download links available in the listing, what about of showing the icon only on hover?
Thank you for your feedback. Fixed to show the download icon only when hovering.
- Target version set to Candidate for next major release
- Target version changed from Candidate for next major release to 4.2.0
LGTM. Setting the target version to 4.2.0.
The patch breaks a test.
F
Failure:
AttachmentFieldFormatTest#test_create_with_attachment [/Users/maeda/redmines/trunk/test/integration/lib/redmine/field_format/attachment_format_test.rb:85]:
Expected: 1
Actual: 2
bin/rails test test/integration/lib/redmine/field_format/attachment_format_test.rb:54
Go MAEDA wrote:
The patch breaks a test.
[...]
Sorry, I fixed the test as follows.
diff --git a/test/integration/lib/redmine/field_format/attachment_format_test.rb b/test/integration/lib/redmine/field_format/attachment_format_test.rb
index 61f439894..ccb33a9b6 100644
--- a/test/integration/lib/redmine/field_format/attachment_format_test.rb
+++ b/test/integration/lib/redmine/field_format/attachment_format_test.rb
@@ -81,7 +81,7 @@ class AttachmentFieldFormatTest < Redmine::IntegrationTest
assert_response :success
# link to the attachment
- link = css_select(".cf_#{@field.id} .value a")
+ link = css_select(".cf_#{@field.id} .value a:not(.icon-download)")
assert_equal 1, link.size
assert_equal "testfile.txt", link.text
I have slightly updated the patch as follows:
- Fixed a "Layout/ArgumentAlignment" RuboCop warning in app/helpers/application_helper.rb
- Changed the CSS to hide the icon from "
display: none;
" from "visibility: hide;
" in order to prevent the table cell width from changing on mouse hover
- Status changed from New to Closed
- Assignee set to Go MAEDA
- Resolution set to Fixed
Committed the patch. Thank you for your contribution.
Also available in: Atom
PDF