Sha256: 4f5a46244092d91f002630ea7d612bfef6c56d5b43c43a41fd737f2c00d0bcb7

Contents?: true

Size: 1.27 KB

Versions: 10

Compression:

Stored size: 1.27 KB

Contents

<tr class="<%= (index % 2).zero? ? 'even' : 'odd' %> <%= row_class_mapper.call(item) %>">
  <% fields.each do |field, class_mapper, label, value_mapper| %>
    <td class="align-top <%= class_mapper.call(item) %>">
      <% if component.secret_field?(field) %>
        <%= controller.helpers.render partial: 'active_element/components/secret/field',
                                      locals: { secret: value_mapper.call(item), label: label } %>
      <% else %>
        <%= controller.helpers.render partial: 'active_element/components/table/field',
                                      locals: { value: value_mapper.call(item) } %>
      <% end %>
    </td>
  <% end %>

  <% if show %>
    <td class="<%= "#{class_name}-show" %> action-column text-end">
      <%= active_element.component.show_button(item, show, tooltip: true, class: 'btn-sm') %>
    </td>
  <% end %>

  <% if edit %>
    <td class="<%= "#{class_name}-edit" %> action-column text-end">
      <%= active_element.component.edit_button(item, show, tooltip: true, class: 'btn-sm') %>
    </td>
  <% end %>

  <% if destroy %>
    <td class="<%= "#{class_name}-destroy" %> action-column text-end">
      <%= active_element.component.destroy_button(item, destroy, tooltip: true, class: 'btn-sm') %>
    </td>
  <% end %>
</tr>

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
active_element-0.0.31 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.30 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.29 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.28 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.27 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.26 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.24 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.23 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.22 app/views/active_element/components/table/_collection_row.html.erb
active_element-0.0.21 app/views/active_element/components/table/_collection_row.html.erb