Added age_days method to display the upload age of a screenshot

This commit is contained in:
Christoph Haas 2016-03-02 16:36:13 +01:00
parent 2b2f325356
commit d7bfa0843f
2 changed files with 8 additions and 1 deletions

View file

@ -13,7 +13,7 @@
.imgcaption =screenshot.caption
// TODO: Show information only if admin
- if user_signed_in?
p Uploader IP=#{screenshot.uploaderip} / Token=#{screenshot.uploaderhash}
p Uploader IP=#{screenshot.uploaderip} / Token=#{screenshot.uploaderhash} / Uploaded #{screenshot.age_days}
// TODO: Enable button only if admin or uploader
a.button.tiny.alert[
href=delete_screenshot_path(@package.name, screenshot.id)