This commit is contained in:
Ross
2021-05-16 13:30:27 +01:00
parent 41877cb7e6
commit d5b3d00b3c
7 changed files with 62 additions and 20 deletions
@@ -37,6 +37,8 @@
</p>
</div>
<div>
{% if view_feedback %}
Notes:
<ul>
{% for note in question.rapid_notes.all %}
@@ -46,13 +48,17 @@
{% endfor %}
</ul>
Anon Notes:
<ul>
<ul class="notes">
{% for note in question.anon_notes.all %}
<li>
{{ note.created_on }} by {{ note.author }}: {{ note.note }}
<li {% if note.complete %}class='complete' {% endif %}>
{{ note.created_on }} by {{ note.author }}: {{note.note_type}} / {{ note.note }}
{% if not note.complete %}
(<a href="{% url 'feedback_mark_complete' pk=note.pk %}">Mark complete</a>)
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
<div id="single-dicom-viewer" class="dicom-viewer" data-images="{{ question.GetImageUrls }}" data-annotations=''></div>
</div>
+5 -1
View File
@@ -101,9 +101,13 @@ def question_detail(request, pk):
# if request.user not in rapid.author.all():
# raise PermissionDenied
view_feedback = False
if request.user.groups.filter(name="rapid_checker").exists() or request.user.groups.filter(name="feedback_checker").exists() or request.user in rapid.author.all():
view_feedback = True
# logging.debug(rapid.rapid_notes.first())
# logging.debug(rapid.subspecialty.first().name.all())
return render(request, "rapids/question_detail.html", {"question": rapid})
return render(request, "rapids/question_detail.html", {"question": rapid, "view_feedback" : view_feedback})
@login_required