Add admin links to review sections that the user can manager
This commit is contained in:
parent
1e20731e32
commit
ba98c36868
3 changed files with 14 additions and 1 deletions
|
@ -256,6 +256,14 @@
|
||||||
<li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</a></li>
|
<li><a href="{% url "user_reviewed" section.section.slug %}">Reviewed by you</a></li>
|
||||||
<li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
|
<li><a href="{% url "user_not_reviewed" section.section.slug %}">Not Reviewed by you</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
{% if section in manage_sections %}
|
||||||
|
<ul>
|
||||||
|
<li><a href="{% url "review_bulk_update" section.section.slug %}">Bulk Update</a></li>
|
||||||
|
<li><a href="{% url "result_notification" section.section.slug "accepted" %}">Send notifications</a></li>
|
||||||
|
<li><a href="{% url "review_status" section.section.slug %}">Voting Status</a></li>
|
||||||
|
<li><a href="{% url "review_admin" section.section.slug %}">Reviewer Stats</a></li>
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
2
vendor/symposion/proposals/views.py
vendored
2
vendor/symposion/proposals/views.py
vendored
|
@ -40,7 +40,7 @@ def proposal_submit(request):
|
||||||
messages.info(request, _("To submit a proposal, please "
|
messages.info(request, _("To submit a proposal, please "
|
||||||
"<a href='{0}'>log in</a> and create a speaker profile "
|
"<a href='{0}'>log in</a> and create a speaker profile "
|
||||||
"via the dashboard.".format(settings.LOGIN_URL)))
|
"via the dashboard.".format(settings.LOGIN_URL)))
|
||||||
return redirect("home") # @@@ unauth'd speaker info page?
|
return redirect("dashboard") # @@@ unauth'd speaker info page?
|
||||||
else:
|
else:
|
||||||
try:
|
try:
|
||||||
request.user.speaker_profile
|
request.user.speaker_profile
|
||||||
|
|
|
@ -3,9 +3,14 @@ from symposion.proposals.models import ProposalSection
|
||||||
|
|
||||||
def reviews(request):
|
def reviews(request):
|
||||||
sections = []
|
sections = []
|
||||||
|
manage_sections = {}
|
||||||
for section in ProposalSection.objects.all():
|
for section in ProposalSection.objects.all():
|
||||||
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
|
if request.user.has_perm("reviews.can_review_%s" % section.section.slug):
|
||||||
sections.append(section)
|
sections.append(section)
|
||||||
|
if request.user.has_perm("reviews.can_manage_%s" % section.section.slug):
|
||||||
|
manage_sections.setdefault(section, []).append
|
||||||
return {
|
return {
|
||||||
"review_sections": sections,
|
"review_sections": sections,
|
||||||
|
"manage_sections": manage_sections
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue