Sha256: a68a940e4af61c04cc25f11d282235c7c46a084ded54c295c919ef4265b813f3
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
<ol class="form"> <li class="form-element"> <dl><dt><label><%= as_ :columns %></label></dt> <dd><ul class="<%= active_scaffold_config.config_list.draggable ? 'draggable-lists' : 'sortable-container' %>" id="<%= element_form_id(:action => :config_list) %>-columns"> <% if !config_list_params.nil? && config_list_params.is_a?(Array) config_list = config_list_params list_columns.concat active_scaffold_config.list.columns.collect_visible.select{|column| config_list.exclude? column.name} end %> <% list_columns.each do |c| %> <li class="sortable"> <%= check_box_tag 'config_list[]', c.name.to_s, (config_list_params.nil? ? true : config_list_params.include?(c.name)), {:id => nil}%> <label><%= c.label%></label> </li> <% end %> </ul></dd></dl> </li> <li class="form-element"> <dl><dt><label><%= as_ :default_sorting %></label></dt> <dd><ol> <% columns_options = list_columns.select{|c| c.sortable?}.map{|c| [c.label, c.name]} order_options = ['asc', 'desc'] selected = config_list_sorting || [] 3.times do |i| %> <li><%= select_tag "config_list_sorting[#{i}][]", options_for_select(columns_options, :selected => selected[i].try(:first)), :include_blank => as_(:_select_), :class => 'column' %> <%= select_tag "config_list_sorting[#{i}][]", options_for_select(order_options, :selected => selected[i].try(:last)), :include_blank => as_(:_select_), :class => 'order' %></li> <% end %> </ol></dd></dl> </li> </ol>
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
active_scaffold_config_list-3.3.1 | app/views/active_scaffold_overrides/_show_config_list_form_body.html.erb |