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 %}>
|
||||
{% if not question_completed %}
|
||||
{% if resources %}
|
||||
<h5 class="mt-3">Resources</h5>
|
||||
<ul class="list-group list-group-flush mb-3">
|
||||
{% for caseresource in resources %}
|
||||
<li class="list-group-item py-1 small">{{caseresource.resource.get_display}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% if not question_completed %}
|
||||
{% if resources %}
|
||||
<h5 class="mt-3">Resources</h5>
|
||||
<ul class="list-group list-group-flush mb-3">
|
||||
{% for caseresource in resources %}
|
||||
<li class="list-group-item py-1 small">{{caseresource.resource.get_display}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% if show_description and case.description %}
|
||||
<div class="mb-3">
|
||||
<h6 class="mb-1">Description</h6>
|
||||
<p class="mb-0">{{case.description}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if show_history %}
|
||||
<div class="card mb-3">
|
||||
<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>
|
||||
{% if has_priors %}
|
||||
<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>
|
||||
</div>
|
||||
{% if show_description and case.description %}
|
||||
<div class="mb-3">
|
||||
<h6 class="mb-1">Description</h6>
|
||||
<p class="mb-0">{{case.description}}</p>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if show_history %}
|
||||
<div class="card mb-3">
|
||||
<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>
|
||||
{% if has_priors %}
|
||||
<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>
|
||||
</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 %}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if collection.show_ohif_viewer %}
|
||||
<div>
|
||||
{% if collection.show_built_in_viewer %}
|
||||
|
||||
{% 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 %}
|
||||
</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>
|
||||
<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">
|
||||
<details open>
|
||||
@@ -166,29 +166,29 @@
|
||||
</div>
|
||||
|
||||
</div> {% endcomment %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% endif %}
|
||||
|
||||
{% if show_discussion and case.discussion %}
|
||||
<details class="card mb-3">
|
||||
<summary class="card-header p-2" style="cursor: pointer;">
|
||||
<strong>Discussion</strong>
|
||||
</summary>
|
||||
<div class="card-body p-2 small">
|
||||
{{case.discussion|linebreaks}}
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% if show_report and case.report %}
|
||||
<details class="card mb-3">
|
||||
<summary class="card-header p-2" style="cursor: pointer;">
|
||||
<strong>Report</strong>
|
||||
</summary>
|
||||
<div class="card-body p-2 small">
|
||||
{{case.report|linebreaks}}
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% if show_discussion and case.discussion %}
|
||||
<details class="card mb-3">
|
||||
<summary class="card-header p-2" style="cursor: pointer;">
|
||||
<strong>Discussion</strong>
|
||||
</summary>
|
||||
<div class="card-body p-2 small">
|
||||
{{case.discussion|linebreaks}}
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
{% if show_report and case.report %}
|
||||
<details class="card mb-3">
|
||||
<summary class="card-header p-2" style="cursor: pointer;">
|
||||
<strong>Report</strong>
|
||||
</summary>
|
||||
<div class="card-body p-2 small">
|
||||
{{case.report|linebreaks}}
|
||||
</div>
|
||||
</details>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if question_completed %}
|
||||
|
||||
Reference in New Issue
Block a user