comparison app/controllers/welcome_controller.rb @ 443:350acce374a2 cannam

Merge from branch "cannam-pre-20110113-merge"
author Chris Cannam
date Mon, 06 Jun 2011 14:55:38 +0100
parents dcfde3922ec2
children 5e80956cc792
comparison
equal deleted inserted replaced
442:753f1380d6bc 443:350acce374a2
16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 16 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 17
18 class WelcomeController < ApplicationController 18 class WelcomeController < ApplicationController
19 caches_action :robots 19 caches_action :robots
20 20
21 include ProjectsHelper
22 helper :projects
23
21 def index 24 def index
22 @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
23 @projects = Project.latest User.current 28 @projects = Project.latest User.current
24 29
25 # tests if user is logged in to gfenerate the tips of the day list 30 # tests if user is logged in to generate the tips of the day list
26 if User.current.logged? 31 if User.current.logged?
27 @tipsoftheday = Setting.tipoftheday_text 32 @tipsoftheday = Setting.tipoftheday_text
28 else 33 else
29 @tipsoftheday = '' 34 @tipsoftheday = ''
30 end 35 end