mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 11:27:09 +00:00
refactor: allow admin config of static questions
Text and visibility set in admin panel are now respected everywhere
This commit is contained in:
@@ -64,32 +64,7 @@
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Question</th>
|
||||
<th>Answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for answer in answer_set.question_answers.all %}
|
||||
<tr>
|
||||
<td>{{ answer.question }}</td>
|
||||
<td>{{ answer }}</td>
|
||||
</tr>
|
||||
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td>No records</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
Last updated: {{ answer_set.timestamp }}
|
||||
</p>
|
||||
{% include 'people/includes/answer_set.html' %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
@@ -54,49 +54,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="50%">Question</th>
|
||||
<th>Answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% if answer_set.website %}
|
||||
<tr><td>Website</td><td>
|
||||
<a href="{{ answer_set.website }}">{{ answer_set.website }}</a>
|
||||
</td></tr>
|
||||
{% endif %}
|
||||
|
||||
{% if answer_set.countries %}
|
||||
<tr><td>Countries</td><td>
|
||||
{% for country in answer_set.countries %}
|
||||
{{ country.name }}{% if not forloop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
</td></tr>
|
||||
{% endif %}
|
||||
|
||||
{% if answer_set.hq_country %}
|
||||
<tr><td>HQ Country</td><td>{{ answer_set.hq_country.name }}</td></tr>
|
||||
{% endif %}
|
||||
|
||||
{% for question, answers in question_answers.items %}
|
||||
<tr>
|
||||
<td>{{ question }}</td>
|
||||
<td>{{ answers }}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
{% if answer_set is None %}
|
||||
<tr>
|
||||
<td colspan="2">No answers</td>
|
||||
</tr>
|
||||
{% endif %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>Last updated: {{ answer_set.timestamp }}</p>
|
||||
{% include 'people/includes/answer_set.html' %}
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
{% endif %}
|
||||
|
||||
|
||||
{% include 'people/person/includes/answer_set.html' %}
|
||||
{% include 'people/includes/answer_set.html' %}
|
||||
|
||||
<a class="btn btn-success"
|
||||
href="{% url 'people:person.update' pk=person.pk %}">Update</a>
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
|
||||
<hr>
|
||||
|
||||
{% include 'people/person/includes/answer_set.html' %}
|
||||
{% include 'people/includes/answer_set.html' %}
|
||||
|
||||
<hr>
|
||||
|
||||
|
||||
@@ -70,32 +70,7 @@
|
||||
</div>
|
||||
|
||||
{% else %}
|
||||
<table class="table table-borderless">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Question</th>
|
||||
<th>Answer</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{% for answer in answer_set.question_answers.all %}
|
||||
<tr>
|
||||
<td>{{ answer.question }}</td>
|
||||
<td>{{ answer }}</td>
|
||||
</tr>
|
||||
|
||||
{% empty %}
|
||||
<tr>
|
||||
<td>No records</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<p>
|
||||
Last updated: {{ answer_set.timestamp }}
|
||||
</p>
|
||||
{% include 'people/includes/answer_set.html' %}
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user