alaveteli
alaveteli copied to clipboard
Disable "similar requests"-sidebar on problematic requests
Disable "similar requests"-sidebar on problematic requests, including for the requester where they are requester_only
.
Reduced prominence requests are problematic, not sure apart from that.
Could also hide on requests to certain bodies or some other measure of determining likelihood of problematicness.
some other measure of determining likelihood of problematicness
Could do this via tags.
class InfoRequest
cattr_accessor :problematic_tags, default: []
def show_similar_requests?
true unless reduced_prominence? || problematic_tags?
end
def reduced_prominence?
prominence != 'normal'
end
def problematic_tags?
tags.any? { |tag| self.class.problematic_tags.include?(tag) }
end
end
# In theme
InfoRequest.problematic_tags = ['foo', 'bar', 'baz']