Dropdown on details page allows image management for users and admins
This commit is contained in:
parent
263f6cd33f
commit
16999260ca
8 changed files with 75 additions and 35 deletions
17
app/views/packages/_user_dropdown.slim
Normal file
17
app/views/packages/_user_dropdown.slim
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Button that reveals a dropdown/modal for users (for their own screenshots)
|
||||
.text-center
|
||||
button.small.dropdown.warning.button type="button" data-toggle="admin-info-#{screenshot.id}"
|
||||
'Manage your screenshot
|
||||
.dropdown-pane data-dropdown=true id="admin-info-#{screenshot.id}"
|
||||
a.button.small.alert[
|
||||
href=delete_screenshot_path(@package.name, screenshot.id)
|
||||
onclick="return confirm('Really delete the screenshot?');"
|
||||
] Delete screenshot
|
||||
p Write a description for this screenshot:
|
||||
= form_tag(update_screenshot_description_path(screenshot.package.name, screenshot.id))
|
||||
.input-group
|
||||
= text_field_tag 'description', nil, class: 'input-group-field', maxlength: 40
|
||||
.input-group-button
|
||||
=submit_tag 'OK', class: 'button success'
|
||||
p
|
||||
i =screenshot.status
|
||||
Loading…
Add table
Add a link
Reference in a new issue