mirror of
https://github.com/meineerde/redmine.git
synced 2026-03-27 19:21:11 +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
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
@journals = @issue.journals.includes(:user, :details).
|
@journals = @issue.journals.
|
||||||
references(:user, :details).
|
preload(:details).
|
||||||
reorder(:created_on, :id).to_a
|
preload(:user => :email_address).
|
||||||
|
reorder(:created_on, :id).to_a
|
||||||
@journals.each_with_index {|j,i| j.indice = i+1}
|
@journals.each_with_index {|j,i| j.indice = i+1}
|
||||||
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
@journals.reject!(&:private_notes?) unless User.current.allowed_to?(:view_private_notes, @issue.project)
|
||||||
Journal.preload_journals_details_custom_fields(@journals)
|
Journal.preload_journals_details_custom_fields(@journals)
|
||||||
|
|||||||
@ -47,7 +47,7 @@ module WatchersHelper
|
|||||||
def watchers_list(object)
|
def watchers_list(object)
|
||||||
remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
|
remove_allowed = User.current.allowed_to?("delete_#{object.class.name.underscore}_watchers".to_sym, object.project)
|
||||||
content = ''.html_safe
|
content = ''.html_safe
|
||||||
lis = object.watcher_users.collect do |user|
|
lis = object.watcher_users.preload(:email_address).collect do |user|
|
||||||
s = ''.html_safe
|
s = ''.html_safe
|
||||||
s << avatar(user, :size => "16").to_s
|
s << avatar(user, :size => "16").to_s
|
||||||
s << link_to_user(user, :class => 'user')
|
s << link_to_user(user, :class => 'user')
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user