Sha256: 8497cf195a1376f4d23ebe0d79162a4cac4fae318e40106a7cbd803a86214017

Contents?: true

Size: 1.64 KB

Versions: 67

Compression:

Stored size: 1.64 KB

Contents

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

<div class="gem-c-contextual-sidebar">
  <% 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: t("components.contextual_sidebar.pretitle"),
      links: navigation.step_nav_helper.also_part_of_step_nav,
      always_display_as_list: true
    } %>
  <% end %>

  <% if navigation.show_brexit_cta? || navigation.show_brexit_related_links? %>
    <%= render 'govuk_publishing_components/components/contextual_sidebar/brexit_cta', content_item: content_item %>
  <% end %>
</div>

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
govuk_publishing_components-27.18.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.17.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.16.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.15.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.14.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.14.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.14.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.13.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.12.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.11.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.5 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.4 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.3 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.10.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.9.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.9.1 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.9.0 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb
govuk_publishing_components-27.8.2 app/views/govuk_publishing_components/components/_contextual_sidebar.html.erb