comparison app/helpers/activities_helper.rb @ 1222:2c59ee348e2b cannam

Logger, reinstate this box as default
author Chris Cannam <chris.cannam@soundsoftware.ac.uk>
date Tue, 12 Mar 2013 14:39:44 +0000
parents 3286032e15cf
children 30c444ea1338
comparison
equal deleted inserted replaced
1221:658b403da20a 1222:2c59ee348e2b
59 59
60 def render_active_colleagues(colleagues) 60 def render_active_colleagues(colleagues)
61 61
62 s = "" 62 s = ""
63 63
64 start = Time.now
65
64 for c in colleagues 66 for c in colleagues
65 u = User.find_by_id(c) 67 u = User.find_by_id(c)
66 active_projects = projects_by_activity(u, 3) 68 active_projects = projects_by_activity(u, 3)
67 if !active_projects.empty? 69 if !active_projects.empty?
68 s << "<div class='active-person'>" 70 s << "<div class='active-person'>"
80 s << (active_projects.map { |p| link_to_project(p) }.join ", ") 82 s << (active_projects.map { |p| link_to_project(p) }.join ", ")
81 s << "</span>" 83 s << "</span>"
82 s << "</div>" 84 s << "</div>"
83 end 85 end
84 end 86 end
87
88 finish = Time.now
89 logger.info "render_active_colleagues: took #{finish-start}"
85 90
86 if s != "" 91 if s != ""
87 s 92 s
88 else 93 else
89 l(:label_no_active_colleagues) 94 l(:label_no_active_colleagues)