Sha256: f9725b576430e056752335477d0e4f79f9406834cf98dc9a4747e1f50f8bb508

Contents?: true

Size: 689 Bytes

Versions: 84

Compression:

Stored size: 689 Bytes

Contents

<%
  add_gem_component_stylesheet("back-link")

  text ||= t('components.back_link.back')
  data_attributes ||= {}
  disable_ga4 ||= false

  component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns)
  component_helper.add_class("gem-c-back-link govuk-back-link govuk-!-display-none-print")
  unless disable_ga4
    ga4_link = {
      event_name: "navigation",
      type: "back",
      url: href,
    }
    component_helper.add_data_attribute({ module: "ga4-link-tracker" })
    component_helper.add_data_attribute({ ga4_link: ga4_link })
  end
%>
<%= tag.a(**component_helper.all_attributes.merge!({ href: href })) do %>
  <%= text %>
<% end %>

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
govuk_publishing_components-49.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-49.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-48.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-47.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.4.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.3.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.3.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.2.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-46.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.10.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.9.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.8.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.7.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.6.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.6.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.5.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.4.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.4.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-45.3.0 app/views/govuk_publishing_components/components/_back_link.html.erb