display message count on mailing_lists/messages

git-svn-id: http://redmine.rubyforge.org/svn/branches/work@273 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2007-02-25 19:39:43 +00:00
parent 1a41d1aab4
commit da9cb496e8
4 changed files with 13 additions and 0 deletions
@@ -35,6 +35,7 @@ class MailingListsController < ApplicationController
@date_from = Date.civil(@year, @month, 1)
@date_to = (@date_from >> 1)-1
@message_count = @mailing_list.messages.count(:conditions => ["sent_on>=? and sent_on<=?", @date_from, @date_to])
@messages = @mailing_list.messages.find(:all, :conditions => ["parent_id is null and sent_on>=? and sent_on<=?", @date_from, @date_to])
render :layout => false if request.xhr?
end