Add display of related SBA questions in finding, presentation, and structure detail views
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
<a href="{% url 'atlas:finding_delete' pk=finding.pk %}" title="Delete the Finding">Delete</a>
|
<a href="{% url 'atlas:finding_delete' pk=finding.pk %}" title="Delete the Finding">Delete</a>
|
||||||
{% if request.user.is_superuser %}
|
{% if request.user.is_superuser %}
|
||||||
<a href="{% url 'admin:atlas_finding_change' finding.id %}"
|
<a href="{% url 'admin:atlas_finding_change' finding.id %}"
|
||||||
title="Edit the Finding using the admin interface">Admin Edit</a>
|
title="Edit the Finding using the admin interface">Admin Edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -27,6 +27,15 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if finding.sbas_questions.all %}
|
||||||
|
<h4>Related SBA Questions</h4>
|
||||||
|
<ul>
|
||||||
|
{% for q in finding.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 %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<a href="{% url 'atlas:presentation_delete' pk=presentation.pk %}" title="Delete the Condition">Delete</a> {% endcomment %}
|
<a href="{% url 'atlas:presentation_delete' pk=presentation.pk %}" title="Delete the Condition">Delete</a> {% endcomment %}
|
||||||
{% if request.user.is_superuser %}
|
{% if request.user.is_superuser %}
|
||||||
<a href="{% url 'admin:atlas_presentation_change' presentation.id %}"
|
<a href="{% url 'admin:atlas_presentation_change' presentation.id %}"
|
||||||
title="Edit the Condition using the admin interface">Admin Edit</a>
|
title="Edit the Condition using the admin interface">Admin Edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -27,6 +27,15 @@
|
|||||||
</ul>
|
</ul>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if presentation.sbas_questions.all %}
|
||||||
|
<h4>Related SBA Questions</h4>
|
||||||
|
<ul>
|
||||||
|
{% for q in presentation.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 %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
<a href="{% url 'atlas:structure_delete' pk=structure.pk %}" title="Delete the Structure">Delete</a>
|
<a href="{% url 'atlas:structure_delete' pk=structure.pk %}" title="Delete the Structure">Delete</a>
|
||||||
{% if request.user.is_superuser %}
|
{% if request.user.is_superuser %}
|
||||||
<a href="{% url 'admin:atlas_structure_change' structure.id %}"
|
<a href="{% url 'admin:atlas_structure_change' structure.id %}"
|
||||||
title="Edit the Structure using the admin interface">Admin Edit</a>
|
title="Edit the Structure using the admin interface">Admin Edit</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
@@ -27,6 +27,15 @@
|
|||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
{% if structure.sbas_questions.all %}
|
||||||
|
<h4>Related SBA Questions</h4>
|
||||||
|
<ul>
|
||||||
|
{% for q in structure.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 %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block js %}
|
{% block js %}
|
||||||
|
|||||||
Reference in New Issue
Block a user