# HG changeset patch # User Chris Cannam # Date 1301909470 -3600 # Node ID 6627ac1de32be1b44255b3b112ddb0675c6ad5e1 # Parent 0802551af0a58e626bb86a54ef2611213e4afca9# Parent f25c73364bfb9577aea1e955142ea350201fb506 Merge from branch "cannam-pre-20110113-merge" (includes merge from feature_121) diff -r 0802551af0a5 -r 6627ac1de32b app/views/activities/_recent.rhtml --- a/app/views/activities/_recent.rhtml Fri Apr 01 17:24:48 2011 +0100 +++ b/app/views/activities/_recent.rhtml Mon Apr 04 10:31:10 2011 +0100 @@ -2,13 +2,21 @@ <% max = 5 %> <% if (events.nil?) activity = Redmine::Activity::Fetcher.new(User.current, :project => @project) + if @project # Don't show news (duplicated with News box) or wiki edits (too # tedious) in project front page activity.scope = [ "changesets", "files", "issues", "documents" ] end + + events = activity.events(Date.today - 28, Date.today + 1) + + if defined? user + events = events.select { |e| user.member_of? e.project } + end + + events = events.first(max) - events = activity.events(Date.today - 28, Date.today + 1).first(max) end %> diff -r 0802551af0a5 -r 6627ac1de32b app/views/my/blocks/_activitymyprojects.rhtml --- a/app/views/my/blocks/_activitymyprojects.rhtml Fri Apr 01 17:24:48 2011 +0100 +++ b/app/views/my/blocks/_activitymyprojects.rhtml Mon Apr 04 10:31:10 2011 +0100 @@ -1,4 +1,4 @@ -<%= render :partial => 'activities/recent' %> +<%= render :partial => 'activities/recent', :locals => { :user => User.current } %>