Sha256: 64190b2b90da17424c61775a1b0f5185d786a78706df374faaf6147aef09c8df
Contents?: true
Size: 991 Bytes
Versions: 2
Compression:
Stored size: 991 Bytes
Contents
module Cms module Fortress module ApplicationHelper def topnav_item(title, path, is_current = false) css_class = is_current ? "active" : "" content_tag(:li, link_to(title, path), class: css_class) end def leftnav_item(title, path, options = {}) content_tag(:li, active_link_to(title, path, options)) end def admin_page? controller_name.eql?('admin') && %w{roles users}.include?(action_name) || Cms::Fortress.configuration.settings_resources. map { |resource| resource[:name] }. include?(controller_name) end def design_page? Cms::Fortress.configuration.design_resources. map { |resource| resource[:name] }. include?(controller_name) end def content_page? Cms::Fortress.configuration.content_resources. map { |resource| resource[:name] }. include?(controller_name) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
cms-fortress-1.1.3 | app/helpers/cms/fortress/application_helper.rb |
cms-fortress-1.1.2 | app/helpers/cms/fortress/application_helper.rb |