Add display of related SBA questions in condition detail view
This commit is contained in:
@@ -62,25 +62,34 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if condition.sbas_questions.all %}
|
||||||
|
<h4>Related SBA Questions</h4>
|
||||||
|
<ul>
|
||||||
|
{% for q in condition.sbas_questions.all %}
|
||||||
|
<li><a href="{{ q.get_absolute_url }}">{% if q.title %}{{ q.title }}{% else %}{{ q.get_stem_stripped|truncatechars:140 }}{% endif %}</a></li>
|
||||||
|
{% endfor %}
|
||||||
|
</ul>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
{% if not condition.rcr_curriculum and can_merge %}
|
{% if not condition.rcr_curriculum and can_merge %}
|
||||||
|
|
||||||
<details><summary>Merge</summary>
|
<details><summary>Merge</summary>
|
||||||
Merge this condition into another. This will transfer all associated cases (and differential) but will not transfer synonymns / parents or children.
|
Merge this condition into another. This will transfer all associated cases (and differential) but will not transfer synonymns / parents or children.
|
||||||
<form method="POST">
|
<form method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<table>
|
<table>
|
||||||
{{ form.as_table }}
|
{{ form.as_table }}
|
||||||
</table>
|
</table>
|
||||||
<button hx-post='{% url "atlas:condition_merge" condition.pk %}'
|
<button hx-post='{% url "atlas:condition_merge" condition.pk %}'
|
||||||
hx-target="#merge-options" hx-swap="innerHTML"
|
hx-target="#merge-options" hx-swap="innerHTML"
|
||||||
hx-confirm="This will merge {{condition.name}} into the selecetd condition, this cannot be undone. Continue?"
|
hx-confirm="This will merge {{condition.name}} into the selecetd condition, this cannot be undone. Continue?"
|
||||||
>
|
>
|
||||||
Merge
|
Merge
|
||||||
</button>
|
</button>
|
||||||
</form>
|
</form>
|
||||||
<div id="merge-options"></div>
|
<div id="merge-options"></div>
|
||||||
</details>
|
</details>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
Reference in New Issue
Block a user