Sha256: 23ae07bea0c7996eb8082c076913db224ad9c959cda204ea3b1420bb25a1d924
Contents?: true
Size: 512 Bytes
Versions: 10
Compression:
Stored size: 512 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
10 entries across 10 versions & 1 rubygems