Skip to content

Commit

Permalink
Merge pull request #3296 from alphagov/phase-banner-service-manual-ho…
Browse files Browse the repository at this point in the history
…mepage

Align phase banner on service manual homepage
  • Loading branch information
MartinJJones authored Aug 9, 2024
2 parents b8759f9 + e604b37 commit 82fcced
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/presenters/content_item_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@ def service_manual?
false
end

def service_manual_homepage?
false
end

def render_guide_as_single_page?
# /how-to-vote
content_id == "9315bc67-33e7-42e9-8dea-e022f56dabfa" && voting_is_open?
Expand Down
4 changes: 4 additions & 0 deletions app/presenters/service_manual_presenter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ def service_manual?
true
end

def service_manual_homepage?
content_item["document_type"] == "service_manual_homepage"
end

def show_phase_banner?
false
end
Expand Down
6 changes: 6 additions & 0 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@
<%= render 'govuk_publishing_components/components/phase_banner', phase: @content_item.phase %>
<% end %>
<% if @content_item.service_manual? %>
<% if @content_item.service_manual_homepage? %>
<div class="govuk-width-container">
<%= render_phase_label @content_item, content_for(:phase_message) %>
</div>
<% else %>
<%= render_phase_label @content_item, content_for(:phase_message) %>
<% end %>
<% end %>

<% if @content_item.show_default_breadcrumbs? %>
Expand Down

0 comments on commit 82fcced

Please sign in to comment.