Commit 2ed3c1653db7d072da4e2ce2d55aab184cc5c53a
Committed by
Antonio Terceiro
1 parent
39ad2a12
Exists in
master
and in
29 other branches
ActionItem1057: displaying smallers images on gallery
Showing
2 changed files
with
3 additions
and
3 deletions
Show diff stats
app/models/uploaded_file.rb
... | ... | @@ -10,7 +10,7 @@ class UploadedFile < Article |
10 | 10 | # :min_size => 2.megabytes |
11 | 11 | # :max_size => 5.megabytes |
12 | 12 | has_attachment :storage => :file_system, |
13 | - :thumbnails => { :icon => [24,24], :thumb => '130x130>' }, | |
13 | + :thumbnails => { :icon => [24,24], :thumb => '130x130>', :display => [640,480] }, | |
14 | 14 | :thumbnail_class => Thumbnail, |
15 | 15 | :max_size => 5.megabytes |
16 | 16 | |
... | ... | @@ -50,7 +50,7 @@ class UploadedFile < Article |
50 | 50 | include ActionView::Helpers::TagHelper |
51 | 51 | |
52 | 52 | def to_html(options = {}) |
53 | - tag('img', :src => public_filename, :class => css_class_name, :style => 'max-width: 100%') if image? | |
53 | + tag('img', :src => public_filename(:display), :class => css_class_name, :style => 'max-width: 100%') if image? | |
54 | 54 | end |
55 | 55 | |
56 | 56 | def allow_children? | ... | ... |
app/views/content_viewer/slideshow.rhtml
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | <ul id='slideshow' > |
3 | 3 | <% @images.each do |img| -%> |
4 | 4 | <% if img.image? -%> |
5 | - <li><%= image_tag(url_for(img.url), :title => (img.abstract.blank? ? img.name : img.abstract)) %></li> | |
5 | + <li><%= image_tag(url_for(img.public_filename(:display)), :title => (img.abstract.blank? ? img.name : img.abstract)) %></li> | |
6 | 6 | <% end -%> |
7 | 7 | <% end unless @images.blank? -%> |
8 | 8 | </ul> | ... | ... |