Mudancas no dashboard, calendario e noticias

This commit is contained in:
2008-03-04 07:05:15 -03:00
parent 9461dcaf66
commit 11473aa23a
16 changed files with 155 additions and 216 deletions

View File

@@ -112,9 +112,9 @@ class UsersController < ApplicationController
unless @current_user.courses.empty?
@news = News.find(:all, :conditions => [ 'receiver_id in (?)', @current_user.courses ],
:order => 'timestamp desc')
:order => 'timestamp desc', :limit => 5)
@events = Event.find(:all, :conditions => [ 'course_id in (?) and (date > ?) and (date < ?)',
@current_user.courses, 1.day.ago, 14.days.from_now ], :order => 'date, time')
@current_user.courses, 1.day.ago, 21.days.from_now ], :order => 'date')
end
end