This commit is contained in:
Ross
2025-05-04 16:50:56 +01:00
parent a43a6e0fed
commit 5f94616168
5 changed files with 83 additions and 6 deletions
@@ -2,7 +2,7 @@
<h2>Case: {{ case.title }}</h2>
{% if case.previous_case or case.next_case %}
<div class="alert alert-info" role="alert">
This case is part of a series.<br/>
This case is part of a <a href='{% url "atlas:linked_cases_overview" case.pk %}'>series.</a><br/>
<div class="row">
{% if case.previous_case %}
<div class="col-sm-6 mb-3 mb-sm-0">
+5 -4
View File
@@ -22,16 +22,17 @@
(<a href='{% url "atlas:collection_case_details" casedetail.collection.pk casedetail.case.pk %}'>edit questions</a>
&nbsp;
{% if casedetail.question_schema %}
<i class="bi bi-question-square text-success"></i>
<i class="bi bi-question-square text-success" title="This case has questions defined."></i>
{% else %}
<i class="bi bi-question-square text-danger"></i>
<i class="bi bi-question-square text-danger" title="This case has no questions defined."></i>
{% endif %}
)
{% endif %}
{% if casedetail.case.previous_case %}
(<a href='{% url "atlas:collection_case_priors" casedetail.collection.pk casedetail.case.pk %}'>manage priors</a>)
{% endif %}
</li>
{% endfor %}
@@ -0,0 +1,33 @@
<!-- filepath: /home/ross/rad/rad/atlas/templates/atlas/linked_cases_overview.html -->
{% extends "base.html" %}
{% block content %}
<h1>Linked Cases Overview</h1>
<h2>Current Case: {{ case.title }}</h2>
<h3>Previous Cases</h3>
{% if previous_cases %}
<ul>
{% for prev_case in previous_cases %}
<li>
<a href="{{ prev_case.get_absolute_url }}">{{ prev_case.title }}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No previous cases.</p>
{% endif %}
<h3>Next Cases</h3>
{% if next_cases %}
<ul>
{% for next_case in next_cases %}
<li>
<a href="{{ next_case.get_absolute_url }}">{{ next_case.title }}</a>
</li>
{% endfor %}
</ul>
{% else %}
<p>No next cases.</p>
{% endif %}
{% endblock %}