Mercurial > hg > soundsoftware-site
comparison app/helpers/activities_helper.rb @ 1519:afce8026aaeb redmine-2.4-integration
Merge from branch "live"
author | Chris Cannam |
---|---|
date | Tue, 09 Sep 2014 09:34:53 +0100 |
parents | c86dacc2ef0a 1c7af51e9409 |
children |
comparison
equal
deleted
inserted
replaced
1518:2e8063097240 | 1519:afce8026aaeb |
---|---|
166 def busy_institutions(events, count) | 166 def busy_institutions(events, count) |
167 authors = events.map do |e| | 167 authors = events.map do |e| |
168 e.event_author unless !e.respond_to?(:event_author) | 168 e.event_author unless !e.respond_to?(:event_author) |
169 end.compact | 169 end.compact |
170 institutions = authors.map do |a| | 170 institutions = authors.map do |a| |
171 if a.respond_to?(:ssamr_user_detail) and !a.ssamr_user_detail.nil? | 171 if a.respond_to?(:ssamr_user_detail) and !a.ssamr_user_detail.nil? and a.ssamr_user_detail.institution_name != "none" |
172 a.ssamr_user_detail.institution_name | 172 a.ssamr_user_detail.institution_name |
173 end | 173 end |
174 end | 174 end |
175 insthash = institutions.compact.sort.group_by { |i| i } | 175 insthash = institutions.compact.sort.group_by { |i| i } |
176 insthash = insthash.merge(insthash) { |k,v| v.length } | 176 insthash = insthash.merge(insthash) { |k,v| v.length } |