Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redmine 4.2 and Download attachments at once #86

Open
rafaelmartinsrm opened this issue Jun 8, 2021 · 2 comments
Open

Redmine 4.2 and Download attachments at once #86

rafaelmartinsrm opened this issue Jun 8, 2021 · 2 comments

Comments

@rafaelmartinsrm
Copy link

When using redmine 4.2, the button to download all attachments at once is not being shown.

@testowyludek1234
Copy link

testowyludek1234 commented Dec 20, 2021

#87 I have uploaded pull request which should fix the issue. I used following method to find difference was:

diff -u redmine-4.2.3/app/views/attachments/_links.html.erb redmine-4.1.5/app/views/attachments/_links.html.erb

And that shows what missing:

--- redmine-4.2.3/app/views/attachments/_links.html.erb	2021-10-10 05:00:35.000000000 +0200
+++ redmine-4.1.5/app/views/attachments/_links.html.erb	2021-10-10 05:00:05.000000000 +0200
@@ -5,11 +5,6 @@
               :title => l(:label_edit_attachments),
               :class => 'icon-only icon-edit'
              ) if options[:editable] %>
-  <%= link_to(l(:label_download_all_attachments),
-              container_attachments_download_path(container),
-              :title => l(:label_download_all_attachments),
-              :class => 'icon-only icon-download'
-             ) if attachments.size > 1 %>
 </div>
 <table>
 <% for attachment in attachments %>

Further more repo owner @tofi86 should consider to find some better method to provide modifications than rewriting whole template because this will always lead to similar problem when upstream changes anything. I don't know if this is possible in Ruby/Rails/Redmine but should be considered if it is.

@testowyludek1234
Copy link

testowyludek1234 commented Dec 20, 2021

Also important note that this fix will make this plugin Redmine 4.2+ only, since there is any version checking to decide where button should or should not be presented. Redmine 4.2 also added controller that is required for download all functionality to zip attachments on the fly through zip stream.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants