cirandas.net

ref: master

app/models/raw_html_block.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
class RawHTMLBlock < Block

  def self.description
    _('Raw HTML')
  end

  def self.pretty_name
    _('Raw HTML')
  end

  settings_items :html, :type => :text

  attr_accessible :html

  def has_macro?
    true
  end

  def editable?(user)
    user.has_permission?('edit_raw_html_block', environment)
  end

  def api_content(params = {})
    { html: html }
  end

  def display_api_content_by_default?
    true
  end

end