From 2ed3c1653db7d072da4e2ce2d55aab184cc5c53a Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Wed, 27 May 2009 17:01:27 -0300 Subject: [PATCH] ActionItem1057: displaying smallers images on gallery --- app/models/uploaded_file.rb | 4 ++-- app/views/content_viewer/slideshow.rhtml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/uploaded_file.rb b/app/models/uploaded_file.rb index 50a033e..4ce2b26 100644 --- a/app/models/uploaded_file.rb +++ b/app/models/uploaded_file.rb @@ -10,7 +10,7 @@ class UploadedFile < Article # :min_size => 2.megabytes # :max_size => 5.megabytes has_attachment :storage => :file_system, - :thumbnails => { :icon => [24,24], :thumb => '130x130>' }, + :thumbnails => { :icon => [24,24], :thumb => '130x130>', :display => [640,480] }, :thumbnail_class => Thumbnail, :max_size => 5.megabytes @@ -50,7 +50,7 @@ class UploadedFile < Article include ActionView::Helpers::TagHelper def to_html(options = {}) - tag('img', :src => public_filename, :class => css_class_name, :style => 'max-width: 100%') if image? + tag('img', :src => public_filename(:display), :class => css_class_name, :style => 'max-width: 100%') if image? end def allow_children? diff --git a/app/views/content_viewer/slideshow.rhtml b/app/views/content_viewer/slideshow.rhtml index e1a5c2b..079fbf9 100644 --- a/app/views/content_viewer/slideshow.rhtml +++ b/app/views/content_viewer/slideshow.rhtml @@ -2,7 +2,7 @@ -- libgit2 0.21.2