Sha256: ef560da8e5f624cc58138bf52bb9ebaefece2726184feeed9482fa82390fc9ba

Contents?: true

Size: 648 Bytes

Versions: 4

Compression:

Stored size: 648 Bytes

Contents

module Cms
  module SectionNodesHelper
    def section_icons(node)
      if (node.root? || node.parent.root? || node.parent.parent.root?)
        node.child_nodes.empty? ? image_tag("cms/sitemap/no_contents.png", :class => "no_folder_toggle large") : image_tag("cms/sitemap/gray_expand.png", :class => "folder_toggle large")
      else
        node.child_nodes.empty? ? image_tag("cms/sitemap/no_contents.png", :class => "no_folder_toggle") : image_tag("cms/sitemap/expand.png", :class => "folder_toggle")
      end
    end
    
    def root_section?(node)
      node.class.to_s.downcase == "section" && node.root?
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
webficient-browsercms-3.0.1 app/helpers/cms/section_nodes_helper.rb
webficient-browsercms-3.0.2 app/helpers/cms/section_nodes_helper.rb
webficient-browsercms-3.0.3 app/helpers/cms/section_nodes_helper.rb
webficient-browsercms-3.0.4 app/helpers/cms/section_nodes_helper.rb