cirandas.net

ref: master

app/models/gallery.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class Gallery < Folder

  settings_items :allow_download, :type => :boolean, :default => false
  attr_accessible :allow_download

  def self.type_name
    _('Gallery')
  end

  def self.short_description
    _('Gallery')
  end

  def self.description
    _('A gallery, inside which you can put images.')
  end

  include ActionView::Helpers::TagHelper
  def to_html(options={})
    article = self
    proc do
      render :file => 'content_viewer/image_gallery', :locals => {:article => article}
    end
  end

  def gallery?
    true
  end

  def self.icon_name(article = nil)
    'gallery'
  end

end