Sha256: a29172406bfd9a625ba533a0cfcc238e845e5833856be216bb4e5ca0e50a47be

Contents?: true

Size: 522 Bytes

Versions: 11

Compression:

Stored size: 522 Bytes

Contents

module CmsHelper
  def admin_tab title, path
    content_tag :li, link_to(title, path), :class => (:current if request.path.include?(path))
  end
  
  def available_parent_pages
    pages = []
    pages << { :title => t('kuhsaft.cms.pages.new.pages'), :link => cms_pages_path(:locale => :en) }
    if params[:parent_id].present?
      parent_page = Kuhsaft::Page.find(params[:parent_id])
      pages += parent_page.parent_pages
    end
    pages << { :title => t('kuhsaft.cms.pages.new.new_page'), :link => '#' }
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
kuhsaft-0.3.4.legacy3 app/helpers/cms_helper.rb
kuhsaft-0.3.4.legacy2 app/helpers/cms_helper.rb
kuhsaft-0.3.4.legacy app/helpers/cms_helper.rb
kuhsaft-0.3.6 app/helpers/cms_helper.rb
kuhsaft-0.3.5 app/helpers/cms_helper.rb
kuhsaft-0.3.4 app/helpers/cms_helper.rb
kuhsaft-0.3.4.rc2 app/helpers/cms_helper.rb
kuhsaft-0.3.4.rc1 app/helpers/cms_helper.rb
kuhsaft-0.3.3 app/helpers/cms_helper.rb
kuhsaft-0.3.2 app/helpers/cms_helper.rb
kuhsaft-0.2.5 app/helpers/cms_helper.rb