Sha256: 577bcf0de2858cdbff1b38fd79c2aeaf3c0f450162eb5e3f2b15987c200efd55

Contents?: true

Size: 1.21 KB

Versions: 6

Compression:

Stored size: 1.21 KB

Contents

<table class="nostalgic">
  <thead>
    <tr>
      <td>
        <%= f.collection_select attr, collection, value_method, text_method, options, html_options %>
      </td>
      <td>
        <%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
        <%= image_tag 'nostalgic/list.png', :onclick => 'nostalgic.edit_nostalgic_attr(this); return false;' %>
      </td>
    </tr>
  </thead>
  <tbody style="display: none;">
    <% f.object.public_send(attr.to_s.pluralize).each_with_index do |nostalgic_attr, i| %>
      <%= f.fields_for "#{attr.to_s.pluralize}_attributes][#{i}]", nostalgic_attr do |f| %>
        <tr>
          <td>
            <%= f.hidden_field :id %>
            <%= f.hidden_field :_destroy %>
            <%= f.collection_select :value, collection, value_method, text_method, options, html_options.merge(:disabled => true, :readonly => true) %>
          </td>
          <td>
            <%= f.text_field :effective_at, :class => 'datepicker', :disabled => true, :readonly => true %>
            <%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
          </td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
nostalgic-0.5.1 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.5.0 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.4.1 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.4.0 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.3.0 app/views/nostalgic/_collection_select.html.erb
nostalgic-0.2.0 app/views/nostalgic/_collection_select.html.erb