|
1 | 1 | <% content_for :page_title, @patient.initials %> |
2 | 2 |
|
3 | | -<% content_for :navigation do %> |
4 | | - <%= render AppBreadcrumbComponent.new(items: [ |
5 | | - { text: "Home", href: dashboard_path }, |
6 | | - { text: t("sessions.index.title"), href: sessions_path }, |
7 | | - { text: @session.location.name, href: session_path(@session) }, |
8 | | - @breadcrumb_item, |
9 | | - ].compact) %> |
10 | | -<% end %> |
11 | | - |
12 | 3 | <% if (outstanding_programmes = patient_outstanding_programmes(@patient, session: @session)).any? %> |
13 | 4 | <% programmes_can_record_vaccination = outstanding_programmes.filter do |programme| |
14 | 5 | policy(VaccinationRecord.new(patient: @patient, session: @session, programme:)).new? |
|
19 | 10 | <% end %> |
20 | 11 | <% end %> |
21 | 12 |
|
22 | | -<h1 class="nhsuk-heading-l nhsuk-u-margin-bottom-2"> |
23 | | - <%= @patient.full_name %> |
24 | | -</h1> |
| 13 | +<% content_for :main_content do %> |
| 14 | + <div class="app-session-banner" data-module="app-sticky"> |
| 15 | + <div class="nhsuk-width-container"> |
| 16 | + <%= render AppBreadcrumbComponent.new(items: [ |
| 17 | + { text: session_title(@session), href: session_path(@session) }, |
| 18 | + @breadcrumb_item, |
| 19 | + ].compact, reverse: true) %> |
25 | 20 |
|
26 | | -<p class="nhsuk-caption-l nhsuk-u-margin-bottom-4"> |
27 | | - <%= patient_year_group(@patient, academic_year: @academic_year) %> |
28 | | -</p> |
| 21 | + <div class="nhsuk-main-wrapper app-main-wrapper--xs"> |
| 22 | + <%= h1 @patient.full_name %> |
| 23 | + </div> |
29 | 24 |
|
30 | | -<%= render AppStickyNavigationComponent.new do %> |
31 | | - <%= render AppSecondaryNavigationComponent.new do |nav| |
32 | | - @session.programmes_for(patient: @patient).each do |programme| |
33 | | - nav.with_item( |
34 | | - href: session_patient_programme_path(@session, @patient, programme, return_to: params[:return_to]), |
35 | | - text: programme.name, |
36 | | - selected: @programme == programme, |
37 | | - ticked: @patient.programme_status(programme, academic_year: @academic_year).vaccinated?, |
38 | | - ) |
39 | | - end |
40 | | - |
41 | | - nav.with_item( |
42 | | - href: session_patient_activity_path(@session, @patient, return_to: params[:return_to]), |
43 | | - text: "Session activity and notes", |
44 | | - selected: request.path.ends_with?("/activity"), |
45 | | - ) |
46 | | - end %> |
| 25 | + <%= render AppSecondaryNavigationComponent.new(reverse: true) do |nav| |
| 26 | + @session.programmes_for(patient: @patient).each do |programme| |
| 27 | + nav.with_item( |
| 28 | + href: session_patient_programme_path(@session, @patient, programme, return_to: params[:return_to]), |
| 29 | + text: programme.name, |
| 30 | + selected: @programme == programme, |
| 31 | + ticked: @patient.programme_status(programme, academic_year: @academic_year).vaccinated?, |
| 32 | + ) |
| 33 | + end |
| 34 | + |
| 35 | + nav.with_item( |
| 36 | + href: session_patient_activity_path(@session, @patient, return_to: params[:return_to]), |
| 37 | + text: "Session activity and notes", |
| 38 | + selected: request.path.ends_with?("/activity"), |
| 39 | + ) |
| 40 | + end %> |
| 41 | + </div> |
| 42 | + </div> |
47 | 43 | <% end %> |
0 commit comments