Sha256: d49f778e0530dd9c3eb20ebb72fbead6c8f5c5a353c3cadcd2bf69572e9ded2e

Contents?: true

Size: 1.13 KB

Versions: 4

Compression:

Stored size: 1.13 KB

Contents

<div class="ui segment breadcrumb">
  <%= link_to 'Back', data_record_record_lists_path(@data_record), class: 'section' %>
  <div class="divider"> / </div>
  <div class="active section">Edit</div>
</div>

<div class="ui segment">
  <%= default_form_with url: columns_data_record_record_list_path(@data_record), method: :patch do |f| %>
    <% @record_list.columns.each do |k, v| %>
      <% if TheData.config.mapping[@data_record.columns[k.to_sym].to_sym][:input] == 'array' %>
        <div class="inline fields">
          <label class="six wide field"><%= k.to_s.titleize %>:</label>
          <% v.each_with_index do |_value, _index| %>
            <% _value.each do |_k, _v| %>
              <%= text_field_tag "columns[#{k}][][#{_k}]", _v %>
            <% end %>
          <% end %>
        </div>
      <% else %>
        <div class="inline fields">
          <label class="six wide field"><%= k.to_s.titleize %>:</label>
          <div class="six wide field">
            <%= text_field_tag :"columns[#{k}]", v, as: @data_record.columns[k.to_sym] %>
          </div>
        </div>
      <% end %>
    <% end %>
    <%= f.submit %>
  <% end %>
</div>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_data-1.0.2 app/views/datum/admin/record_lists/edit_columns.html.erb
rails_data-1.0.1 app/views/datum/admin/record_lists/edit_columns.html.erb
rails_data-1.0.0 app/views/data/admin/record_lists/edit_columns.html.erb
rails_data-0.0.1 app/views/rails_data_admin/record_lists/edit_columns.html.erb