diff --git a/AKSubmission/templates/AKSubmission/ak_detail.html b/AKSubmission/templates/AKSubmission/ak_detail.html index 50279250536057a103add23213c212066c354f22..02030ffc9f7e33eaa5034fd803cbd84387ad08b3 100644 --- a/AKSubmission/templates/AKSubmission/ak_detail.html +++ b/AKSubmission/templates/AKSubmission/ak_detail.html @@ -63,6 +63,35 @@ {{ ak.reso | bool_symbol }} </td> </tr> + {% if ak.requirements.count > 0 %} + <tr> + <td>{% trans "Requirements" %}</td> + <td> + {% for requirement in ak.requirements.all %} + {% if forloop.counter0 > 0 %} + , + {% endif %} + {{ requirement }} + {% endfor %} + </td> + </tr> + {% endif %} + {% if ak.conflicts.count > 0 %} + <tr> + <td>{% trans "Conflicting AKs" %}</td> + <td> + {% include "AKSubmission/ak_linked_list_inline.html" with aks=ak.conflicts slug=ak.event.slug %} + </td> + </tr> + {% endif %} + {% if ak.prerequisites.count > 0 %} + <tr> + <td>{% trans "Prerequisite AKs" %}</td> + <td> + {% include "AKSubmission/ak_linked_list_inline.html" with aks=ak.prerequisites slug=ak.event.slug %} + </td> + </tr> + {% endif %} </table> <p style="margin-top: 30px;margin-bottom: 30px;">{{ ak.description }}</p> diff --git a/AKSubmission/templates/AKSubmission/ak_linked_list_inline.html b/AKSubmission/templates/AKSubmission/ak_linked_list_inline.html new file mode 100644 index 0000000000000000000000000000000000000000..f5b504f7c07b8d008c32bd3cdab9911d1415b22b --- /dev/null +++ b/AKSubmission/templates/AKSubmission/ak_linked_list_inline.html @@ -0,0 +1,8 @@ +{% for ak in aks.all %} + {% if forloop.counter0 > 0 %} + , + {% endif %} + <a href="{% url 'submit:ak_detail' event_slug=slug pk=ak.pk %}">{{ ak }}</a> +{% empty %} + - +{% endfor %}