Commit 3d69c10b authored by kolosfed's avatar kolosfed

Add admin table markup from template to users/index

parent ba0881a9
.admin-table {
th:last-child, td:last-child {
text-align: right;
i {
margin-left: 0.5rem
}
}
}
\ No newline at end of file
......@@ -6,3 +6,5 @@
@import "font-awesome";
@import "sb-abmin-2/sb-admin-2";
@import "admin-table";
\ No newline at end of file
%h1 Listing users
- model = User
%table
.card.shadow.mb-4
.card-header.py-3
%h2.m-0.font-weight-bold.text-primary= model.model_name.human(count: 2)
.card-body
.table-responsive
%table.table.table-bordered.admin-table
%thead
%tr
%th Name
%th Email
%th Password
%th
%th
%th
%th= model.human_attribute_name(:name)
%th= model.human_attribute_name(:email)
%th Actions
%tbody
- @users.each do |user|
%tr
%td= user.name
%td= link_to user.name, user
%td= user.email
%td= user.password
%td= link_to 'Show', user
%td= link_to 'Edit', edit_user_path(user)
%td= link_to 'Destroy', user, method: :delete, data: { confirm: 'Are you sure?' }
%td
= link_to icon('fas', 'eye'), user_path(user)
= link_to icon('fas', 'edit'), edit_user_path(user)
= link_to icon('fas', 'trash-alt'), user_path(user), method: :delete, data: {confirm: "Are you sure?"}
%br
= link_to "New #{model.model_name.human}", new_user_path
= link_to 'New User', new_user_path
uk:
activerecord:
models:
user:
one: Користувач
few: Користувачі
many: Користувачів
other: Користувача
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment