Sha256: 090b21bb780e59537f4dc5d0b01f8be0159955d87701e27fae85a2d6991a8979

Contents?: true

Size: 1.1 KB

Versions: 3

Compression:

Stored size: 1.1 KB

Contents

<table class="nostalgic">
  <thead>
    <tr>
      <td>
        <%= f.text_field attr, :class => css_class %>
      </td>
      <td>
        <%= f.text_field "#{attr}_effective_at", :class => 'datepicker', :style => 'display: none;' %>
      </td>
      <td>
        <%= 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 %>
            <%= content_tag(:span, f.object.value, class: css_class) %>
          </td>
          <td>
            <%= content_tag(:span, f.object.effective_at, class: css_class) %>
          </td>
          <td>
            <%= image_tag 'nostalgic/minus.png', :onclick => 'nostalgic.remove_row(this); return false;' %>
          </td>
        </tr>
      <% end %>
    <% end %>
  </tbody>
</table>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
nostalgic-0.5.1 app/views/nostalgic/_text_field.html.erb
nostalgic-0.5.0 app/views/nostalgic/_text_field.html.erb
nostalgic-0.4.1 app/views/nostalgic/_text_field.html.erb