Commit 5a22653f6d5d9b4cc38899040da0c3f357305158
1 parent
ec358232
Exists in
master
and in
3 other branches
now professors are only able to remove or edit on subject view
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
subjects/templates/subjects/view.html
... | ... | @@ -46,7 +46,9 @@ |
46 | 46 | <i class="fa fa-ellipsis-v" aria-hidden="true"></i> |
47 | 47 | </a> |
48 | 48 | <ul class="dropdown-menu pull-right" aria-labelledby="moreActions"> |
49 | + {% if request.user not in subject.professor.all %} | |
49 | 50 | <li><a href="{% url 'subjects:replicate' subject.slug %}"><i class="fa fa-files-o fa-fw" aria-hidden="true"></i>{% trans 'Replicate' %}</a></li> |
51 | + {% endif %} | |
50 | 52 | <li><a href="{% url 'subjects:update' subject.slug %}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i>{% trans 'Edit' %}</a></li> |
51 | 53 | <li><a href="{% url 'groups:index' subject.slug %}"><i class="fa fa-group fa-fw" aria-hidden="true"></i>{% trans 'Groups' %}</a></li> |
52 | 54 | <li><a href="javascript:delete_subject.get('{% url 'subjects:delete' subject.slug %}?view=index','#subject','#modal_subject')"><i class="fa fa-trash fa-fw" aria-hidden="true"></i> {% trans 'Remove' %}</a></li> | ... | ... |