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.
add base assessir dashbaord with default view, to be extended in futu…
…re (#650)
- Loading branch information
Showing
23 changed files
with
473 additions
and
380 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
81 changes: 81 additions & 0 deletions
81
app/blueprints/assessments/templates/macros/application_overviews_table_all.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,81 @@ | ||
{% from "govuk_frontend_jinja/components/input/macro.html" import govukInput %} | ||
{% from "macros/sortable_table_header.html" import sortable_table_header %} | ||
{% from "macros/filter_options_all.html" import filter_options %} | ||
{% from "macros/application_status_column.html" import application_status_column %} | ||
{% from "macros/tags_table.html" import tags_table %} | ||
|
||
{% macro render(application_overviews, round_details, query_params, asset_types, | ||
assessment_statuses, show_clear_filters, | ||
sort_column, sort_order, tag_option_groups, tags, tagging_purpose_config, users) -%} | ||
<nav class="search-bar-flex-container"> | ||
<form method="get" class="govuk-!-width-full"> | ||
{{ filter_options( | ||
query_params, | ||
'Search reference or project name', | ||
assessment_statuses, | ||
round_details, | ||
show_clear_filters, | ||
tag_option_groups, | ||
users | ||
) }} | ||
</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('project_name', 'Project name', 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('asset_type', 'Asset type', sort_order, sort_column, round_details, query_params) }} | ||
{{ sortable_table_header('location', 'Location', 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 %} | ||
{{ sortable_table_header('assigned_to', 'Assigned to', sort_order, sort_column, round_details, query_params) }} | ||
{{ sortable_table_header('last_action', 'Last action', sort_order, sort_column, round_details, query_params) }} | ||
{{ sortable_table_header('time_since_last_action', 'Time since last action', sort_order, sort_column, | ||
round_details, query_params) }} | ||
</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="project_name" | ||
href="{{ url_for('assessment_bp.application',application_id=overview.application_id) }}">{{ | ||
overview.project_name }}</a></td> | ||
<td class="govuk-table__cell">£{{ "{:,.2f}".format(overview.funding_amount_requested|int|round) }}</td> | ||
<td class="govuk-table__cell">{{ asset_types[overview.asset_type] }}</td> | ||
<td class="govuk-table__cell">{{ overview.location_json_blob.get('country') or "Not found" }}</td> | ||
{{ tags_table(tags[overview.application_id], tagging_purpose_config, query_params.show_tags == "ON") }} | ||
{% if g.access_controller.has_any_assessor_role %} | ||
{{ application_status_column(overview.application_status, overview.get("progress", ""), assessment_statuses) }} | ||
{% endif %} | ||
<!-- TODO: requires 'assigned to' API --> | ||
<td class="govuk-table__cell">-</td> | ||
<td class="govuk-table__cell">-</td> | ||
<td class="govuk-table__cell">-</td> | ||
</tr> | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
{% endif %} | ||
{%- endmacro %} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.