Add show_differentials_post field and update templates for case differentials display
This commit is contained in:
@@ -230,6 +230,7 @@ class CaseCollectionForm(ModelForm):
|
||||
"show_case_link_post",
|
||||
"show_findings_post",
|
||||
"show_displaysets_post",
|
||||
"show_differentials_post",
|
||||
]
|
||||
if f in self.fields
|
||||
]
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# Generated by Django 6.0.1 on 2026-04-13 13:23
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('atlas', '0095_casecollection_show_case_link_post_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='casecollection',
|
||||
name='show_differentials_post',
|
||||
field=models.BooleanField(default=False, help_text='Show differentials for the case (post exam)'),
|
||||
),
|
||||
]
|
||||
@@ -1303,6 +1303,9 @@ class CaseCollection(ExamOrCollectionGenericBase):
|
||||
show_displaysets_post = models.BooleanField(
|
||||
default=False, help_text="Show display sets for the case (post exam)"
|
||||
)
|
||||
show_differentials_post = models.BooleanField(
|
||||
default=False, help_text="Show differentials for the case (post exam)"
|
||||
)
|
||||
|
||||
|
||||
author = models.ManyToManyField(
|
||||
|
||||
@@ -679,20 +679,11 @@
|
||||
</div>
|
||||
<div>
|
||||
|
||||
{% include 'atlas/partials/_case_findings.html' %}
|
||||
{% include 'atlas/partials/_series_findings.html' %}
|
||||
|
||||
{% include 'atlas/partials/_case_displaysets.html' %}
|
||||
</div>
|
||||
<div>
|
||||
<details open>
|
||||
<summary><b>Differentials</b></summary>
|
||||
<ul>
|
||||
{% for diff in case.differentialcase.all %}
|
||||
<li>{{diff.condition.get_link}} - {{diff.text}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</div>
|
||||
{% include 'atlas/partials/_case_differentials.html' %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -185,11 +185,14 @@
|
||||
{% endif %}
|
||||
|
||||
{% if collection.show_findings_post %}
|
||||
{% include 'atlas/partials/_case_findings.html' %}
|
||||
{% include 'atlas/partials/_series_findings.html' %}
|
||||
{% endif %}
|
||||
{% if collection.show_displaysets_post %}
|
||||
{% include 'atlas/partials/_case_displaysets.html' %}
|
||||
{% endif %}
|
||||
{% if collection.show_differentials_post %}
|
||||
{% include 'atlas/partials/_case_differentials.html' %}
|
||||
{% endif %}
|
||||
|
||||
{% if resources %}
|
||||
<h5>Resources</h4>
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
{# Partial: Case Differentials #}
|
||||
<div>
|
||||
<details open>
|
||||
<summary><b>Differentials</b></summary>
|
||||
<ul>
|
||||
{% for diff in case.differentialcase.all %}
|
||||
<li>{{diff.condition.get_link}} - {{diff.text}}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</details>
|
||||
</div>
|
||||
Reference in New Issue
Block a user