# HG changeset patch
# User Chris Cannam
# Date 1363094645 0
# Node ID 3286032e15cf8586944489aa76aaea44666a4969
# Parent 194867efafa9bb56b0fb91cf7b9f3caad8169afa
Some layout and fixes
diff -r 194867efafa9 -r 3286032e15cf app/helpers/activities_helper.rb
--- a/app/helpers/activities_helper.rb Tue Mar 12 13:00:51 2013 +0000
+++ b/app/helpers/activities_helper.rb Tue Mar 12 13:24:05 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 194867efafa9 -r 3286032e15cf app/views/my/blocks/_colleagues.html.erb
--- a/app/views/my/blocks/_colleagues.html.erb Tue Mar 12 13:00:51 2013 +0000
+++ b/app/views/my/blocks/_colleagues.html.erb Tue Mar 12 13:24:05 2013 +0000
@@ -3,7 +3,7 @@
<% if !colleagues.empty? %>
<%=l(:label_my_colleagues)%>
-
+
<%= render_active_colleagues(colleagues) %>
<% end %>
diff -r 194867efafa9 -r 3286032e15cf public/stylesheets/application.css
--- a/public/stylesheets/application.css Tue Mar 12 13:00:51 2013 +0000
+++ b/public/stylesheets/application.css Tue Mar 12 13:24:05 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;
}