From 67fa72da441b4c2a0fde2a2a9345c47948ca3584 Mon Sep 17 00:00:00 2001 From: Gustavo Date: Wed, 23 Aug 2017 11:08:47 -0300 Subject: [PATCH] Adjusting bulletin templates for non student users --- bulletin/templates/bulletin/view.html | 21 +++++++++++++++++++++ bulletin/templates/bulletin/window_view.html | 22 +++++++++++++++++++++- 2 files changed, 42 insertions(+), 1 deletion(-) diff --git a/bulletin/templates/bulletin/view.html b/bulletin/templates/bulletin/view.html index 9fdb4db..3048bf0 100644 --- a/bulletin/templates/bulletin/view.html +++ b/bulletin/templates/bulletin/view.html @@ -31,6 +31,7 @@ {% endif %} {% resource_permissions request.user bulletin as has_resource_permissions %} + {% subject_permissions request.user bulletin.topic.subject as has_subject_permissions %} {% if bulletin.visible %}
@@ -55,6 +56,18 @@
+ {% if has_subject_permissions %} +
+ {% csrf_token %} + +
+
+ {% endif %} + {% autoescape off %} {{ bulletin.content }} {% endautoescape %} @@ -179,6 +192,7 @@
+ {% if not has_subject_permissions %}
@@ -212,6 +226,13 @@
+ {% endif %} + + {% block addtional_scripts %} + + {% endblock %}