diff app/views/news/_news.rhtml @ 374:dcfde3922ec2 feature_126

Turn general News box on site front page into a Site News box (#126)
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Fri, 01 Apr 2011 16:11:30 +0100
parents 30f68ecfdde4
children
line wrap: on
line diff
--- a/app/views/news/_news.rhtml	Fri Apr 01 12:22:58 2011 +0100
+++ b/app/views/news/_news.rhtml	Fri Apr 01 16:11:30 2011 +0100
@@ -1,7 +1,8 @@
 <div id="news">
 <dt>
 <span class="time"><%= format_time(news.created_on) %></span>
-<% if !@project %>
+<% project ||= @project %>
+<% if !project %>
 <span class="project"><%= link_to_project(news.project) %></span>
 <% end %>
 <span class="headline"><%= link_to h(news.title), news_path(news) %></span>