mirror of
https://github.com/meineerde/redmine.git
synced 2025-12-24 09:21:12 +00:00
Preload email addresses for displaying avatars.
git-svn-id: http://svn.redmine.org/redmine/trunk@15624 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
82158fb724
commit
0a8fe4e552
@ -93,9 +93,10 @@ class IssuesController < ApplicationController
|
||||
end
|
||||
|
||||
def show
|
||||
@journals = @issue.journals.includes(:user, :details).
|
||||
references(:user, :details).
|
||||
reorder(:created_on, :id).to_a
|
||||
@journals = @issue.journals.
|
||||
preload(:details).
|
||||
preload(:user => :email_address).
|
||||
reorder(:created_on, :id).to_a
|
||||
@journals.each_with_index {|j,i| j.indice = i+1}
|
||||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
||||
Journal.preload_journals_details_custom_fields(@journals)
|
||||
|
||||
@ -47,7 +47,7 @@ module WatchersHelper
|
||||
def watchers_list(object)
|
||||
remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
|
||||
content = ''.html_safe
|
||||
lis = object.watcher_users.collect do |user|
|
||||
lis = object.watcher_users.preload(:email_address).collect do |user|
|
||||
s = ''.html_safe
|
||||
s << avatar(user, :size => "16").to_s
|
||||
s << link_to_user(user, :class => 'user')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user