Displaying delete button for user's own upload
This commit is contained in:
parent
28519c1f30
commit
102ea7e67c
1 changed files with 15 additions and 14 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
// Button that reveals a dropdown/modal for moderation/reporting
|
// Button that reveals a dropdown/modal for moderation/reporting
|
||||||
.button-group.small.align-center
|
.button-group.small.align-center
|
||||||
|
|
||||||
|
- if screenshot_uploaded_by_current_user?(screenshot)
|
||||||
a.button.small.bordered.radius.alert[
|
a.button.small.bordered.radius.alert[
|
||||||
href=delete_screenshot_path(screenshot.id)
|
href=delete_screenshot_path(screenshot.id)
|
||||||
onclick="return confirm('Really delete the screenshot?');"
|
onclick="return confirm('Really delete the screenshot?');"
|
||||||
] #{fa_icon 'trash'} Delete
|
] #{fa_icon 'trash'} Delete
|
||||||
|
|
||||||
/ a.button.small.bordered.radius.secondary[
|
/ a.button.small.bordered.radius.secondary[
|
||||||
/ href='#'
|
/ href='#'
|
||||||
|
|
@ -16,16 +16,17 @@
|
||||||
/ ] #{fa_icon 'star'} Make primary
|
/ ] #{fa_icon 'star'} Make primary
|
||||||
|
|
||||||
- if not screenshot.approved
|
- if not screenshot.approved
|
||||||
a.button.small.success[
|
- if current_user && current_user.is_admin?
|
||||||
href=approve_screenshot_path(screenshot.id)
|
a.button.small.success[
|
||||||
method='post'
|
href=approve_screenshot_path(screenshot.id)
|
||||||
] Approve
|
method='post'
|
||||||
|
] Approve
|
||||||
|
|
||||||
- elsif screenshot.markedfordelete
|
/ - elsif screenshot.markedfordelete
|
||||||
a.button.small.success[
|
/ a.button.small.success[
|
||||||
href=approve_screenshot_path(screenshot.id)
|
/ href=approve_screenshot_path(screenshot.id)
|
||||||
method='post'
|
/ method='post'
|
||||||
] Keep
|
/ ] Keep
|
||||||
|
|
||||||
|
|
||||||
/ Display additional information to admins
|
/ Display additional information to admins
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue