-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use component wrapper on contextual footer
- Loading branch information
Showing
3 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 13 additions & 10 deletions
23
app/views/govuk_publishing_components/components/_contextual_footer.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,15 @@ | ||
<% navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request) %> | ||
<% disable_ga4 ||= false %> | ||
<% | ||
navigation = GovukPublishingComponents::Presenters::ContextualNavigation.new(content_item, request) | ||
disable_ga4 ||= false | ||
|
||
<% unless navigation.content_tagged_to_current_step_by_step? %> | ||
<div class="gem-c-contextual-footer govuk-!-display-none-print"> | ||
<%# Rendering related navigation because no step by step list %> | ||
<%= render 'govuk_publishing_components/components/related_navigation', | ||
content_item: content_item, | ||
disable_ga4: disable_ga4, | ||
context: :footer %> | ||
</div> | ||
component_helper = GovukPublishingComponents::Presenters::ComponentWrapperHelper.new(local_assigns) | ||
component_helper.add_class("gem-c-contextual-footer govuk-!-display-none-print") | ||
%> | ||
|
||
<%= tag.div(**component_helper.all_attributes) do %> | ||
<%# Rendering related navigation because no step by step list %> | ||
<%= render 'govuk_publishing_components/components/related_navigation', | ||
content_item: content_item, | ||
disable_ga4: disable_ga4, | ||
context: :footer %> | ||
<% end %> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters