Module: Pageflow::FileThumbnailsHelper

Defined in:
app/helpers/pageflow/file_thumbnails_helper.rb

Instance Method Summary collapse

Instance Method Details

#file_thumbnail_css_class(file, style) ⇒ Object


13
14
15
16
# File 'app/helpers/pageflow/file_thumbnails_helper.rb', line 13

def file_thumbnail_css_class(file, style)
  return if file.blank?
  [file.class.model_name.singular, style, file.id] * '_'
end

#file_thumbnails_css(revision) ⇒ Object


3
4
5
6
7
8
9
10
11
# File 'app/helpers/pageflow/file_thumbnails_helper.rb', line 3

def file_thumbnails_css(revision)
  render(partial: 'pageflow/file_types/thumbnails',
         collection: Pageflow.config.file_types.with_thumbnail_support,
         as: :file_type,
         locals: {
           revision: revision,
           styles: Pageflow.config.css_rendered_thumbnail_styles
         })
end