From 556fc7f1295534b9faf09f60892e968f72b06a21 Mon Sep 17 00:00:00 2001 From: Jan Schulz-Hofen Date: Wed, 17 May 2017 16:35:53 +0200 Subject: [PATCH] Use new icon-download class for downloads MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit There’s a semantical difference between saving and downloading (saving to disk). Themes may want to use two different icons here. --- app/helpers/issues_helper.rb | 2 +- app/views/attachments/_links.html.erb | 2 +- app/views/files/index.html.erb | 4 ++-- public/stylesheets/application.css | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb index c049744..70fea91 100644 --- a/app/helpers/issues_helper.rb +++ b/app/helpers/issues_helper.rb @@ -471,7 +471,7 @@ module IssuesHelper value = link_to_attachment(atta, only_path: options[:only_path]) if options[:only_path] != false value += ' ' - value += link_to_attachment atta, class: 'icon-only icon-save', title: l(:button_download), download: true + value += link_to_attachment atta, class: 'icon-only icon-download', title: l(:button_download), download: true end else value = content_tag("i", h(value)) if value diff --git a/app/views/attachments/_links.html.erb b/app/views/attachments/_links.html.erb index 6dee6d2..3b8d524 100644 --- a/app/views/attachments/_links.html.erb +++ b/app/views/attachments/_links.html.erb @@ -19,7 +19,7 @@ <%= attachment.author %>, <%= format_time(attachment.created_on) %> <% end %> - <%= link_to_attachment attachment, class: 'icon-only icon-save', title: l(:button_download), download: true -%> + <%= link_to_attachment attachment, class: 'icon-only icon-download', title: l(:button_download), download: true -%> <% if options[:deletable] %> <%= link_to l(:button_delete), attachment_path(attachment), diff --git a/app/views/files/index.html.erb b/app/views/files/index.html.erb index cfb83e7..a1149bf 100644 --- a/app/views/files/index.html.erb +++ b/app/views/files/index.html.erb @@ -33,8 +33,8 @@ <%= file.downloads %> <%= file.digest_type %>: <%= file.digest %> - <%= link_to_attachment file, class: 'icon-only icon-save', title: l(:button_download), download: true %> - <%= link_to(image_tag('delete.png'), attachment_path(file), + <%= link_to_attachment file, class: 'icon-only icon-download', title: l(:button_download), download: true %> + <%= link_to(l(:button_delete), attachment_path(file), :class => 'icon-only icon-del', :data => {:confirm => l(:text_are_you_sure)}, :method => :delete) if delete_allowed %> diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 06c2dff..c1928d9 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -1215,6 +1215,7 @@ div.wiki img {vertical-align:middle; max-width:100%;} .icon-del { background-image: url(../images/delete.png); } .icon-move { background-image: url(../images/move.png); } .icon-save { background-image: url(../images/save.png); } +.icon-download { background-image: url(../images/save.png); } .icon-cancel { background-image: url(../images/cancel.png); } .icon-multiple { background-image: url(../images/table_multiple.png); } .icon-folder { background-image: url(../images/folder.png); } -- 2.7.2