Skip to content

Commit

Permalink
Merge pull request #697 from alphagov/move-corporate-information-page…
Browse files Browse the repository at this point in the history
…-to-universal-layout

Move corporate information page to universal layout
  • Loading branch information
steventux authored Jan 16, 2018
2 parents f6a2755 + 26cc579 commit ca9ab11
Showing 1 changed file with 43 additions and 28 deletions.
71 changes: 43 additions & 28 deletions app/views/content_items/corporate_information_page.html.erb
Original file line number Diff line number Diff line change
@@ -1,36 +1,51 @@
<% @additional_body = capture do %>
<% if @content_item.corporate_information? %>
<%= @content_item.corporate_information_heading_tag %>
<% @content_item.corporate_information.each do |group| %>
<%= group[:heading] %>
<ul>
<% group[:links].each do |link| %>
<li>
<%= link %>
</li>
<% end %>
</ul>
<% end %>

<% if @content_item.further_information.present? %>
<p>
<%= @content_item.further_information %>
</p>
<% end %>
<% end %>
<% end %>

<div class="<%= @content_item.organisation_brand_class %>">
<div class="grid-row">
<div class="column-quarter">
<div class="column-two-thirds">
<%= render 'govuk_component/organisation_logo', @content_item.organisation_logo %>
</div>
</div>
<%= render 'shared/title_and_translations', content_item: @content_item %>
<%= render 'components/notice', @content_item.withdrawal_notice_component %>
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>

<% @additional_body = capture do %>
<% if @content_item.corporate_information? %>
<%= @content_item.corporate_information_heading_tag %>
<% @content_item.corporate_information.each do |group| %>
<%= group[:heading] %>
<ul>
<% group[:links].each do |link| %>
<li>
<%= link %>
</li>
<% end %>
</ul>
<% end %>
<div class="grid-row">
<div class="column-two-thirds">
<%= render 'govuk_component/title',
title: @content_item.title,
average_title_length: "long" %>
</div>
<%= render 'shared/translations' %>
<div class="column-two-thirds">
<%= render 'govuk_component/lead_paragraph', text: @content_item.description %>
<%= render 'components/notice', @content_item.withdrawal_notice_component %>
</div>
</div>

<% if @content_item.further_information.present? %>
<p>
<%= @content_item.further_information %>
</p>
<div class="grid-row ">
<div class="column-two-thirds">
<%= render "components/contents-list-with-body", contents: @content_item.contents do %>
<div class="responsive-bottom-margin">
<%= render 'govuk_component/govspeak', content: "#{@content_item.body}#{@additional_body}" %>
</div>
<% end %>
<% end %>
<% end %>

<%= render 'shared/sidebar_contents_with_body',
content_item: @content_item,
body: "#{@content_item.body}#{@additional_body}" %>
</div>
</div>
</div>

0 comments on commit ca9ab11

Please sign in to comment.