Sha256: d08c72cbc26f41784d65eb2860cdbebca8bb1b52c87266b7c49fe4c0273d7717

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

<%
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  devolved_nations_helper = GovukPublishingComponents::Presenters::DevolvedNationsHelper.new(local_assigns)

  applies_to ||= t('components.devolved_nations.applies_to')
  heading_level ||= 2
%>

<% if national_applicability.any? { |k,v| v[:applicable] == true } %>
  <%= tag.section class: "gem-c-devolved-nations" do %>
    <%= content_tag(shared_helper.get_heading_level, class: "govuk-heading-s govuk-!-margin-bottom-0") do %>
      <%= applies_to %> <%= devolved_nations_helper.applicable_nations_title_text %>
    <% end %>

    <% if devolved_nations_helper.nations_with_urls.any? %>
      <%= content_tag :ul, class: "govuk-list govuk-!-margin-top-1 govuk-!-margin-bottom-0" do -%>
        <% devolved_nations_helper.nations_with_urls.each do |k, v| %>
          <%= content_tag(:li, link_to("Guidance for #{t("components.devolved_nations.#{k}")}", v[:alternative_url], class: "govuk-link")) %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
govuk_publishing_components-27.6.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.5.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.4.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.3.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.3.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.2.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.1.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-27.0.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb