Made the link on the header point to the new reports page, and made it show up on the index page.
This commit is contained in:
parent
94210b5a1b
commit
fb6fdf6d8d
2 changed files with 6 additions and 2 deletions
|
@ -43,8 +43,10 @@
|
|||
{% else %}
|
||||
<li>{% trans "You are not logged in." %}</li>
|
||||
{% endif %}
|
||||
{% if user.is_superuser and reports %}
|
||||
<li class="reportlink"><strong><a href="{% url admin:index %}">{% trans "There are new reports" %} ({% new_reports %})</a></strong></li>
|
||||
{% if user.is_superuser or can_view_reports %}
|
||||
{% if reports %}
|
||||
<li class="reportlink"><strong><a href="{% url djangobb:forum_reports %}">{% trans "There are new reports" %} ({% new_reports %})</a></strong></li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% if user.is_authenticated %}
|
||||
|
|
|
@ -66,6 +66,8 @@ def index(request, full=True):
|
|||
'online_count': users_count,
|
||||
'guest_count': guest_count,
|
||||
'last_user': User.objects.latest('date_joined'),
|
||||
'reports': True,
|
||||
'can_view_reports': user.has_perm('djangobb_forum.change_report')
|
||||
}
|
||||
if full:
|
||||
return render(request, 'djangobb_forum/index.html', to_return)
|
||||
|
|
Reference in a new issue