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-29.7.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.6.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.5.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.4.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.3.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.2.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.1.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.0.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-29.0.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.9.2 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.9.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.9.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.8.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.8.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.7.1 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.6.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.5.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.4.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.3.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb
govuk_publishing_components-28.2.0 app/views/govuk_publishing_components/components/_devolved_nations.html.erb