Sha256: 5268ec5c8eb33760530a09e819e1a385e702b0bcc754c007f77ea52ccbcf9eac

Contents?: true

Size: 1.03 KB

Versions: 8

Compression:

Stored size: 1.03 KB

Contents

<h3><%= t("#{type}.index.title") %></h3>

<% if collection.none? %>
<p><%= I18n.t("#{type}.index.empty_collection")%></p>
<% else %>
  <% collection.each do |resource| %>
<table class="table table-striped">
  <thead>
    <tr class="<%= cycle('odd', 'even') %>">
      <th>
    <% (columns.is_a?(Hash) ? columns.keys : columns).each do |column| %>
        <strong><%= t(
          "activerecord.attributes.general.#{column}", 
          default: t("activerecord.attributes.#{type.singularize}.#{column}")
        ) %>:</strong> 
        
        <%= table_cell column, resource, columns.is_a?(Hash) ? columns[column] : nil %> 
    <% end %>
    <% if resource.respond_to? :state_events %>
          <%= render partial: 'shared/resource/actions', locals: { type: type, resource: resource } %>
    <% end %>
      </th>
    </tr>
  </thead>
</table>

<table class="table table-striped">
  <tbody>
    <tr class="<%= cycle('odd', 'even') %>">
      <td>
        <%= resource.send(content_column) %>
      </td>
    </tr>
  </tbody>
</table>
  <% end %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voluntary-0.1.0 app/views/shared/collection/_list.html.erb
voluntary-0.1.0.rc4 app/views/shared/collection/_list.html.erb
voluntary-0.1.0.rc3 app/views/shared/collection/_list.html.erb
voluntary-0.1.0.rc2 app/views/shared/collection/_list.html.erb
voluntary-0.1.0.rc1 app/views/shared/collection/_list.html.erb
voluntary-0.0.3 app/views/shared/collection/_list.html.erb
voluntary-0.0.2 app/views/shared/collection/_list.html.erb
voluntary-0.0.1 app/views/shared/collection/_list.html.erb