Show Moderate link in topbar. Add menu icons.

This commit is contained in:
Christoph Haas 2021-02-24 19:18:19 +01:00
parent 117239ee87
commit ec43f47f92
3 changed files with 25 additions and 7 deletions

View file

@ -51,6 +51,12 @@ class Package < ApplicationRecord
where(id: subselect )
end
# Return a list of packages that have screenshots to be moderated
def self.need_moderation
Package.joins(:screenshots).where('screenshots.approved=false or screenshots.markedfordelete=true').distinct(:name)
end
# Return a query of all packages that have screenshots
def self.without_screenshots
# Query for all packages who's ID does not appear in a screenshot's "package_id" field