Sha256: 8dc86d6d910c70d6413ca98ff6a5227c895b81c33a25115419f971453b789220

Contents?: true

Size: 1.23 KB

Versions: 4

Compression:

Stored size: 1.23 KB

Contents

<%- model_class = Content.new.class -%>
<div class="page-header">
  <h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
</div>
<table class="table table-striped">
  <thead>
    <tr>
      <th><%= model_class.human_attribute_name(:slug) %></th>
      <th><%= model_class.human_attribute_name(:title) %></th>
      <th><%=t '.actions', :default => t("helpers.actions") %></th>
    </tr>
  </thead>
  <tbody>
    <% @contents.each do |content| %>
      <tr>
        <td><%= link_to content.slug, content_path(content) %></td>
        <td><%= content.title %></td>
        <td>
          <%= link_to t('.edit', :default => t("helpers.links.edit")),
                edit_content_path(content), :class => 'btn btn-mini' %>
          <%= link_to t('.destroy', :default => t("helpers.links.destroy")),
                content_path(content),
                :method => :delete,
                :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')),
                :class => 'btn btn-mini btn-danger' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<%= link_to t('.new', :default => t("helpers.links.new")),
            new_content_path,
            :class => 'btn btn-primary' %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
common-content-0.0.4 app/views/contents/index.html.erb
common-content-0.0.3 app/views/contents/index.html.erb
common-content-0.0.2 app/views/contents/index.html.erb
common-content-0.0.1 app/views/contents/index.html.erb