Commit ac306a5b691c8341cf28d9b7273060e3e31f44c5
Committed by
Braulio Bhavamitra
1 parent
2f07775b
Exists in
master
and in
29 other branches
Add download icon
Showing
6 changed files
with
11 additions
and
13 deletions
Show diff stats
app/views/file_presenter/_generic.html.erb
1 | -<span class="download-link"> | |
2 | - <span>Download</span> | |
3 | - <strong><%= link_to generic.filename, [Noosfero.root, generic.public_filename].join %></strong> | |
4 | -</span> | |
5 | - | |
6 | 1 | <div class="uploaded-file-description <%= 'empty' if generic.abstract.blank? %>"> |
7 | 2 | <%= generic.abstract %> |
8 | 3 | </div> |
9 | 4 | |
5 | +<%= button(:download, _('Download'), [Noosfero.root, generic.public_filename].join, class:'download-link', option:'primary', size:'lg') %> | ... | ... |
public/designs/icons/awesome/style.scss
public/designs/icons/tango/style.css
... | ... | @@ -28,6 +28,7 @@ |
28 | 28 | .icon-more { background-image: url(Tango/16x16/actions/add.png) } |
29 | 29 | .icon-up { background-image: url(Tango/16x16/actions/go-up.png) } |
30 | 30 | .icon-down { background-image: url(Tango/16x16/actions/go-down.png) } |
31 | +.icon-download { background-image: url(Tango/16x16/actions/bottom.png) } | |
31 | 32 | .icon-left { background-image: url(Tango/16x16/actions/go-previous.png) } |
32 | 33 | .icon-right { background-image: url(Tango/16x16/actions/go-next.png) } |
33 | 34 | .icon-up-disabled { background-image: url(Tango/16x16/actions/go-up.png); opacity: 0.25; filter:alpha(opacity=25); } | ... | ... |
public/stylesheets/application.css
... | ... | @@ -4019,10 +4019,6 @@ div#article-parent { |
4019 | 4019 | text-align: right; |
4020 | 4020 | font-style: italic; |
4021 | 4021 | } |
4022 | -.article-body-uploaded-file { | |
4023 | - text-align: center; | |
4024 | -} | |
4025 | - | |
4026 | 4022 | /* ==> public/stylesheets/controller_events.css <== */ |
4027 | 4023 | #agenda { |
4028 | 4024 | position: relative; | ... | ... |
test/unit/article_block_test.rb
... | ... | @@ -64,7 +64,7 @@ class ArticleBlockTest < ActiveSupport::TestCase |
64 | 64 | end |
65 | 65 | person.boxes.first.blocks << block |
66 | 66 | block.save! |
67 | - | |
67 | + | |
68 | 68 | block.reload |
69 | 69 | assert_equal [a],block.available_articles |
70 | 70 | end |
... | ... | @@ -80,7 +80,7 @@ class ArticleBlockTest < ActiveSupport::TestCase |
80 | 80 | block = create(ArticleBlock, :article => a) |
81 | 81 | env.boxes.first.blocks << block |
82 | 82 | block.save! |
83 | - | |
83 | + | |
84 | 84 | block.reload |
85 | 85 | assert_equal [a],block.available_articles |
86 | 86 | end |
... | ... | @@ -140,7 +140,7 @@ class ArticleBlockTest < ActiveSupport::TestCase |
140 | 140 | block.article = file |
141 | 141 | block.save! |
142 | 142 | |
143 | - assert_tag_in_string instance_eval(&block.content), :tag => 'a', :content => 'test.txt' | |
143 | + assert_tag_in_string instance_eval(&block.content), :tag => 'a', :content => _('Download') | |
144 | 144 | end |
145 | 145 | |
146 | 146 | protected | ... | ... |
test/unit/blog_helper_test.rb
... | ... | @@ -7,6 +7,8 @@ class BlogHelperTest < ActionView::TestCase |
7 | 7 | include ActionView::Helpers::AssetTagHelper |
8 | 8 | include ApplicationHelper |
9 | 9 | |
10 | + helper ApplicationHelper | |
11 | + | |
10 | 12 | def setup |
11 | 13 | stubs(:show_date).returns('') |
12 | 14 | @environment = Environment.default |
... | ... | @@ -103,7 +105,7 @@ class BlogHelperTest < ActionView::TestCase |
103 | 105 | result = display_post(file) |
104 | 106 | assert_tag_in_string result, :tag => 'a', |
105 | 107 | :attributes => { :href => file.public_filename }, |
106 | - :content => file.filename | |
108 | + :content => _('Download') | |
107 | 109 | end |
108 | 110 | |
109 | 111 | should 'display image if post is an image' do | ... | ... |