# HG changeset patch # User Chris Cannam # Date 1363094659 0 # Node ID 658b403da20a3afb43f26273642fc3e285570384 # Parent 875b5b4c574d8b356f41f1c0bfc0b37e6ba944cb# Parent 3286032e15cf8586944489aa76aaea44666a4969 Merge diff -r 875b5b4c574d -r 658b403da20a app/helpers/activities_helper.rb --- a/app/helpers/activities_helper.rb Tue Mar 12 13:01:36 2013 +0000 +++ b/app/helpers/activities_helper.rb Tue Mar 12 13:24:19 2013 +0000 @@ -47,9 +47,10 @@ # Return up to count of the user's projects ordered by that user's # recent activity, omitting any projects for which no activity - # occurred in the recent past + # occurred in the recent past and any projects not visible to + # the current user - activity = Redmine::Activity::Fetcher.new(user, :author => user) + activity = Redmine::Activity::Fetcher.new(User.current, :author => user) days = Setting.activity_days_default.to_i events = activity.events(Date.today - days, Date.today + 1) projhash = project_activity_on_events(events) @@ -64,15 +65,20 @@ u = User.find_by_id(c) active_projects = projects_by_activity(u, 3) if !active_projects.empty? - s << "
" - s << link_to_user(u) - s << "" - s << h(u.ssamr_user_detail.institution_name) + s << "
" + s << avatar(u, :size => '24') + s << "" + s << h(u.name) s << "" - s << "
" - s << "
" - s << l(:label_working_in) << " " + if !u.ssamr_user_detail.nil? + s << " - " + s << h(u.ssamr_user_detail.institution_name) + s << "" + end + s << "
" + s << "" s << (active_projects.map { |p| link_to_project(p) }.join ", ") + s << "" s << "
" end end diff -r 875b5b4c574d -r 658b403da20a app/views/my/blocks/_colleagues.html.erb --- a/app/views/my/blocks/_colleagues.html.erb Tue Mar 12 13:01:36 2013 +0000 +++ b/app/views/my/blocks/_colleagues.html.erb Tue Mar 12 13:24:19 2013 +0000 @@ -3,7 +3,7 @@ <% if !colleagues.empty? %>

<%=l(:label_my_colleagues)%>

-
+
<%= render_active_colleagues(colleagues) %>
<% end %> diff -r 875b5b4c574d -r 658b403da20a public/stylesheets/application.css --- a/public/stylesheets/application.css Tue Mar 12 13:01:36 2013 +0000 +++ b/public/stylesheets/application.css Tue Mar 12 13:24:19 2013 +0000 @@ -1033,7 +1033,7 @@ vertical-align: top; } -#activity dt img.gravatar, #members dt img.gravatar { +#activity dt img.gravatar, #members dt img.gravatar, #active-colleagues img.gravatar { float: left; margin: 0 1em 1em 0; }