Sha256: 1aab408e554c3fc881ed4b485bf0bd502d8b8e275f35985ae20b38c48e87307d
Contents?: true
Size: 925 Bytes
Versions: 2
Compression:
Stored size: 925 Bytes
Contents
<h2><%%= t(:treeview, :default => 'Treeview') %> <%%= <%= i18n_t_m(singular_table_name) %> %></h2> <%% namespace_for_url = "<%= namespace_for_url %>" plural_model_name = "<%= model_pluralize %>" model_name = "<%= singular_table_name %>" opened_node = <%= model_with_engine_camelize %>.select(:id).all.map{ |g| "'treeelt_" + g.id.to_s + "'" }.join(',').html_safe %> <div id="treeview" data-model="<%%= model_name %>" data-url="/<%%= namespace_for_url %><%%= plural_model_name %>/" data-opened="[<%%= opened_node %>]"> <ul> <%% <%= model_with_engine_camelize %>.transaction do %> <%% ar = <%= model_with_engine_camelize %>.where(:<%= model %>_id => nil) %> <%% ar = ar.order("position") if <%= model_with_engine_camelize %>.column_names.include?("position") %> <%% for g in ar.all %> <%%= build_treeview(g, '<%= model_pluralize %>') %> <%% end %> <%% end %> </ul> </div>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
beautiful_scaffold-1.0.2 | lib/generators/templates/app/views/treeview.html.erb |
beautiful_scaffold-1.0.1 | lib/generators/templates/app/views/treeview.html.erb |