Moved Screenshot.adminstatus to status_text helper

This change allows the use of fa_icon helpers
This commit is contained in:
Christoph Haas 2020-11-23 00:21:17 +01:00
parent 5fedf92661
commit 427cdf87d7
3 changed files with 22 additions and 11 deletions

View file

@ -71,15 +71,15 @@ class Screenshot < ApplicationRecord
end
# Brief text describing the status of this screenshots (for admins)
def adminstatus
if self.markedfordelete
"Removal requested > #{self.delete_reason}"
elsif self.approved
'Public'
else
'Waiting for approval'
end
end
# def adminstatus
# if self.markedfordelete
# "Removal requested > #{self.delete_reason}"
# elsif self.approved
# 'Public'
# else
# fa_icon('hourglass') + 'Waiting for approval'
# end
# end
# Publish a screenshot from the moderation queue
def approve!