Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
marketParser
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nazarf
marketParser
Commits
3d69c10b
Commit
3d69c10b
authored
Apr 06, 2020
by
kolosfed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add admin table markup from template to users/index
parent
ba0881a9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
22 deletions
+39
-22
admin-table.scss
app/assets/stylesheets/application/admin-table.scss
+8
-0
main.scss
app/assets/stylesheets/application/main.scss
+2
-0
index.html.haml
app/views/users/index.html.haml
+22
-22
uk.yml
config/locales/uk.yml
+7
-0
No files found.
app/assets/stylesheets/application/admin-table.scss
0 → 100644
View file @
3d69c10b
.admin-table
{
th
:last-child
,
td
:last-child
{
text-align
:
right
;
i
{
margin-left
:
0
.5rem
}
}
}
\ No newline at end of file
app/assets/stylesheets/application/main.scss
View file @
3d69c10b
...
...
@@ -6,3 +6,5 @@
@import
"font-awesome"
;
@import
"sb-abmin-2/sb-admin-2"
;
@import
"admin-table"
;
\ No newline at end of file
app/views/users/index.html.haml
View file @
3d69c10b
%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
.
passwor
d
%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?'
}
%t
d
=
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
config/locales/uk.yml
View file @
3d69c10b
uk
:
activerecord
:
models
:
user
:
one
:
Користувач
few
:
Користувачі
many
:
Користувачів
other
:
Користувача
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment