Skip to content
Browse files

Featured news on organisation page should have featured_carousel clas…

…s to be laid out correctly.
  • Loading branch information...
1 parent 16debb6 commit 09367754afd792359448fe2f822b2be219104566 Jason Cale committed Jan 31, 2012
Showing with 15 additions and 19 deletions.
  1. +15 −19 app/views/organisations/show.html.erb
View
34 app/views/organisations/show.html.erb
@@ -57,29 +57,25 @@
<div class="g3f">
<section class="org_news">
<h1>Organisation news</h1>
-
- <% if @featured_news_articles.any? %>
-
- <section class="featured_items" id="featured-news-articles">
- <% @featured_news_articles.each do |news_article| %>
- <%= content_tag_for(:article, news_article) do %>
- <h2><%= link_to news_article.title, public_document_path(news_article), class: "title" %></h2>
- <p class="summary"><%= news_article.summary %></p>
- <div class="meta">
- <span class="published_at">Posted <%= time_ago(news_article.published_at, class: 'published_at') %> ago</span>
- <% news_article.policy_areas.uniq.each do |pa| %>
- <%= link_to pa.name, policy_area_path(pa), class: "policy_area" %>
+ <% if @featured_news_articles.any? %>
+ <section class="featured_carousel" id="featured-news-articles">
+ <% @featured_news_articles.each do |news_article| %>
+ <%= content_tag_for(:article, news_article) do %>
+ <h2><%= link_to news_article.title, public_document_path(news_article), class: "title" %></h2>
+ <p class="summary"><%= news_article.summary %></p>
+ <div class="meta">
+ <span class="published_at">Posted <%= time_ago(news_article.published_at, class: 'published_at') %> ago</span>
+ <% news_article.policy_areas.uniq.each do |pa| %>
+ <%= link_to pa.name, policy_area_path(pa), class: "policy_area" %>
+ <% end %>
+ </div>
<% end %>
- </div>
- <% end %>
+ <% end %>
+ </section>
<% end %>
- </section>
- <% end %>
-
- <p class="further_articles all_news">View all <%= @organisation.name %> <%= link_to "news", news_organisation_path(@organisation), title: "View all #{@organisation.name} news" %></p>
+ <p class="further_articles all_news">View all <%= @organisation.name %> <%= link_to "news", news_organisation_path(@organisation), title: "View all #{@organisation.name} news" %></p>
</section>
-
<div class="g1 related_documents"><%= render partial: "documents/policy_areas", object: @organisation.policy_areas %></div>
<div class="g1 related_documents"><%= render partial: "documents/policies", object: @policies %></div>
<div class="g1 related_documents"><%= render partial: "documents/publications", object: @publications %></div>

0 comments on commit 0936775

Please sign in to comment.
Something went wrong with that request. Please try again.