Sha256: 253c5c0e4dc158d6757261d95754cca969da99c43c9943b7eb77db410a4d8aae

Contents?: true

Size: 1.69 KB

Versions: 13

Compression:

Stored size: 1.69 KB

Contents

<%
  title ||= false
  path ||= false
  breadcrumbs = [
    { title: "Home", url: "/" },
    { title: title, url: path }
  ]
  breadcrumb_presenter = GovukPublishingComponents::Presenters::Breadcrumbs.new(breadcrumbs)

  tracking_id ||= false
  tracking_category ||= "stepNavHeaderClicked"
  tracking_action ||= "top"
  tracking_label ||= path
  tracking_dimension_enabled = tracking_dimension_enabled != false
  tracking_dimension ||= title
  tracking_dimension_index ||= 29

  if tracking_id
    tracking_options ||= ({ dimension96: tracking_id }).to_json
  end

  local_assigns[:margin_bottom] ||= 0
  shared_helper = GovukPublishingComponents::Presenters::SharedHelper.new(local_assigns)
  classes = "gem-c-step-nav-header #{shared_helper.get_margin_bottom}"
%>
<% if title %>
  <script type="application/ld+json">
    <%= raw breadcrumb_presenter.structured_data.to_json %>
  </script>

  <div class="<%= classes %>" data-module="track-click">
    <span class="gem-c-step-nav-header__part-of">Part of</span>
    <% if path %>
      <a href="<%= path %>"
        class="gem-c-step-nav-header__title"
        data-track-category="<%= tracking_category %>"
        data-track-action="<%= tracking_action %>"
        data-track-label="<%= tracking_label %>"
        <% if tracking_dimension_enabled %>
          data-track-dimension="<%= tracking_dimension %>"
          data-track-dimension-index="<%= tracking_dimension_index %>"
        <% end %>
        <% if tracking_id %>
          data-track-options='<%= tracking_options %>'
        <% end %>
      >
        <%= title %>
      </a>
    <% else %>
      <span class="gem-c-step-nav-header__title">
        <%= title %>
      </span>
    <% end %>
  </div>
<% end %>

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
govuk_publishing_components-21.59.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.58.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.57.1 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.57.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.56.2 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.56.1 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.56.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.55.4 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.55.3 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.55.2 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.55.1 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.55.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb
govuk_publishing_components-21.54.0 app/views/govuk_publishing_components/components/_step_by_step_nav_header.html.erb