43 lines
1.7 KiB
Plaintext
43 lines
1.7 KiB
Plaintext
<%- model_class = Article -%>
|
|
<div class="page-header">
|
|
<h1><%=t '.title', :default => model_class.model_name.human.pluralize.titleize %></h1>
|
|
</div>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><%= model_class.human_attribute_name(:id) %></th>
|
|
<th><%= model_class.human_attribute_name(:title) %></th>
|
|
<th><%= model_class.human_attribute_name(:content) %></th>
|
|
<th><%= model_class.human_attribute_name(:rate) %></th>
|
|
<th><%= model_class.human_attribute_name(:active) %></th>
|
|
<th><%= model_class.human_attribute_name(:created_by) %></th>
|
|
<th><%=t '.actions', :default => t("helpers.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @articles.each do |article| %>
|
|
<tr>
|
|
<td><%= link_to article.id, article_path(article) %></td>
|
|
<td><%= article.title %></td>
|
|
<td><%= article.content %></td>
|
|
<td><%= article.rate %></td>
|
|
<td><%= article.active %></td>
|
|
<td><%= article.created %></td>
|
|
<td>
|
|
<%= link_to t('.edit', :default => t("helpers.links.edit")),
|
|
edit_article_path(article), :class => 'btn btn-default btn-xs' %>
|
|
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
|
article_path(article),
|
|
:method => :delete,
|
|
:data => { :confirm => t('.confirm', :default => t("helpers.links.confirm", :default => 'Are you sure?')) },
|
|
:class => 'btn btn-xs btn-danger' %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= link_to t('.new', :default => t("helpers.links.new")),
|
|
new_article_path,
|
|
:class => 'btn btn-primary' %>
|