Module: Admin::Atreides::PagesHelper

Includes:
Atreides::Extendable
Defined in:
app/helpers/admin/atreides/pages_helper.rb

Instance Method Summary collapse

Instance Method Details



12
13
14
# File 'app/helpers/admin/atreides/pages_helper.rb', line 12

def add_child_link(page)
  link_to 'Add Child', new_admin_page_path(:parent_id => page.id)
end

#page_column(page) ⇒ Object



3
4
5
6
# File 'app/helpers/admin/atreides/pages_helper.rb', line 3

def page_column(page)
  (:span, (page.children.empty? ? ' ' : link_to("", admin_pages_path(:parent_id => page.id, :format => "js"), :remote => true, :method => :get)), {:class => 'collapsed', :style => "margin-left:#{page.parents.size*17}px"}, false) +
  link_to(image_tag('atreides/admin/page_icon.png', :class => "page_icon")+page.title, edit_admin_page_path(page))
end

#state_column(page) ⇒ Object



8
9
10
# File 'app/helpers/admin/atreides/pages_helper.rb', line 8

def state_column(page)
  page.state.titleize
end