diff_v7_and_v8.patch

Mizuki ISHIKAWA, 2020-03-17 02:50

Download (2.32 KB)

View differences:

app/views/attachments/_links.html.erb
5 5
              :title => l(:label_edit_attachments),
6 6
              :class => 'icon-only icon-edit'
7 7
             ) if options[:editable] %>
8
  <%= link_to(l(:label_download_all_attachments),
9
              container_attachments_download_path(container),
10
              :title => l(:label_download_all_attachments),
11
              :class => 'icon-only icon-download'
12
             ) if attachments.size > 1 %>
8 13
</div>
9 14
<table>
10 15
<% for attachment in attachments %>
......
42 47
  </div>
43 48
  <% end %>
44 49
<% end %>
45
<% if attachments.size > 1 %>
46
<div class="bulk-download">
47
  <%= link_to(l(:label_download_all_attachments),
48
  container_attachments_download_path(container),
49
  :title => l(:label_download_all_attachments),
50
  :class => 'icon icon-download'
51
  ) %>
52
</div>
53
<% end %>
54 50
</div>
public/stylesheets/application.css
902 902
div.attachments img { vertical-align: middle; }
903 903
div.attachments span.author { font-size: 0.9em; color: #888; }
904 904

  
905
div.bulk-download { margin-top: 1em; margin-left: 0.3em; margin-bottom: 0.4em;}
906

  
907 905
div.thumbnails {margin:0.6em;}
908 906
div.thumbnails div {background:#fff;border:2px solid #ddd;display:inline-block;margin-right:2px;}
909 907
div.thumbnails img {margin: 3px; vertical-align: middle;}
test/integration/routing/attachments_test.rb
35 35

  
36 36
    should_route 'GET /attachments/issues/1/edit' => 'attachments#edit_all', :object_type => 'issues', :object_id => '1'
37 37
    should_route 'PATCH /attachments/issues/1' => 'attachments#update_all', :object_type => 'issues', :object_id => '1'
38
    should_route 'GET /attachments/issues/1/download' => 'attachments#download_all', :object_type => 'issues', :object_id => '1'
38 39
  end
39 40
end