diff --git a/board/context_processors.py b/board/context_processors.py index 6abf227..e5d721a 100644 --- a/board/context_processors.py +++ b/board/context_processors.py @@ -1,5 +1,5 @@ from django.conf import settings as django_settings -from board.models import Board +from board.models import Board, ReportRecord def settings(request): @@ -8,3 +8,24 @@ def settings(request): def boards(request): return {"boards": Board.objects.filter(readonly=False)} + + +def reports(request): + user = request.user + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + print("reports!") + if user and user.has_perm("board.view_reportrecord"): + return { + "reports": ReportRecord.objects.all(), + "reports_urgent": ReportRecord.objects.filter(urgent=True), + } + else: + return {} diff --git a/board/static/board/restricted.css b/board/static/board/restricted.css index e69de29..ec1dde8 100644 --- a/board/static/board/restricted.css +++ b/board/static/board/restricted.css @@ -0,0 +1,8 @@ +/* Nav */ +.nav_admin { + float: right; +} + +.nav_report_urgent { + color: var(--error); +} \ No newline at end of file diff --git a/board/static/board/style.css b/board/static/board/style.css index 9c52b6d..2a81c08 100644 --- a/board/static/board/style.css +++ b/board/static/board/style.css @@ -6,6 +6,7 @@ --activated: #888; --post-background: #d9d9d9; --reply-background: #eee; + --error: #f00; } body { @@ -169,6 +170,11 @@ th { font-size: smaller; } +/* Nav */ +nav { + font-size: small; +} + /* Misc */ a:link { diff --git a/board/templates/board/base.html b/board/templates/board/base.html index b281cfa..f5fde9a 100644 --- a/board/templates/board/base.html +++ b/board/templates/board/base.html @@ -19,6 +19,7 @@ {% block extrajs %}{% endblock %}
+