app/helpers/admin_helper.rb
#
# Pass in a set of root FeatureNames (having the same parent)
# to build a ul list
# "completed" is used only by this method
#
Pass in a set of root FeatureNames (having the same parent)
to build a ul list
"completed" is used only by this method
Pass in a set of root FeatureNames ( having the same parent ) to build a ul list " completed " is used only by this method
def feature_name_ul(feature, use_links=true, root_names=nil, completed=[])
    root_names = feature.names.roots.order('position') if feature
    html=''
    root_names.each do |name|
      next if completed.include? name
      completed << name
      html += '<li style="margin-left:1em; list-style:square;">'
      html += (use_links ? link_to(name.name, admin_feature_name_path(name)) : name.name)
      html += feature_name_ul(nil, use_links, name.children, completed)
      html += '</li>'
    end
    (html.blank? ? '' : "<ul style='margin:0;'>#{html}</ul>").html_safe
  end
def feature_name_ul ( feature , use_links = true , root_names = nil , completed = [ ] ) root_names = feature . names . roots . order ( 'position' ) if feature html = '' root_names . each do | name | next if completed . include? name completed << name html += '<li style="margin-left:1em; list-style:square;">' html += ( use_links ? link_to ( name . name , admin_feature_name_path ( name ) ) : name . name ) html += feature_name_ul ( nil , use_links , name . children , completed ) html += '</li>' end ( html . blank? ? '' : "<ul style='margin:0;'>#{html}</ul>" ) . html_safe end
Pass in a set of root FeatureNames (having the same parent)
to build a ul list
"completed" is used only by this method
Pass in a set of root FeatureNames ( having the same parent ) to build a ul list " completed " is used only by this method
feature
<not_specific>
use_links
<not_specific>
root_names
<not_specific>
completed
<not_specific>