Sha256: e16111af2512aa9d6785db4b73c1c05dcbf609715893a672837ee1a4609d4161

Contents?: true

Size: 1.23 KB

Versions: 6

Compression:

Stored size: 1.23 KB

Contents

<section id="pages">
  <header>
    <%= render :partial => 'buttons' %>
    <%= render :partial => 'title' %>
  </header>

  <div class="table-container">

    <%= render :partial => 'admin/shared/status' %>

    <table>
      <thead>
        <tr>
          <% @columns.each do |col| %>
          <th><%= col.titleize %></th>
          <% end %>
          <% if @actions %>
          <th class="actions">Actions</th>
          <% end %>
        </tr>
      </thead>

      <tbody>
        <% @items.each do |item| %>
        <tr>
          <% @columns.each do |col| %>
          <td><%= item.send(col) %></td>
          <% end %>
          <% if @actions %>
          <td class="actions">
            <% if @actions.include?(:edit) %>
              <%= link_to [:edit, :admin, item] do %>
              <i class="icon-pencil"></i>&nbsp;Edit
              <% end %>
            <% end %>
            <% if @actions.include?(:delete) %>
              <%= link_to [:admin, item], :method => :delete, :data => { :confirm => "Are you sure?" } do %>
              <i class="icon-remove"></i>&nbsp;Delete
              <% end %>
            <% end %>
          </td>
          <% end %>
        </tr>
        <% end %>
      </tbody>
    </table>

  </div>

</section>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cambium-0.3.0 lib/generators/cambium/templates/app/views/admin/index.html.erb
cambium-0.2.2 lib/generators/cambium/templates/app/views/admin/index.html.erb
cambium-0.2.1 lib/generators/cambium/templates/app/views/admin/index.html.erb
cambium-0.2.0 lib/generators/cambium/templates/app/views/admin/index.html.erb
cambium-0.0.2 lib/generators/cambium/templates/app/views/admin/index.html.erb
cambium-0.0.1 lib/generators/cambium/templates/app/views/admin/index.html.erb