Sha256: aa0caf455158e5be92ec66f51adc19602ead350588290b52dc714f07272dd212

Contents?: true

Size: 1.67 KB

Versions: 126

Compression:

Stored size: 1.67 KB

Contents

<% navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request) %>

<div class="gem-c-contextual-sidebar">
  <% if navigation.show_brexit_cta? && navigation.step_by_step_count.eql?(0) %>
    <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
  <% end %>

  <% if navigation.content_tagged_to_a_reasonable_number_of_step_by_steps? %>
    <%# Rendering step by step related items because there are a few but not too many of them %>
    <%= render 'govuk_publishing_components/components/step_by_step_nav_related', links: navigation.step_nav_helper.related_links %>
  <% end %>

  <% if navigation.content_tagged_to_current_step_by_step? %>
    <%# Rendering step by step sidebar because there's 1 step by step list %>
    <%= render 'govuk_publishing_components/components/step_by_step_nav', navigation.step_nav_helper.sidebar %>
  <% else %>
    <%# Rendering related navigation sidebar because no step by step list %>
    <%= render 'govuk_publishing_components/components/related_navigation', content_item: content_item, context: :sidebar %>
  <% end %>

  <% if navigation.content_tagged_to_other_step_by_steps? %>
    <%# Rendering step by step related items because there are a few but not too many of them %>
    <%= render 'govuk_publishing_components/components/step_by_step_nav_related', {
      pretitle: "Also part of",
      links: navigation.step_nav_helper.also_part_of_step_nav,
      always_display_as_list: true
    } %>
  <% end %>

  <% if navigation.show_brexit_cta? && navigation.step_by_step_count > 0 %>
    <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta' %>
  <% end %>
</div>

Version data entries

126 entries across 126 versions & 1 rubygems

Version Path
govuk_publishing_components-23.6.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.5.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.5.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.4.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.3.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.2.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.2.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.1.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-23.0.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.69.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.68.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.68.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.67.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.67.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.67.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.66.4 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.66.3 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.66.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.66.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-21.66.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb