This commit is contained in:
Ross
2022-03-27 10:55:33 +01:00
parent 6500428cd9
commit 8b34b679ba
5 changed files with 421 additions and 343 deletions
+55 -26
View File
@@ -1,52 +1,81 @@
{% extends 'atlas/base.html' %}
{% block content %}
<h2>Case {{case_number|add:1}}</h2>
<h2>Case {{case_number|add:1}}
<div class="pre-whitespace multi-image-block">
{% for series in series_list %}
<span class="series-block">
<span>
Series {{ forloop.counter }}:
<a href="#" onclick='window.loadDicomViewer(window.images[{{forloop.counter0}}])'>
{{series.get_block}}
</a>
</span>
</span>
{% endfor %}
{% if collection.show_title %}
: {{case.title}}
{% endif %}
</h2>
{% if collection.show_description and case.description%}
<div>
Description: {{case.description}}
</div>
{% endif %}
<div class="pre-whitespace multi-image-block">
{% for series in series_list %}
<span class="series-block">
<span>
Series {{ forloop.counter }}:
<a href="#" onclick='window.loadDicomViewer(window.images[{{forloop.counter0}}])'>
{{series.get_block}}
</a>
</span>
</span>
{% endfor %}
</div>
<div>
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
</div>
<div>
<div id="single-dicom-viewer" class="dicom-viewer" data-images="" data-annotations=''>
</div>
</div>
{% if collection.show_discussion and case.discussion%}
<details>
<summary>
Discussion:
</summary>
<div>
{{case.discussion}}
</div>
</details>
{% endif %}
<div>
{% if previous %}
{% if previous %}
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:-1 %}">Previous</a>
{% endif %}
{% if next %}
{% endif %}
{% if next %}
<a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=case_number|add:1 %}">Next</a>
{% endif %}
{% endif %}
</div>
<br/>
<br />
Return to <a href='{{collection.get_absolute_url}}'>collection</a>
{% endblock %}
{% block js %}
<script type="text/javascript">
window.images = {
{% for series in series_list %}
{{forloop.counter0}} : ["{{ series.get_image_url_array_not_json }}"],
{% endfor %}
{
%
for series in series_list %
} {
{
forloop.counter0
}
}: ["{{ series.get_image_url_array_not_json }}"],
{
% endfor %
}
}
$(document).ready(function () {
setTimeout(() => {
window.loadDicomViewer(window.images[0])
window.loadDicomViewer(window.images[0])
}, 500);
})
</script>
{% endblock js %}
@@ -4,7 +4,11 @@
<h2>{{collection.name}}
<ul>
{% for case in collection.cases.all %}
<li><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a></li>
<li><a href="{% url 'atlas:collection_case_view' pk=collection.pk case_number=forloop.counter0 %}">Case {{forloop.counter}}</a>
{% if collection.show_title %}
: {{case.title}}
{% endif %}
</li>
{% endfor %}