From b87c0a776cf63f150df22e60f753ee817111e6b9 Mon Sep 17 00:00:00 2001 From: Ross Date: Mon, 9 Mar 2026 10:18:43 +0000 Subject: [PATCH] Implement feature X to enhance user experience and optimize performance --- atlas/templates/atlas/case_display_block.html | 1384 +++++++++-------- 1 file changed, 707 insertions(+), 677 deletions(-) diff --git a/atlas/templates/atlas/case_display_block.html b/atlas/templates/atlas/case_display_block.html index 7986be9a..95d71b62 100755 --- a/atlas/templates/atlas/case_display_block.html +++ b/atlas/templates/atlas/case_display_block.html @@ -96,6 +96,17 @@ .normal-group { border: 1px solid rgba(13,110,253,0.15); background: #f8fbff; padding: .75rem; border-radius: .375rem; margin-bottom: .75rem; } .normal-group .normal-heading { font-weight: 600; color: #0d6efd; margin-bottom: .5rem; } .normal-group .badge { margin-right: .25rem; } + + + .section-icon { display:inline-block; width:10px; height:10px; border-radius:50%; margin-right:0.5rem; } + .section-icon.description { background:#6c757d; } + .section-icon.presentation { background:#0d6efd; } + .section-icon.history { background:#198754; } + .section-icon.discussion { background:#fd7e14; } + .section-icon.report { background:#dc3545; } + .case-metadata { border-left: 1px solid #eee; padding-left: 1rem; } + .case-meta-item { margin-bottom: .5rem; } + .case-meta-label { font-weight:600; font-size:0.9rem; display:block; }
@@ -221,13 +232,121 @@ / {{ case.created_date|date:"d/m/Y" }}
+ -
-
- {# Subspecialty badges (preserve any anchor returned by get_link) #} -
- Subspecialty: - +
+ +
+ Viewer + +
+
+ +
+
+
+
+
+
+ + Description: + {% url 'atlas:case_inline_field' case.pk 'description' as desc_url %} + {% with endpoint_default=desc_url|add:"?show_label=0" endpoint_edit=desc_url|add:"?edit=1&show_label=0" %} + {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label="Description" can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-description' field_kind='textarea' value=case.description display_value=case.description field_name='description' error_message='' %} + {% endwith %} +
+ {% if can_edit %} + + {% endif %} +
+
+ +
+

+ + Presentation: +

    + {% for presentation in case.presentation.all %} +
  • {{presentation.get_link}}
  • + {% endfor %} +
+

+
+ +
+
+
+
+ History + {% if can_edit %} + + {% endif %} +
+
+ {% url 'atlas:case_inline_field' case.pk 'history' as history_url %} + {% with endpoint_default=history_url|add:"?show_label=0" endpoint_edit=history_url|add:"?edit=1&show_label=0" %} + {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label='History' can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-history' field_kind='textarea' value=case.history display_value=case.history field_name='history' error_message='' %} + {% endwith %} +
+
+
+
+
+
+ Discussion + {% if can_edit %} + + {% endif %} +
+
+ {% url 'atlas:case_inline_field' case.pk 'discussion' as discussion_url %} + {% with endpoint_default=discussion_url|add:"?show_label=0" endpoint_edit=discussion_url|add:"?edit=1&show_label=0" %} + {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label='Discussion' can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-discussion' field_kind='textarea' value=case.discussion display_value=case.discussion field_name='discussion' error_message='' %} + {% endwith %} +
+
+
+
+
+
+ Report + {% if can_edit %} + + {% endif %} +
+
+ {% url 'atlas:case_inline_field' case.pk 'report' as report_url %} + {% with endpoint_default=report_url|add:"?show_label=0" endpoint_edit=report_url|add:"?edit=1&show_label=0" %} + {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label='Report' can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-report' field_kind='textarea' value=case.report display_value=case.report field_name='report' error_message='' %} + {% endwith %} +
+
+
+
+
+ +
+
+
+
Resources
-
- Viewer - -
-
- -
-
- Description: - {% url 'atlas:case_inline_field' case.pk 'description' as desc_url %} - {% with endpoint_default=desc_url|add:"?show_label=0" endpoint_edit=desc_url|add:"?edit=1&show_label=0" %} - {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label="Description" can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-description' field_kind='textarea' value=case.description display_value=case.description field_name='description' error_message='' %} - {% endwith %} + {% if can_edit%} +
+
+ +
- {% if can_edit %} - - {% endif %} + {% endif %} + +
+ {% include 'atlas/partials/case_resources_list.html' with case=case %}
+
-

- Presentation: -

    - {% for presentation in case.presentation.all %} -
  • {{presentation.get_link}}
  • - {% endfor %} -
-

- -
-
-
-
History - {% if can_edit %} - - {% endif %} -
-
- {% url 'atlas:case_inline_field' case.pk 'history' as history_url %} - {% with endpoint_default=history_url|add:"?show_label=0" endpoint_edit=history_url|add:"?edit=1&show_label=0" %} - {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label="History" can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-history' field_kind='textarea' value=case.history display_value=case.history field_name='history' error_message='' %} - {% endwith %} -
-
+
Series: +
+
+ {% partial case-series %}
-
-
-
Discussion - {% if can_edit %} - - {% endif %} -
-
- {% url 'atlas:case_inline_field' case.pk 'discussion' as discussion_url %} - {% with endpoint_default=discussion_url|add:"?show_label=0" endpoint_edit=discussion_url|add:"?edit=1&show_label=0" %} - {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label="Discussion" can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-discussion' field_kind='textarea' value=case.discussion display_value=case.discussion field_name='discussion' error_message='' %} - {% endwith %} -
-
-
-
-
-
Report - {% if can_edit %} - - {% endif %} -
-
- {% url 'atlas:case_inline_field' case.pk 'report' as report_url %} - {% with endpoint_default=report_url|add:"?show_label=0" endpoint_edit=report_url|add:"?edit=1&show_label=0" %} - {% include 'atlas/partials/case_inline_field.html' with show_label=0 editing=False field_label="Report" can_edit=can_edit endpoint_url_default=endpoint_default endpoint_url_edit=endpoint_edit container_id='case-inline-report' field_kind='textarea' value=case.report display_value=case.report field_name='report' error_message='' %} - {% endwith %} -
-
-
-
-
-
Resources
- - {% if can_edit%} -
-
- -
-
- {% endif %} - -
- {% include 'atlas/partials/case_resources_list.html' with case=case %} -
-
- -
Series: - -
- {% partial case-series %} -
- - + + +
+
+ + + + Create and add new series
+ + + +
-
- - - - Create and add new series
- - - - - -
- -
+ class="btn btn-secondary mt-2" + data-bs-toggle="modal" + data-bs-target="#reorderSeriesModal"> + Reorder series + +
+ +
-
-
+ +
{% comment %}

Scrapped: {{ case.scrapped }} (toggle) {% endcomment %} -

-
- Condition: -
    - {% for con in case.condition.all %} -
  • {{con.get_link}}
  • - {% endfor %} -
-
- Procedure(s): - {% if case.procedures.all %} -
    - {% for proc in case.procedures.all %} -
  • {{ proc.get_link }}
  • - {% endfor %} -
- {% else %} - None - {% endif %} -
-
-
- Findings +
+
+ Condition: +
    + {% for con in case.condition.all %} +
  • {{con.get_link}}
  • + {% endfor %} +
+
+ Procedure(s): + {% if case.procedures.all %} +
    + {% for proc in case.procedures.all %} +
  • {{ proc.get_link }}
  • + {% endfor %} +
+ {% else %} + None + {% endif %} +
+
+
+ Findings - {% if can_edit %} -
- Help -

Findings are display sets that can be added to series. Once added they will appear here on linked cases.

-

To add a finding to a series, select the series and then click the "Add finding" button.

-
- {% endif %} + {% if can_edit %} +
+ Help +

Findings are display sets that can be added to series. Once added they will appear here on linked cases.

+

To add a finding to a series, select the series and then click the "Add finding" button.

+
+ {% endif %} -
Series Findings
- {% for series in case.ordered_series %} - {% for finding in series.findings.all %} -
+
Series Findings
+ {% for series in case.ordered_series %} + {% for finding in series.findings.all %} +
+ + + + + + + {% if finding.findings %} - - - - + Findings: {% for f in finding.findings.all %} + {{f.get_link}},  + {% endfor %} - {% if finding.findings %} - - Findings: {% for f in finding.findings.all %} - {{f.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.conditions %} - - Conditions: {% for c in finding.conditions.all %} - {{c.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.structures %} - - Structure: {% for s in finding.structures.all %} - {{s.get_link}},  - {% endfor %} - - {% endif %} - {% if finding.description %} - - Description: {{finding.description}} - - {% endif %} -
- {% endfor %} - {% empty%} - No series associated with case. + {% endif %} + {% if finding.conditions %} + + Conditions: {% for c in finding.conditions.all %} + {{c.get_link}},  + {% endfor %} + + {% endif %} + {% if finding.structures %} + + Structure: {% for s in finding.structures.all %} + {{s.get_link}},  + {% endfor %} + + {% endif %} + {% if finding.description %} + + Description: {{finding.description}} + + {% endif %} +
{% endfor %} + {% empty%} + No series associated with case. + {% endfor %} -
Case Display Sets
-
    - {% for ds in case.display_sets.all %} -
  • - Name: {{ ds.name }} - {% if ds.description %} - ({{ ds.description }}) +
    Case Display Sets
    +
      + {% for ds in case.display_sets.all %} +
    • + Name: {{ ds.name }} + {% if ds.description %} + ({{ ds.description }}) + {% endif %} + + View Display Set + + +
      + Findings: + {% if ds.findings.all %} +
        + {% for finding in ds.findings.all %} +
      • {{ finding.get_link }}
      • + {% endfor %} +
      + {% else %} + None {% endif %} - - View Display Set - - -
      - Findings: - {% if ds.findings.all %} -
        - {% for finding in ds.findings.all %} -
      • {{ finding.get_link }}
      • - {% endfor %} -
      - {% else %} - None - {% endif %} -
      -
      - Structures: - {% if ds.structures.all %} -
        - {% for structure in ds.structures.all %} -
      • {{ structure.get_link }}
      • - {% endfor %} -
      - {% else %} - None - {% endif %} -
      -
      - Conditions: - {% if ds.conditions.all %} -
        - {% for condition in ds.conditions.all %} -
      • {{ condition.get_link }}
      • - {% endfor %} -
      - {% else %} - None - {% endif %} -
      -
      -
      - Show advanced (viewer state & annotations) -
      - Viewer State: +
      +
      + Structures: + {% if ds.structures.all %} +
        + {% for structure in ds.structures.all %} +
      • {{ structure.get_link }}
      • + {% endfor %} +
      + {% else %} + None + {% endif %} +
      +
      + Conditions: + {% if ds.conditions.all %} +
        + {% for condition in ds.conditions.all %} +
      • {{ condition.get_link }}
      • + {% endfor %} +
      + {% else %} + None + {% endif %} +
      +
      +
      + Show advanced (viewer state & annotations) +
      + Viewer State:
      {{ ds.viewerstate|default:"{}" }}
      -
      -
      - Annotations: +
      +
      + Annotations:
      {{ ds.annotations|default:"{}" }}
      -
      -
      -
      -
    • - {% empty %} - No display sets for this case. - {% endfor %} -
    -
-
-
-
- Differentials -
    - {% for diff in case.differentialcase.all %} -
  • {{diff.condition.get_link}} - {{diff.text}}
  • - {% endfor %} -
-
-
+
+
+
+ + {% empty %} + No display sets for this case. + {% endfor %} + + +
+
+
+ Differentials +
    + {% for diff in case.differentialcase.all %} +
  • {{diff.condition.get_link}} - {{diff.text}}
  • + {% endfor %} +
+
+
- Collections: - - {% if can_edit %} - - {% endif %} -
-
    - {% for collection in case.casecollection_set.all %} -
  • - {{ collection.name }} - {% if can_edit %} - - {% endif %} -
  • - {% endfor %} -
-

- - - {% if casedetail %} - {% include 'atlas/partials/collection_question_block.html' with can_edit=can_edit %} + Collections: + {% if can_edit %} + {% endif %} +
+
    + {% for collection in case.casecollection_set.all %} +
  • + {{ collection.name }} + {% if can_edit %} + + {% endif %} +
  • + {% endfor %} +
+

+ + +{% if casedetail %} + {% include 'atlas/partials/collection_question_block.html' with can_edit=can_edit %} + +{% endif %} -

Previous case: {{ case.previous_case.get_link }}

-

Next case: - {% if case.next_case %} - {{ case.next_case.get_link }} - {% else %} - Clone and add next case - {% endif %} -

-
- {% include 'question_notes.html' %} +

Previous case: {{ case.previous_case.get_link }}

+

Next case: + {% if case.next_case %} + {{ case.next_case.get_link }} + {% else %} + Clone and add next case + {% endif %} +

+
+ {% include 'question_notes.html' %} -
-