Skip to content

Commit

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

Revert "Move corporate information page to universal layout"
  • Loading branch information
David Henry authored Jan 16, 2018
2 parents 0115b01 + 5016b54 commit 7d855b3
Showing 1 changed file with 28 additions and 43 deletions.
71 changes: 28 additions & 43 deletions app/views/content_items/corporate_information_page.html.erb
Original file line number Diff line number Diff line change
@@ -1,51 +1,36 @@
<% @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-two-thirds">
<div class="column-quarter">
<%= render 'govuk_component/organisation_logo', @content_item.organisation_logo %>
</div>
</div>
<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>
<%= 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 %>

<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>
<% @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>
</div>

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

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

0 comments on commit 7d855b3

Please sign in to comment.