Commit 2c7846d12a28608890d5ee35b59969005783bfd4

Authored by Zambom
1 parent 3c15213f

Making create subject button available to admins

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
subjects/templates/subjects/list.html
... ... @@ -93,7 +93,7 @@
93 93  
94 94 {{category.description|safe}}
95 95  
96   - {% if request.user in category.coordinators.all %}
  96 + {% if request.user in category.coordinators.all or request.user.is_staff %}
97 97 <a href="{% url 'subjects:create' category.slug %}"><button class="create-subject-btn"> {% trans "Create new subject" %} </button></a>
98 98 {% endif %}
99 99  
... ... @@ -139,6 +139,7 @@
139 139 <div id="{{category.slug}}" class="panel-collapse panel-body collapse category-panel-content">
140 140 <input type="hidden" class="log_url" value="{% url 'categories:view_log' category.id %}" />
141 141 <input type="hidden" class="log_id" value="" />
  142 +
142 143 {% if category.coordinators.all|length > 0 %}
143 144 <h4><b>{% trans "Coordinator(s) " %}: </b>
144 145 {{ category.coordinators.all|join:', ' }}
... ... @@ -148,8 +149,8 @@
148 149 {% endif %}
149 150  
150 151 {{category.description|safe}}
151   -
152   - {% if request.user in category.coordinators.all %}
  152 +
  153 + {% if request.user in category.coordinators.all or request.user.is_staff %}
153 154 <a href="{% url 'subjects:create' category.slug %}"><button class="create-subject-btn"> {% trans "Create new subject" %} </button></a>
154 155 {% endif %}
155 156  
... ...