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-43.4.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.4.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.3.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.2.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.1.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.0.2 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.0.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-43.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-42.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-42.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-41.1.2 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-41.1.1 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-41.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-41.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-40.1.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-40.0.0 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-39.2.5 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-39.2.4 app/views/govuk_publishing_components/components/_back_link.html.erb
govuk_publishing_components-39.2.3 app/views/govuk_publishing_components/components/_back_link.html.erb