2012-08-14 07:54:45 +00:00
|
|
|
from symposion.proposals.models import ProposalSection
|
|
|
|
|
|
|
|
|
|
|
|
def reviews(request):
|
|
|
|
sections = []
|
2017-09-22 12:28:27 +00:00
|
|
|
manage_sections = {}
|
2012-08-14 07:54:45 +00:00
|
|
|
for section in ProposalSection.objects.all():
|
|
|
|
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
|
|
|
|
sections.append(section)
|
2017-09-22 12:28:27 +00:00
|
|
|
if request.user.has_perm("reviews.can_manage_%s" % section.section.slug):
|
|
|
|
manage_sections.setdefault(section, []).append
|
2012-08-14 07:54:45 +00:00
|
|
|
return {
|
|
|
|
"review_sections": sections,
|
2017-09-22 12:28:27 +00:00
|
|
|
"manage_sections": manage_sections
|
2012-08-14 07:54:45 +00:00
|
|
|
}
|
2017-09-22 12:28:27 +00:00
|
|
|
|