-
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.
Add the print variant route, action and view.
- Loading branch information
1 parent
080f43e
commit ebc9fbb
Showing
3 changed files
with
52 additions
and
1 deletion.
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
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
<% add_view_stylesheet("travel-advice") %> | ||
<% | ||
content_for :title, "Print #{@content_item.page_title}" | ||
content_for :simple_header, true | ||
content_for :extra_head_content do %> | ||
<meta name="robots" content="noindex, nofollow"> | ||
<% end %> | ||
|
||
<div class="govuk-grid-row" id="travel-advice-print"> | ||
<div class="govuk-grid-column-two-thirds"> | ||
<div class="govuk-!-margin-bottom-6"> | ||
<%= render 'govuk_publishing_components/components/title', @content_item.title_and_context %> | ||
</div> | ||
|
||
<div class="govuk-!-display-none-print"> | ||
<%= render 'govuk_publishing_components/components/lead_paragraph', { | ||
margin_bottom: 6, | ||
text: t("multi_page.printable_version"), | ||
} %> | ||
</div> | ||
|
||
<%= render 'govuk_publishing_components/components/print_link', { | ||
margin_bottom: 8, | ||
text: t("components.print_link.text"), | ||
} %> | ||
<% @content_item.parts.each_with_index do |part, i| %> | ||
<section> | ||
<h1 class="part-title"> | ||
<%= part['title'] %> | ||
</h1> | ||
|
||
<%= render 'shared/travel_advice_first_part', content_item: @content_item if i == 0 %> | ||
<%= render 'govuk_publishing_components/components/govspeak', | ||
content: part['body'].html_safe, | ||
direction: page_text_direction %> | ||
</section> | ||
<% end %> | ||
<%= render 'govuk_publishing_components/components/print_link', { | ||
text: t("components.print_link.text") | ||
} %> | ||
</div> | ||
</div> |
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