Sha256: e5a21a06579a7218d6989667f2e2e05912fdb8cb1c94cf4952a748436920db5e

Contents?: true

Size: 1.04 KB

Versions: 107

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(devolved_nations_helper.alternative_content_text(k), v[:alternative_url], class: "govuk-link")) %>
        <% end %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

107 entries across 107 versions & 1 rubygems

Version Path
govuk_publishing_components-34.12.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.11.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.10.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.10.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.9.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.9.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.8.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.8.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.7.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.7.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.6.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.5.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.5.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.4.2 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.4.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.4.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.3.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.2.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.1.3 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-34.1.2 app/views/govuk_publishing_components/components/_devolved_nations.html.erb