{% extends "deliver_grant_funding/grant_base.html" %} {% from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList %} {% from "govuk_frontend_jinja/components/notification-banner/macro.html" import govukNotificationBanner %} {% from "govuk_frontend_jinja/components/summary-list/macro.html" import govukSummaryList %} {% from "govuk_frontend_jinja/components/details/macro.html" import govukDetails %} {% from "deliver_grant_funding/macros/deliver_grant_funding_collection_breadcrumb.html" import deliver_grant_funding_collection_breadcrumb %} {% from "common/macros/status.html" import reportStatusTag with context %} {% from "deliver_grant_funding/macros/dependency_banner.html" import section_dependency_banner %} {% set type_constants = collection.type.constants %} {% set page_title = collection.name %} {% set active_item_identifier = type_constants.active_nav %} {% set can_edit = authorisation_helper.can_edit_collection(current_user, collection.id) %} {% set can_preview = collection.data_sources | length == 0 and collection.status != enum.collection_status.CLOSED %} {# this does kick off one more request to the database - we could revisit making this check more concise #} {% set user_can_test_grant_recipient_journey = grant.test_grant_recipients and grant in current_user.access_grants %} {% block beforeContent %} {{ deliver_grant_funding_collection_breadcrumb(grant=grant, collection_type=collection.type, this_page_breadcrumb_item={"text":collection.name}) }} {% endblock beforeContent %} {% block content %}
Are you sure you want to delete the section "{{ delete_task.title }}"?
{% endset %} {{ govukNotificationBanner(params={"role": "alert", "titleText": "Important", "classes": "", "html": banner_html}) }} {% endif %}Submission period: {{ format_date_range(collection.submission_period_start_date, collection.submission_period_end_date) if collection.submission_period_start_date and collection.submission_period_end_date else "Not set" }}
{{ type_constants.singular | uppercase_first }} status: {{ reportStatusTag(collection.status) }}
This {{ type_constants.singular }} has no sections.
{% if can_edit %} {% endif %} {% else %} {% set rows = [] %} {% for form in collection.forms %} {% set taskHtml %} {{ form.title }} {% endset %} {% set questionsHtml %} {{ form.cached_questions | length }} questions in {{ form.title }} {% endset %} {% set actions = [] %} {% if can_edit and collection.forms|length > 1 %} {% do actions.append({"text": "Move up", "visuallyHiddenText": form.title, "href": url_for('deliver_grant_funding.move_section', grant_id=grant.id, form_id=form.id, direction='up'), "classes": "govuk-link--no-visited-state" ~ (" move-up-down-link-hidden" if loop.first else ""), "attributes": {"aria-hidden": true} if loop.first else {} }) %} {% do actions.append({"text": "Move down", "visuallyHiddenText": form.title, "href": url_for('deliver_grant_funding.move_section', grant_id=grant.id, form_id=form.id, direction='down'), "classes": "govuk-link--no-visited-state" ~ (" move-up-down-link-hidden" if loop.last else ""), "attributes": {"aria-hidden": true} if loop.last else {} }) %} {% else %} {# Append some empty actions in order to keep the layout visually the same - might need to think about this more when we have examples #} {% do actions.append({}) %} {% endif %} {% do rows.append( { "key": {"html": taskHtml, "classes": "govuk-!-font-weight-regular"}, "value": {"html": questionsHtml}, "actions": { "items": actions, "classes": "govuk-!-width-one-third", }, }) %} {% endfor %} {{ govukSummaryList({ "rows": rows }) }} {% endif %} {% if can_edit %} Add another section {% endif %}