comparison app/controllers/welcome_controller.rb @ 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 ce85aa993384
children 5e80956cc792
comparison
equal deleted inserted replaced
372:bb5e1ca422f8 374:dcfde3922ec2
20 20
21 include ProjectsHelper 21 include ProjectsHelper
22 helper :projects 22 helper :projects
23 23
24 def index 24 def index
25 @news = News.latest User.current 25 @site_project = Project.find_by_identifier "soundsoftware-site"
26 @site_news = []
27 @site_news = News.latest_for @site_project if @site_project
26 @projects = Project.latest User.current 28 @projects = Project.latest User.current
27 29
28 # tests if user is logged in to generate the tips of the day list 30 # tests if user is logged in to generate the tips of the day list
29 if User.current.logged? 31 if User.current.logged?
30 @tipsoftheday = Setting.tipoftheday_text 32 @tipsoftheday = Setting.tipoftheday_text