Class: Georgia::PageDecorator
- Inherits:
-
ApplicationDecorator
- Object
- Draper::Decorator
- ApplicationDecorator
- Georgia::PageDecorator
- Defined in:
- app/decorators/georgia/page_decorator.rb
Instance Method Summary collapse
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(={}) [:class] ||= '' [:class] << ' label' [:class] << " label-#{public? ? 'success' : 'warning'}" h.content_tag(:span, state, ) 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 |