Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
open-source
aoz-003
Commits
370fe477
Commit
370fe477
authored
May 11, 2017
by
Tugce Nur Tas
Committed by
Tuğçe Nur Taş
May 12, 2017
Browse files
move delete link from show to index view
parent
7ae26fde
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/views/users/_user.html.slim
View file @
370fe477
tr
td
=
link_to
user
.
email
,
user
td
=
t
(
"role.
#{
user
.
role
}
"
)
td
=
link_to
user
.
email
,
user
td
=
t
(
"role.
#{
user
.
role
}
"
)
-
if
policy
(
user
).
destroy?
=
link_to
t_action
(
:destroy
),
user
,
data:
{
confirm:
t
(
'are_you_sure'
)},
method: :delete
app/views/users/index.html.slim
View file @
370fe477
...
...
@@ -9,6 +9,7 @@
tr
th
=
t_attr
(
:email
)
th
=
t_attr
(
:role
)
th
=
tbody
=
render
@users
...
...
app/views/users/show.html.slim
View file @
370fe477
...
...
@@ -8,5 +8,6 @@
strong
=
t_attr
(
:role
)
.col-md-8
=
t
(
"role.
#{
@user
.
role
}
"
)
-
if
policy
(
@user
).
destroy?
=
link_to
t_action
(
:destroy
),
@user
,
data:
{
confirm:
t
(
'are_you_sure'
)},
method: :delete
,
class:
'btn btn-danger'
.row
.col-xs-12
p
=
link_to
t
(
'back'
),
clients_path
,
class:
'btn btn-default'
Write
Preview
Supports
Markdown
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