mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
41 lines
1.6 KiB
Plaintext
41 lines
1.6 KiB
Plaintext
<%- model_class = User.new.class -%>
|
|
<h1><%=t '.title', :default => model_class.model_name.human.pluralize %></h1>
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th><%= model_class.human_attribute_name(:id) %></th>
|
|
<th><%= model_class.human_attribute_name(:_type) %></th>
|
|
<th><%= model_class.human_attribute_name(:_id) %></th>
|
|
<th><%= model_class.human_attribute_name(:name) %></th>
|
|
<th><%= model_class.human_attribute_name(:email) %></th>
|
|
<th><%= model_class.human_attribute_name(:created_at) %></th>
|
|
<th><%=t '.actions', :default => t("helpers.actions") %></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @users.each do |user| %>
|
|
<tr>
|
|
<td><%= link_to user.id, user_path(user) %></td>
|
|
<td><%= user._type %></td>
|
|
<td><%= user._id %></td>
|
|
<td><%= user.name %></td>
|
|
<td><%= user.email %></td>
|
|
<td><%=l user.created_at %></td>
|
|
<td>
|
|
<%= link_to t('.edit', :default => t("helpers.links.edit")),
|
|
edit_user_path(user), :class => 'btn btn-mini' %>
|
|
<%= link_to t('.destroy', :default => t("helpers.links.destroy")),
|
|
user_path(user),
|
|
: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_user_path,
|
|
:class => 'btn btn-primary' %>
|