feat: Refactor resource, description, history, and viewer sections for improved readability
This commit is contained in:
@@ -70,70 +70,70 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="case-view-content" {% if case_view_locked %}style="display:none;"{% endif %}>
|
<div id="case-view-content" {% if case_view_locked %}style="display:none;"{% endif %}>
|
||||||
{% if not question_completed %}
|
{% if not question_completed %}
|
||||||
{% if resources %}
|
{% if resources %}
|
||||||
<h5 class="mt-3">Resources</h5>
|
<h5 class="mt-3">Resources</h5>
|
||||||
<ul class="list-group list-group-flush mb-3">
|
<ul class="list-group list-group-flush mb-3">
|
||||||
{% for caseresource in resources %}
|
{% for caseresource in resources %}
|
||||||
<li class="list-group-item py-1 small">{{caseresource.resource.get_display}}</li>
|
<li class="list-group-item py-1 small">{{caseresource.resource.get_display}}</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
|
|
||||||
{% if show_description and case.description %}
|
{% if show_description and case.description %}
|
||||||
<div class="mb-3">
|
<div class="mb-3">
|
||||||
<h6 class="mb-1">Description</h6>
|
<h6 class="mb-1">Description</h6>
|
||||||
<p class="mb-0">{{case.description}}</p>
|
<p class="mb-0">{{case.description}}</p>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if show_history %}
|
{% if show_history %}
|
||||||
<div class="card mb-3">
|
<div class="card mb-3">
|
||||||
<div class="card-body p-2 d-flex justify-content-between align-items-start">
|
<div class="card-body p-2 d-flex justify-content-between align-items-start">
|
||||||
<div class="me-3 small text-muted">History: {{casedetail.get_history_pre|linebreaks}}</div>
|
<div class="me-3 small text-muted">History: {{casedetail.get_history_pre|linebreaks}}</div>
|
||||||
{% if has_priors %}
|
{% if has_priors %}
|
||||||
<div class="ms-2">
|
<div class="ms-2">
|
||||||
<span title="This case has priors available for comparison" class="badge bg-secondary text-white rounded-pill small">Priors{% if prior_count %} ({{ prior_count }}){% endif %}</span>
|
<span title="This case has priors available for comparison" class="badge bg-secondary text-white rounded-pill small">Priors{% if prior_count %} ({{ prior_count }}){% endif %}</span>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if collection.show_ohif_viewer %}
|
||||||
|
<div>
|
||||||
|
|
||||||
|
{% if question_completed %}
|
||||||
|
<iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px; min-height: 700px" src="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json_review' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_review_legacy' collection.pk case.pk %}{% endif %}"></iframe>
|
||||||
|
{% else %}
|
||||||
|
<iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px; min-height: 700px" src="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_legacy' collection.pk case.pk %}{% endif %}"></iframe>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
{% if collection.show_ohif_viewer_link %}
|
||||||
|
<div>
|
||||||
|
{% if question_completed %}
|
||||||
|
<a target="_blank" href="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json_review' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_review_legacy' collection.pk case.pk %}{% endif %}" title="Click to open the case in the advanced viewer. This will open in a new tab/window."><button class="viewer"><i class="bi bi-collection"></i> Launch advanced viewer.</button></a>
|
||||||
|
{% else %}
|
||||||
|
<a target="_blank" href="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_legacy' collection.pk case.pk %}{% endif %}" title="Click to open the case in the advanced viewer. This will open in a new tab/window."><button class="viewer"><i class="bi bi-collection"></i> Launch advanced viewer.</button></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
{% endif %}
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if collection.show_ohif_viewer %}
|
{% if collection.show_built_in_viewer %}
|
||||||
<div>
|
|
||||||
|
|
||||||
{% if question_completed %}
|
<details id="dicom-viewer-details" open>
|
||||||
<iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px; min-height: 700px" src="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json_review' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_review_legacy' collection.pk case.pk %}{% endif %}"></iframe>
|
<summary>Viewer</summary>
|
||||||
{% else %}
|
<div id="main_viewer" class="dicom-viewer-root"
|
||||||
<iframe id="viewer" style="width: 100%; height: 100%; border: none; padding: 0px; min-height: 700px" src="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_legacy' collection.pk case.pk %}{% endif %}"></iframe>
|
style="box-sizing: border-box; background: #222; width: 100%; height: 600px;"
|
||||||
{% endif %}
|
data-auto-cache-stack="false"
|
||||||
|
data-named-stacks='{{casedetail.get_case_named_stacks}}'
|
||||||
</div>
|
></div>
|
||||||
{% endif %}
|
</details>
|
||||||
|
|
||||||
|
|
||||||
{% if collection.show_ohif_viewer_link %}
|
|
||||||
<div>
|
|
||||||
{% if question_completed %}
|
|
||||||
<a target="_blank" href="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json_review' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_review_legacy' collection.pk case.pk %}{% endif %}" title="Click to open the case in the advanced viewer. This will open in a new tab/window."><button class="viewer"><i class="bi bi-collection"></i> Launch advanced viewer.</button></a>
|
|
||||||
{% else %}
|
|
||||||
<a target="_blank" href="/ohif/viewer/dicomjson?url=https://www.penracourses.org.uk{% if case_number %}{% url 'atlas:collection_case_dicom_json' collection.pk case_number %}{% else %}{% url 'atlas:collection_case_dicom_json_legacy' collection.pk case.pk %}{% endif %}" title="Click to open the case in the advanced viewer. This will open in a new tab/window."><button class="viewer"><i class="bi bi-collection"></i> Launch advanced viewer.</button></a>
|
|
||||||
{% endif %}
|
|
||||||
</div>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if collection.show_built_in_viewer %}
|
|
||||||
|
|
||||||
<details id="dicom-viewer-details" open>
|
|
||||||
<summary>Viewer</summary>
|
|
||||||
<div id="main_viewer" class="dicom-viewer-root"
|
|
||||||
style="box-sizing: border-box; background: #222; width: 100%; height: 600px;"
|
|
||||||
data-auto-cache-stack="false"
|
|
||||||
data-named-stacks='{{casedetail.get_case_named_stacks}}'
|
|
||||||
></div>
|
|
||||||
</details>
|
|
||||||
|
|
||||||
{% comment %} <div class="pre-whitespace multi-image-block">
|
{% comment %} <div class="pre-whitespace multi-image-block">
|
||||||
<details open>
|
<details open>
|
||||||
@@ -166,29 +166,29 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div> {% endcomment %}
|
</div> {% endcomment %}
|
||||||
{% else %}
|
{% else %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if show_discussion and case.discussion %}
|
{% if show_discussion and case.discussion %}
|
||||||
<details class="card mb-3">
|
<details class="card mb-3">
|
||||||
<summary class="card-header p-2" style="cursor: pointer;">
|
<summary class="card-header p-2" style="cursor: pointer;">
|
||||||
<strong>Discussion</strong>
|
<strong>Discussion</strong>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="card-body p-2 small">
|
<div class="card-body p-2 small">
|
||||||
{{case.discussion|linebreaks}}
|
{{case.discussion|linebreaks}}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if show_report and case.report %}
|
{% if show_report and case.report %}
|
||||||
<details class="card mb-3">
|
<details class="card mb-3">
|
||||||
<summary class="card-header p-2" style="cursor: pointer;">
|
<summary class="card-header p-2" style="cursor: pointer;">
|
||||||
<strong>Report</strong>
|
<strong>Report</strong>
|
||||||
</summary>
|
</summary>
|
||||||
<div class="card-body p-2 small">
|
<div class="card-body p-2 small">
|
||||||
{{case.report|linebreaks}}
|
{{case.report|linebreaks}}
|
||||||
</div>
|
</div>
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% if question_completed %}
|
{% if question_completed %}
|
||||||
|
|||||||
Reference in New Issue
Block a user