lib/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 tree_select_box(nodes, selected= nil, hide= nil, label="Parent", add_initial=false)
    level = 0
    select_box = add_initial ? "<option value=0>No #{label}</option>\n" : ""
    selected = nodes[0].id if selected.nil? and not add_initial
    nodes.each {|node| select_box += add_select_tree_node(node, selected, level, hide) }
    select_box += ''
		select_box = select_box.html_safe
return select_box
  end
def tree_select_box ( nodes , selected = nil , hide = nil , label = "Parent" , add_initial = false ) level = 0 select_box = add_initial ? "<option value=0>No #{label}</option>\n" : "" selected = nodes [ 0 ] . id if selected . nil? and not add_initial nodes . each { | node | select_box += add_select_tree_node ( node , selected , level , hide ) } select_box += '' select_box = select_box . html_safe return select_box 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>
selected
<not_specific>
hide
<not_specific>
label
<not_specific>
add_initial
<not_specific>