Class: Georgia::PageDecorator
Instance Method Summary
collapse
#pretty_created_at, #pretty_updated_at
Instance Method Details
#state ⇒ Object
26
27
28
|
# File 'app/decorators/georgia/page_decorator.rb', line 26
def state
public? ? 'public' : 'private'
end
|
#state_icon ⇒ Object
11
12
13
14
15
16
17
|
# File 'app/decorators/georgia/page_decorator.rb', line 11
def state_icon
if public?
h.icon_tag('icon-ok icon-success')
else
h.icon_tag('icon-remove icon-failure')
end
end
|
#status_tag(options = {}) ⇒ Object
19
20
21
22
23
24
|
# File 'app/decorators/georgia/page_decorator.rb', line 19
def status_tag(options={})
options[:class] ||= ''
options[:class] << ' label'
options[:class] << " label-#{public? ? 'success' : 'warning'}"
h.content_tag(:span, state, options)
end
|
#template_path ⇒ Object
7
8
9
|
# File 'app/decorators/georgia/page_decorator.rb', line 7
def template_path
"pages/templates/#{current_revision.template}"
end
|