-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy path_header.html.erb
More file actions
43 lines (37 loc) · 1.95 KB
/
_header.html.erb
File metadata and controls
43 lines (37 loc) · 1.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<% content_for :page_title, @patient.initials %>
<% if (outstanding_programmes = patient_outstanding_programmes(@patient, session: @session)).any? %>
<% programmes_can_record_vaccination = outstanding_programmes.filter do |programme|
policy(VaccinationRecord.new(patient: @patient, session: @session, programme:)).new?
end %>
<%= govuk_notification_banner(title_text: "Important") do |notification_banner| %>
<% notification_banner.with_heading(text: "You still need to record an outcome for #{programmes_can_record_vaccination.map(&:name).to_sentence}.") %>
<% end %>
<% end %>
<% content_for :main_content do %>
<div class="app-session-banner" data-module="app-sticky">
<div class="nhsuk-width-container">
<%= render AppBreadcrumbComponent.new(items: [
{ text: session_title(@session), href: session_path(@session) },
@breadcrumb_item,
].compact, reverse: true) %>
<div class="nhsuk-main-wrapper app-main-wrapper--xs">
<%= h1 @patient.full_name %>
</div>
<%= render AppSecondaryNavigationComponent.new(reverse: true) do |nav|
@session.programmes_for(patient: @patient).each do |programme|
nav.with_item(
href: session_patient_programme_path(@session, @patient, programme, return_to: params[:return_to]),
text: programme.name,
selected: @programme == programme,
ticked: @patient.programme_status(programme, academic_year: @academic_year).vaccinated?,
)
end
nav.with_item(
href: session_patient_activity_path(@session, @patient, return_to: params[:return_to]),
text: "Session activity and notes",
selected: request.path.ends_with?("/activity"),
)
end %>
</div>
</div>
<% end %>