Moved Screenshot.adminstatus to status_text helper
This change allows the use of fa_icon helpers
This commit is contained in:
parent
5fedf92661
commit
427cdf87d7
3 changed files with 22 additions and 11 deletions
|
|
@ -58,4 +58,16 @@ module PackagesHelper
|
|||
# empty_stars = fa_icon('star-o') * (5-rating)
|
||||
# (filled_stars+empty_stars).html_safe
|
||||
# end
|
||||
|
||||
def status_text(screenshot)
|
||||
# TODO: markedfordelete/reporting will be removed
|
||||
if screenshot.markedfordelete
|
||||
"Removal requested > #{screenshot.delete_reason}"
|
||||
elsif screenshot.approved
|
||||
fa_icon('check-square') + ' Public'
|
||||
else
|
||||
fa_icon('hourglass') + ' Waiting for approval'
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue