This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
generated from communitiesuk/funding-service-design-TEMPLATE
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
RamuniN
committed
Oct 12, 2023
1 parent
90a0998
commit d355319
Showing
7 changed files
with
177 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
124 changes: 124 additions & 0 deletions
124
app/blueprints/assessments/templates/macros/application_overviews_table_cyp.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
{% from "govuk_frontend_jinja/components/input/macro.html" import govukInput %} | ||
{% from "macros/sortable_table_header.html" import sortable_table_header %} | ||
{% from "macros/filter_options.html" import filter_options %} | ||
{% from "macros/tags_table.html" import tags_table %} | ||
|
||
|
||
{% macro render(application_overviews, round_details, query_params, cohort, | ||
assessment_statuses, countries, regions, local_authorities, show_clear_filters, | ||
sort_column, sort_order, tag_option_groups, tags, tagging_purpose_config) -%} | ||
<nav class="search-bar-flex-container"> | ||
<form method="get" class="govuk-!-width-full"> | ||
{{ filter_options( | ||
query_params, | ||
cohort, | ||
'cohort', | ||
'Search reference or organisation name', | ||
assessment_statuses, | ||
countries, | ||
regions, | ||
local_authorities, | ||
round_details, | ||
show_clear_filters, | ||
tag_option_groups | ||
) }} | ||
</form> | ||
</nav> | ||
|
||
{% if not application_overviews %} | ||
<div role="status" aria-live="assertive" class="govuk-!-margin-top-4"> | ||
<p class="govuk-body" autofocus> | ||
<strong>No matching results.</strong> | ||
</p> | ||
<p class="govuk-body">Improve your results by:</p> | ||
<ul class="govuk-list govuk-list--bullet"> | ||
<li>removing filters</li> | ||
<li>double-checking your spelling</li> | ||
</ul> | ||
</div> | ||
{% else %} | ||
<table class="govuk-table govuk-!-margin-top-4" id="application_overviews_table"> | ||
<thead class="govuk-table__head"> | ||
<tr class="govuk-table__row"> | ||
<th scope="col" class="govuk-table__header"> | ||
Reference | ||
</th> | ||
|
||
{{ sortable_table_header('organisation_name', 'Organisation name', sort_order, sort_column, round_details, query_params) }} | ||
|
||
{{ sortable_table_header('cohort', 'Cohort', sort_order, sort_column, round_details, query_params) }} | ||
|
||
{{ sortable_table_header('funding_requested', 'Funding requested', sort_order, sort_column, round_details, query_params) }} | ||
|
||
{{ sortable_table_header('national_or_regional', 'National or regional', sort_order, sort_column, round_details, query_params) }} | ||
|
||
{{ sortable_table_header('tags', 'Tags', sort_order, sort_column, round_details, query_params) }} | ||
|
||
{% if g.access_controller.has_any_assessor_role %} | ||
{{ sortable_table_header('status', 'Status', sort_order, sort_column, round_details, query_params) }} | ||
{% endif %} | ||
|
||
</tr> | ||
</thead> | ||
<tbody class="govuk-table__body"> | ||
{% for overview in application_overviews %} | ||
<tr class="govuk-table__row"> | ||
|
||
<td class="govuk-table__cell">{{ overview.short_id[-6:] }}</td> | ||
<td class="govuk-table__cell"><a class="govuk-link" data-qa="organisation_name" href="{{ url_for('assessment_bp.application',application_id=overview.application_id) }}">{{ overview.organisation_name }}</a></td> | ||
|
||
{% set cohort_display_list = [] %} | ||
{% set cohort_list = overview.cohort | ast_literal_eval %} | ||
{% for cohrt in cohort_list %} | ||
{% set _ = cohort_display_list.append(cohort.get(cohrt)) %} | ||
{% endfor %} | ||
|
||
<td class="govuk-table__cell">{{ cohort_display_list | join(' ') }}</td> | ||
|
||
<td class="govuk-table__cell">£{{ "{:,.2f}".format(overview.funding_amount_requested|int|round) }}</td> | ||
<td class="govuk-table__cell">{{ "Regional" if overview.is_project_regional else "National"}}</td> | ||
|
||
{{ tags_table(tags[overview.application_id], tagging_purpose_config, query_params.show_tags == "ON") }} | ||
|
||
{% if g.access_controller.has_any_assessor_role %} | ||
<td class="govuk-table__cell"> | ||
{% if overview.application_status == "QA_COMPLETED" %} | ||
<span>{{ assessment_statuses[overview.application_status] }}</span> | ||
{% elif overview.application_status == "STOPPED" %} | ||
<span class="stopped-tag"> | ||
{{ assessment_statuses[overview.application_status] }} | ||
</span> | ||
{% elif overview.application_status == "FLAGGED" %} | ||
<span class="flagged-tag"> | ||
{{ assessment_statuses[overview.application_status] }} | ||
</span> | ||
{% elif "Flagged" in overview.application_status %} | ||
<span class="flagged-tag"> | ||
{{ overview.application_status }} | ||
</span> | ||
{% elif overview.application_status == "NOT_STARTED" %} | ||
<span class="not-started-tag"> | ||
{{ assessment_statuses[overview.application_status] }} | ||
</span> | ||
{% elif overview.application_status == "COMPLETED" %} | ||
<span> | ||
{{ assessment_statuses[overview.application_status] }} | ||
</span> | ||
{% elif overview.application_status == "MULTIPLE_FLAGS" %} | ||
<span class="flagged-tag"> | ||
{{ assessment_statuses[overview.application_status] }} | ||
</span> | ||
{% else %} | ||
<span> | ||
{{ assessment_statuses[overview.application_status] }} | ||
{{ '(' + overview.progress|string + '%)' if 'progress' in overview else '(0%)' }} | ||
</span> | ||
{% endif %} | ||
</td> | ||
{% endif %} | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
{%- endmacro %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters