|
| 1 | +{% extends 'layouts/base.html' %} |
| 2 | + |
| 3 | +{% block app_breadcrumbs %} |
| 4 | +{{ govukBreadcrumbs({ |
| 5 | + 'items': [ |
| 6 | + { |
| 7 | + 'text': "Home", |
| 8 | + 'href': url_for('main.index') |
| 9 | + }, |
| 10 | + { |
| 11 | + 'text': "Planning consideration", |
| 12 | + 'href': url_for('planning_consideration.considerations') |
| 13 | + }, |
| 14 | + { |
| 15 | + 'text': consideration.name, |
| 16 | + 'href': url_for('planning_consideration.consideration', slug=consideration.slug) |
| 17 | + }, |
| 18 | + { |
| 19 | + 'text': "Change log" |
| 20 | + } |
| 21 | + ] |
| 22 | +}) }} |
| 23 | + |
| 24 | +{% endblock %} |
| 25 | + |
| 26 | +{% block content_header %} |
| 27 | + <span class="govuk-caption-xl">{{ consideration.name }}</span> |
| 28 | + <h1 class="govuk-heading-xl">Changes to consideration</h1> |
| 29 | +{% endblock %} |
| 30 | + |
| 31 | + |
| 32 | +{% block content_primary %} |
| 33 | + <table class="govuk-table"> |
| 34 | + <caption class="govuk-table__caption govuk-table__caption--m">Change log</caption> |
| 35 | + <thead class="govuk-table__head"> |
| 36 | + <tr class="govuk-table__row"> |
| 37 | + <th scope="col" class="govuk-table__header">Field</th> |
| 38 | + <th scope="col" class="govuk-table__header">From</th> |
| 39 | + <th scope="col" class="govuk-table__header">To</th> |
| 40 | + <th scope="col" class="govuk-table__header">Change date</th> |
| 41 | + <th scope="col" class="govuk-table__header">Changed by</th> |
| 42 | + </tr> |
| 43 | + </thead> |
| 44 | + <tbody class="govuk-table__body"> |
| 45 | + {% for change in consideration.changes %} |
| 46 | + {% for field in change.changes %} |
| 47 | + {% if change.changes[field]["deleted"] or change.changes[field]["added"] %} |
| 48 | + <tr class="govuk-table__row"> |
| 49 | + <th scope="row" class="govuk-table__header">{{ field }}</th> |
| 50 | + <td class="govuk-table__cell">{{ change.changes[field]["deleted"] }}</td> |
| 51 | + <td class="govuk-table__cell">{{ change.changes[field]["added"] }}</td> |
| 52 | + <td class="govuk-table__cell">{{ change["date"] }}</td> |
| 53 | + <td class="govuk-table__cell">{{ change["user"] }}</td> |
| 54 | + |
| 55 | + </tr> |
| 56 | + {% endif %} |
| 57 | + {% endfor %} |
| 58 | + {% endfor %} |
| 59 | + </tbody> |
| 60 | + </table> |
| 61 | +{% endblock content_primary %} |
0 commit comments