Sha256: 94487498d853b75d740695e421793be25b1028a55fb2f14ec5ddca3eb1ee6f17

Contents?: true

Size: 529 Bytes

Versions: 50

Compression:

Stored size: 529 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 => kuhsaft.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

50 entries across 50 versions & 1 rubygems

Version Path
kuhsaft-2.2.6 app/helpers/cms_helper.rb
kuhsaft-2.2.5 app/helpers/cms_helper.rb
kuhsaft-2.2.4 app/helpers/cms_helper.rb
kuhsaft-2.2.3 app/helpers/cms_helper.rb
kuhsaft-2.2.2 app/helpers/cms_helper.rb
kuhsaft-2.2.1 app/helpers/cms_helper.rb
kuhsaft-2.2.0 app/helpers/cms_helper.rb
kuhsaft-2.1.2 app/helpers/cms_helper.rb
kuhsaft-2.1.1 app/helpers/cms_helper.rb
kuhsaft-2.1.0 app/helpers/cms_helper.rb
kuhsaft-1.8.6 app/helpers/cms_helper.rb
kuhsaft-1.8.5 app/helpers/cms_helper.rb
kuhsaft-2.0.3 app/helpers/cms_helper.rb
kuhsaft-2.0.2 app/helpers/cms_helper.rb
kuhsaft-1.8.4 app/helpers/cms_helper.rb
kuhsaft-1.8.1 app/helpers/cms_helper.rb
kuhsaft-2.0.1 app/helpers/cms_helper.rb
kuhsaft-2.0.0 app/helpers/cms_helper.rb
kuhsaft-1.8.0 app/helpers/cms_helper.rb
kuhsaft-1.7.1 app/helpers/cms_helper.rb