Sha256: bb9c0bc0aedd679e11dc964ceab84e0a5af9025b7413d7c27ac3e850f72abe58

Contents?: true

Size: 1.72 KB

Versions: 29

Compression:

Stored size: 1.72 KB

Contents

<% 
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  title = t("components.related_navigation.ukraine.title")
  lang = shared_helper.t_locale("components.related_navigation.ukraine.title")
  data_module = "gem-track-click"
  data_module << " ga4-link-tracker" if ga4_tracking
%>
<%= tag.div class: "gem-c-contextual-sidebar__cta gem-c-contextual-sidebar__cta--ukraine", data: { module: data_module } do %>
  <%= tag.h2 title, class: "gem-c-contextual-sidebar__heading govuk-heading-s" %>
  <%= tag.ul class: "gem-c-contextual-sidebar__list" do %>
    <% index_total = t("components.related_navigation.ukraine.links").length %>
    <% t("components.related_navigation.ukraine.links").each_with_index do |link, index| %>
      <%= tag.li class: "gem-c-contextual-sidebar__text govuk-body" do %>
        <%
          ga4_attributes = {
            event_name: "navigation",
            type: "related content",
            index: {
              index_section: "#{ga4_tracking_counts.index_section_count}",
              index_link: "#{index + 1}",
              index_section_count: "#{ga4_tracking_counts.index_section_count}",
            },
            index_total: "#{index_total}",
            section: title,
          } if ga4_tracking
        %>
        <%= link_to link[:label],
          link[:href],
          class: "govuk-link",
          data: {
            "track-category": "relatedLinkClicked",
            "track-action": "1.0 Invasion of Ukraine",
            "track-label": link[:href],
            "track-dimension": link[:label],
            "track-dimension-index": "29",
            ga4_link: ga4_attributes,
          },
          lang: lang %>
      <% end %>
    <% end %>
  <% end %>
<% end %>

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
govuk_publishing_components-35.19.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.18.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.17.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.16.1 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.16.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.5 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.4 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.3 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.2 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.1 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.15.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.14.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.13.2 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.13.1 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.13.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.12.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.11.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.10.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.9.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb
govuk_publishing_components-35.8.0 app/views/govuk_publishing_components/components/contextual_sidebar/_ukraine_cta.html.erb