Added colors to status label of a screenshot
This commit is contained in:
parent
27a1811153
commit
f31502c333
4 changed files with 31 additions and 13 deletions
|
|
@ -36,12 +36,14 @@ module PackagesHelper
|
|||
# (filled_stars+empty_stars).html_safe
|
||||
# end
|
||||
|
||||
def status_text(screenshot)
|
||||
# TODO: markedfordelete/reporting will be removed
|
||||
if screenshot.approved
|
||||
fa_icon('check-square') + ' Public'
|
||||
else
|
||||
fa_icon('hourglass') + ' Waiting for approval'
|
||||
# Return a readable status of a screenshot and a matching CSS color class
|
||||
def status(screenshot)
|
||||
if screenshot.approved && !screenshot.hidden
|
||||
return (fa_icon('eye') + ' Public'), 'public'
|
||||
elsif screenshot.hidden
|
||||
return (fa_icon('eye-slash') + ' Hidden'), 'hidden'
|
||||
elsif !screenshot.approved
|
||||
return (fa_icon('hourglass') + ' Waiting for approval'), 'unapproved'
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue