Sha256: 4a8282b12e3c526266b5ac21bb3d6d5050c98e2949a1d8db7d650ff2a2f1c5f8
Contents?: true
Size: 1.5 KB
Versions: 4
Compression:
Stored size: 1.5 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.visible_columns.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><%= column_heading_label(c) %></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'].map{ |v| [as_(v), v] } 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
4 entries across 4 versions & 1 rubygems