Sha256: 0e8d083b866ffe9689a659e3a5283874ebcea9605ee57fb72fcc631c6c363caa

Contents?: true

Size: 937 Bytes

Versions: 84

Compression:

Stored size: 937 Bytes

Contents

<%
app_name ||= nil
phase ||= nil
message ||= nil 

unless phase.in?(%w[alpha beta])
  raise ArgumentError, "The phase banner component expects a `phase` (`beta` or `alpha`), #{phase.inspect} given"
end

unless message.present?
  if phase == "beta"
    message = raw("This part of GOV.UK is being rebuilt &ndash; <a href=\"/help/beta\">find out what beta means</a>")
  elsif phase == "alpha"
    message = raw("This part of GOV.UK is being built &ndash; <a href=\"/service-manual/phases/ideal-alphas\">find out what alpha means</a>")
  end
end 
%>

<%= tag.div class: "gem-c-phase-banner govuk-phase-banner" do %>
  <%= tag.p class: "govuk-phase-banner__content" do %>
    <%= tag.strong app_name, class: "govuk-phase-banner__content__app-name" if app_name %>
    <%= tag.strong phase, class: "govuk-tag govuk-phase-banner__content__tag" %>
    <%= tag.span message, class: "govuk-phase-banner__text" if message %>
  <% end %>
<% end %>

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
govuk_publishing_components-16.20.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.19.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.18.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.17.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.16.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.15.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.14.1 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.14.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.13.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.12.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.11.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.10.1 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.10.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.9.2 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.9.1 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.9.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.8.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.7.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.6.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb
govuk_publishing_components-16.5.0 app/views/govuk_publishing_components/components/_phase_banner.html.erb