{% extends "access_grant_funding/base.html" %} {% from "govuk_frontend_jinja/components/back-link/macro.html" import govukBackLink %} {% from "govuk_frontend_jinja/components/table/macro.html" import govukTable %} {% from "common/macros/status.html" import submissionStatusTag with context %} {% from "govuk_frontend_jinja/components/button/macro.html" import govukButton %} {% set page_title = collection.name %} {% set active_item_identifier = collection.type.constants.active_nav %} {% block beforeContent %} {{ super() }} {{ govukBackLink({ "href": url_for("access_grant_funding.list_collections", organisation_id=grant_recipient.organisation.id, grant_id=grant_recipient.grant.id), "text": "Back" }) }} {% endblock beforeContent %} {% block content %}
You have not started any {{ collection.type.constants.plural }} yet.
{% else %} {% set rows=[] %} {% for submission_helper in submission_helpers|sort(attribute="submission_name") %} {% set submission_status = submission_helper.status %} {% set submission_status_html %} {{ submissionStatusTag(submission_status, submission_helper.submission.is_overdue) }} {% endset %} {% set action_config = submission_helper.get_access_submission_action(collection, grant_recipient, submission_helper.submission) %} {% set action_html %} {% if action_config.href %} {{ action_config.label }} for {{ submission_helper.submission_name }} {% elif action_config.label %} {{ action_config.label }} {% endif %} {% endset %} {% do rows.append([ {"text": submission_helper.submission_name }, {"html": submission_status_html}, {"html": action_html} ]) %} {% endfor %} {% set actions_html %} Actions {% endset %} {{ govukTable(params={ "firstCellIsHeader": false, "head":[ {"text": (collection.submission_name_question.name | uppercase_first )}, {"text": "Status"}, {"html": actions_html} ], "rows":rows }) }} {% endif %} {% if can_create_submissions %} {{ govukButton({ "text": "Start a new " + collection.type.constants.singular, "classes": "govuk-button--secondary" if submission_helpers|length else "", "href": url_for('access_grant_funding.start_new_multiple_submission', organisation_id=grant_recipient.organisation.id, grant_id=grant_recipient.grant.id, collection_id=collection.id)}) }} {% endif %}