{% extends "deliver_grant_funding/grant_base.html" %} {% from "deliver_grant_funding/macros/deliver_grant_funding_collection_breadcrumb.html" import deliver_grant_funding_collection_breadcrumb %} {% from "govuk_frontend_jinja/components/notification-banner/macro.html" import govukNotificationBanner %} {% from "deliver_grant_funding/macros/dependency_banner.html" import dependency_banner %} {% from "deliver_grant_funding/macros/dependency_banner.html" import section_component_dependency_banner %} {% from "deliver_grant_funding/macros/question_table.html" import question_table %} {% set type_constants = db_form.collection.type.constants %} {% set page_title = db_form.title %} {% set active_item_identifier = type_constants.active_nav %} {% set can_edit = authorisation_helper.can_edit_collection(current_user, db_form.collection_id) %} {% set form_has_questions = db_form.cached_questions | length > 0 %} {% set collection_has_data_sources = db_form.collection.data_sources | length > 0 %} {% set preview_blocked_by_data_sources = collection_has_data_sources and form_has_questions %} {% set can_preview = form_has_questions and not collection_has_data_sources and db_form.collection.status != enum.collection_status.CLOSED %} {% block beforeContent %} {{ deliver_grant_funding_collection_breadcrumb(grant=grant, collection=db_form.collection, this_page_breadcrumb_item={"text":db_form.title}) }} {% endblock beforeContent %} {% block content %}
Are you sure you want to delete this section?
{% endset %} {{ govukNotificationBanner(params={"role": "alert", "titleText": "Important", "classes": "", "html": banner_html}) }} {% endif %} {% with flashes = get_flashed_messages(category_filter=[enum.flash_message_type.DEPENDENCY_ORDER_ERROR.value]) %} {% if flashes %} {{ dependency_banner(flashes[0], interpolate=interpolate) }} {% endif %} {% endwith %}You cannot preview sections in this {{ type_constants.singular }} because it requires uploaded data.
{% endif %}This section has no questions.
{% else %} {{ question_table(db_form, interpolate, role_can_edit=can_edit, enum=enum) }} {% endif %} {% if can_edit %} {% endif %}