Commit 2a7cad304945c786c233f286709a22b0b19ca22f
1 parent
a90d38e6
Exists in
master
and in
3 other branches
supports decision on resource search page
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
subjects/templates/subjects/list_search.html
@@ -62,7 +62,10 @@ | @@ -62,7 +62,10 @@ | ||
62 | {% elif resources|length > 0 and all %} | 62 | {% elif resources|length > 0 and all %} |
63 | <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true"> | 63 | <div class="panel-group" id="subject-accordion" role="tablist" aria-multiselectable="true"> |
64 | {% for resource in resources %} | 64 | {% for resource in resources %} |
65 | - {% include "subjects/resource_card.html" with resource=resource %} | 65 | + {% if request.user in resource.students.all or request.user in resource.topic.subject.category.coordinators.all or request.user.is_staff %} |
66 | + {% include "subjects/resource_card.html" with resource=resource %} | ||
67 | + {% endif %} | ||
68 | + | ||
66 | {% endfor %} | 69 | {% endfor %} |
67 | 70 | ||
68 | {% pagination request paginator page_obj %} | 71 | {% pagination request paginator page_obj %} |