Show own uploads properly and add a badge
This commit is contained in:
parent
879ddcfa69
commit
1d97215591
1 changed files with 12 additions and 1 deletions
|
|
@ -24,16 +24,27 @@ h1 =@package.name
|
|||
= image_tag(screenshot.image.variant(resize_to_limit: [800,600]), alt: screenshot.caption)
|
||||
- if screenshot.description
|
||||
.imgcaption =screenshot.description
|
||||
// Has the unmoderated screenshot been uploaded by the current user?
|
||||
- if screenshot_uploaded_by_current_user?(screenshot)
|
||||
span.label.warning
|
||||
| Uploaded by you
|
||||
- unless screenshot.approved
|
||||
| (but not public yet)
|
||||
|
||||
- if screenshot.version.present?
|
||||
.imgcaption
|
||||
em from version #{screenshot.upstream_version}
|
||||
| Screenshot was taken from version #{screenshot.upstream_version}
|
||||
- if user_signed_in? and current_user.is_admin?
|
||||
.imgcaption
|
||||
span.label.secondary #{screenshot.adminstatus}
|
||||
|
||||
|
||||
// Show detailed information about the screenshot object when in dev mode
|
||||
- if Rails.env == 'development'
|
||||
tt
|
||||
= screenshot.inspect
|
||||
|
||||
|
||||
// Is the user an admin?
|
||||
// TODO: fix dropdowns – do not enforce javascript
|
||||
- if user_signed_in? and current_user.is_admin?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue