Added button to delete screenshot from package details page

This commit is contained in:
Christoph Haas 2015-02-11 20:42:39 +01:00
parent 5c2a4f237e
commit eec71890a5

View file

@ -18,6 +18,11 @@
a.black.fancybox href=screenshot.image.url(:large, timestamp: false) rel='fancybox-thumb' title=screenshot.caption
= image_tag(screenshot.image.url(:large, timestamp: false), alt: screenshot.caption)
.imgcaption =screenshot.caption
// TODO: Enable button only if admin or uploader
a.button.tiny.alert[
href=delete_screenshot_path(@package.name, screenshot.id)
onclick="return confirm('Really delete the screenshot?');"
] Delete screenshot
// Upload image
li