Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions app/views/consent/match.njk
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,9 @@

{{ link(consentPath + "?referrer=" + consentPath + "/match", "View full consent response") | nhsukMarkdown }}

{{ button({
{{ actionLink({
href: consentPath + "/add",
text: __("consent.add.label"),
variant: "secondary"
text: __("consent.add.label")
}) }}
{% endcall %}
</div>
Expand Down
5 changes: 2 additions & 3 deletions app/views/school/sessions.njk
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,9 @@
view: "sessions"
}) }}

{{ button({
{{ actionLink({
text: __("session.new.label"),
href: "/sessions/new",
variant: "secondary"
href: "/sessions/new"
}) }}

{% if activeSession %}
Expand Down
8 changes: 3 additions & 5 deletions app/views/school/show.njk
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,12 @@
view: "show"
}) }}

{{ button({
{{ actionLink({
href: "/uploads/new?type=" + UploadType.School + "&school_id=" + school.id,
text: __("session.upload-class-list.title"),
variant: "secondary"
text: __("session.upload-class-list.title")
} if not school.homeOrUnknown else {
href: school.uri + "/invite-to-clinic",
text: __("session.inviteToClinic.label"),
variant: "secondary"
text: __("session.inviteToClinic.label")
}) }}

<div class="nhsuk-grid-row">
Expand Down
20 changes: 15 additions & 5 deletions app/views/session/_session-activity-summary.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,20 @@
{% set sessionActivityRows = sessionActivityRows | push(sessionActivityRow("record")) %}
{% endif %}

{{ summaryList({
card: {
{% if sessionActivityRows.length > 0 or session.isCompleted %}
{% call card({
heading: __("session.activity.label"),
headingLevel: 3
},
rows: sessionActivityRows | removeLastSummaryBorder
}) if sessionActivityRows.length > 0 }}
}) %}
{{ summaryList({
rows: sessionActivityRows | removeLastSummaryBorder
}) if sessionActivityRows.length > 0 and not session.isCompleted }}

{{ actionLink({
text: __("session.inviteToClinic.label"),
href: session.uri + "/invite-to-clinic",
variant: "secondary"
}) if session.isCompleted }}
{% endcall %}
{% endif %}

61 changes: 27 additions & 34 deletions app/views/session/show.njk
Original file line number Diff line number Diff line change
Expand Up @@ -20,44 +20,37 @@
{% include "session/_session-vaccinated-summary.njk" %}
{% endif %}

{% if not session.isUnplanned and not session.isCompleted %}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the previous reason for not showing required actions when the session was completed? What changed?

{% if not session.isUnplanned %}
{% include "session/_session-activity-summary.njk" %}
{% endif %}

{{ summaryList({
card: {
heading: __("session.summary"),
headingLevel: 3
},
rows: summaryRows(session, {
location: {},
school_id: {},
status: {},
patients: {},
programmes: {},
yearGroups: {},
consentWindow: {},
consentForms: {},
mmrConsent: {}
})
}) }}

{{ appButtonGroup({
buttons: [
{
{% call card({
heading: __("session.summary"),
headingLevel: 3,
actions: {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'm gonna need to move a new Cancel Session button to here as well (currently sat on a branch, but I'll rebase on this change once merged to main).

Comment thread
malross marked this conversation as resolved.
items: [{
text: __("session.schedule.title") if session.isUnplanned else __("session.edit.title"),
href: session.uri + "/edit",
variant: "secondary"
},
{
text: __("session.inviteToClinic.label"),
href: session.uri + "/invite-to-clinic",
variant: "secondary"
} if session.isCompleted
],
links: [{
href: session.uri + "/edit"
}]
}
}) %}
{{ summaryList({
rows: summaryRows(session, {
location: {},
school_id: {},
status: {},
patients: {},
programmes: {},
yearGroups: {},
consentWindow: {},
consentForms: {},
mmrConsent: {}
})
}) }}

{{ actionLink({
text: __("session.offline.title"),
href: session.uri + "/offline"
}] if session.isPlanned or session.isActive
}) }}
}) if session.isPlanned or session.isActive }}
{% endcall %}
{% endblock %}
5 changes: 2 additions & 3 deletions app/views/upload/list.njk
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,9 @@
<div class="nhsuk-u-reading-width">
{{ __("upload.list.introduction") | nhsukMarkdown }}

{{ button({
{{ actionLink({
text: __("upload.new.label"),
href: "/uploads/new",
variant: "secondary"
href: "/uploads/new"
}) }}
</div>

Expand Down