<% if !defined?(i) %>
<% end %>
Delete <% if defined?(i) %> <%= f.hidden_field :_destroy, :value => "false", :class => "attribute_field_to_delete" %>

<%= column.title %>

<% else %>

ColumnXX

<% end %>
<%= f.text_field :key, :autocomplete => "off", :'data-type' => 'key' %>
<% @site_in_use_locales.each do |locale| %> <% active = (locale == @site_in_use_locales.first ? "active in" : "") %> <% id = (defined?(i) ? "table_column_#{i}_title_translations_#{locale.to_s}" : "table_column_XXX_title_translations_#{locale.to_s}") %>
<%= f.fields_for :title_translations do |f| %> <%= f.text_field locale, :value => column.title_translations[locale] %> <% end %>
<% end %>
<% @site_in_use_locales.each do |locale| %> <% active = (locale == @site_in_use_locales.first ? "active" : "") %> <% id = (defined?(i) ? "table_column_#{i}_title_translations_#{locale.to_s}" : "table_column_XXX_title_translations_#{locale.to_s}") %> <%= link_to t(locale).to_s,"##{id}",:class=>"btn #{active}",:data=>{:toggle=>"tab"}%> <% end %>
<%= f.check_box :default_ordered_field, class: 'default_ordered_field' %>
<%= f.select :order_direction,['desc','asc'].map{|v| [t("universal_table.#{v}"),v]} %>
<% select_values = UTable::FIELD_TYPES.collect{|ft| [ft.capitalize,ft]} %> <%= f.select :type, select_values, {}, {class: "type-selector"} %> "> <% select_values = UTable::DATE_FORMATS.collect{|ft| [ft.upcase,ft]} %>
<% if defined?(i) %> <% if column.order.nil? %> <%= f.hidden_field :order, :value => i, :class => "order-hidden-field" %> <% else %> <%= f.hidden_field :order, :class => "order-hidden-field" %> <% end %> <% else %> <%= f.hidden_field :order, :value=> "XXX", :class => "order-hidden-field" %> <% end %>
<% if !defined?(i) %>
<% end %>