Sha256: 0cb26a4bf625ea9d1143840bed4fab7d917e55da42b45a68b5d39909cd742a2a
Contents?: true
Size: 988 Bytes
Versions: 3
Compression:
Stored size: 988 Bytes
Contents
<h2><%%= t(:treeview, :default => 'Treeview') %> <%%= t(:<%= singular_table_name %>, :default => "<%= singular_table_name %>") %></h2> <div id="treeview"> <ul> <%% <%= model_camelize %>.transaction do %> <%% ar = <%= model_camelize %>.where(:<%= model %>_id => nil) %> <%% ar = ar.order("position") if <%= model_camelize %>.column_names.include?("position") %> <%% for g in ar.all %> <%%= build_treeview(g, '<%= model_pluralize %>') %> <%% end %> <%% end %> </ul> </div> <%% namespace_for_url = "<%= namespace_for_url %>" plural_model_name = "<%= model_pluralize %>" model_name = "<%= singular_table_name %>" opened_node = <%= model_camelize %>.select(:id).all.map{ |g| '"treeelt_' + g.id.to_s + '"' }.join(',').html_safe %> <%%= render :partial => "layouts/treeview_js", :locals => { :model_name => model_name, :plural_model_name => plural_model_name, :opened_node => opened_node, :namespace_for_url => namespace_for_url } %>
Version data entries
3 entries across 3 versions & 1 rubygems