Skip to content

Commit

Permalink
WIP - introduce full application page
Browse files Browse the repository at this point in the history
  • Loading branch information
libuk committed Oct 4, 2023
1 parent f9449bf commit c7c0287
Showing 1 changed file with 59 additions and 0 deletions.
59 changes: 59 additions & 0 deletions server/views/applications/full.njk
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{%- from "moj/components/identity-bar/macro.njk" import mojIdentityBar -%}
{% from "govuk/components/back-link/macro.njk" import govukBackLink %}
{%- from "govuk/components/summary-list/macro.njk" import govukSummaryList -%}

{% extends "../partials/layout.njk" %}

{% set pageTitle = "The person's referral - " + applicationName %}
{% set mainClasses = "app-container govuk-body" %}
{% set backLinkUrl = paths.applications.index({}) + "#applications-submitted" %}

{% block beforeContent %}
{{ govukBackLink({
text: "Back",
href: backLinkUrl
}) }}
{% endblock %}

{% set name = personName(application.person, 'Limited access offender') %}
{% block content %}
{% include "../_messages.njk" %}

<div class="moj-identity-bar">
<div class="moj-identity-bar__container">
<div class="moj-identity-bar__details">
<span class="moj-identity-bar__title">
<span class="govuk-caption-xl">Review referral</span>
<h1 class="govuk-heading-xl">{{ name }}
{{ application.status | safe }}</h1>
</span>
</div>
</div>
</div>

<div class="govuk-!-margin-4">
{% for section in application.document.sections %}
<h2 class="govuk-heading-l govuk-!-margin-top-3" >{{ section.title }}</h2>
{% for task in section.tasks %}

{{
govukSummaryList({
card: {
title: {
text: task.title
}
},
rows: taskResponsesToSummaryListRowItems(task.content)
})
}}
{% endfor %}
{% endfor %}
</div>

{% endblock %}

{% block extraScripts %}
<script type="text/javascript" nonce="{{ cspNonce }}">
new MOJFrontend.ButtonMenu({container: $('.moj-button-menu'), mq: "(min-width: 200em)", buttonText: "Update referral status", menuClasses: "moj-button-menu__wrapper--right"});
</script>
{% endblock %}

0 comments on commit c7c0287

Please sign in to comment.