Sha256: ea68f91d70c2ebcc775b1e97d12659cf0f9e3248e1af2286447f16fc5729c149

Contents?: true

Size: 1.4 KB

Versions: 13

Compression:

Stored size: 1.4 KB

Contents

<% yield_name = "table_headers_#{model}_#{rand(100)}" %>

<% content_for yield_name do %>
  <thead>
    <tr>
      <% if controller.respond_to?(:bulk) %>
        <th><%= check_box_tag "action-toggle", "", false, :class => "action-toggle" %></th>
      <% end %>
      <% headers.each do |header| %>
        <th><%= header %></th>
      <% end %>
      <th width="120"><%= Typus::I18n.t('Actions') %></th>
    </tr>
  </thead>
<% end %>

<table class="table table-hover">

  <%= yield yield_name %>

  <% items.each do |item| %>
    <tr id="<%= dom_id(item) %>">
      <% if controller.respond_to?(:bulk) %>
        <td width="16">
          <%= check_box_tag "selected_item_ids[]", item.id, false, :class => "action-select" %>
        </td>
      <% end %>
      <% table_fields_for_item(item, fields).each do |field| %>
        <td><%= field %></td>
      <% end %>
      <td>
        <div class="btn-toolbar" style="margin: 0px;">
          <div class="btn-group">
            <% table_actions(model, item, association_name).each do |action| %>
              <% html_options = action[:options] || {} %>
              <%= link_to url_for(action[:url]), html_options.merge(class: 'btn btn-small') do %>
                <i class="icon-<%= action[:url][:action] %>"></i>
                <%= action[:message] %>
              <% end %>
            <% end %>
          </div>
        </div>
      </td>
    </tr>
  <% end %>

</table>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
brainsome_typus-4.0.0.beta13 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta12 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta11 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta10 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta9 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta8 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta7 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta6 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta5 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta4 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta3 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta2 app/views/helpers/admin/resources/_table.html.erb
brainsome_typus-4.0.0.beta1 app/views/helpers/admin/resources/_table.html.erb