app/helpers/comatose/admin_helper.rb
# Used in the Page Form to build an indented drop-down list of pages
Used in the Page Form to build an indented drop-down list of pages
Used in the Page Form to build an indented drop - down list of pages
def collection_from_node_for_select(nodes, hide=nil, label="Parent", add_initial=false)
      level       = 0
      options     = []
      if add_initial
        options << ["No #{label}", 0]
      end
      nodes.each do |node|
        collection_from_child_for_select(node, level, hide, options)
      end
      return options
    end
def collection_from_node_for_select ( nodes , hide = nil , label = "Parent" , add_initial = false ) level = 0 options = [ ] if add_initial options << [ "No #{label}" , 0 ] end nodes . each do | node | collection_from_child_for_select ( node , level , hide , options ) end return options end
Used in the Page Form to build an indented drop-down list of pages
Used in the Page Form to build an indented drop - down list of pages
nodes
<not_specific>
hide
<not_specific>
label
<not_specific>
add_initial
<not_specific>