Display user's gravatar when editing profile (#5899).

Patch by Go MAEDA.


git-svn-id: http://svn.redmine.org/redmine/trunk@18180 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2019-05-20 08:51:04 +00:00
parent c341b62fed
commit da78e654f1
2 changed files with 8 additions and 2 deletions

View File

@@ -5,6 +5,9 @@
<%= delete_link user_path(@user) if User.current != @user %>
</div>
<%= title [l(:label_user_plural), users_path], @user.login %>
<%=
page_title = title [l(:label_user_plural), users_path], @user.login
page_title.insert(page_title.rindex(' ') + 1, avatar(@user))
%>
<%= render_tabs user_settings_tabs %>

View File

@@ -420,8 +420,11 @@ class UsersControllerTest < Redmine::ControllerTest
def test_edit
get :edit, :params => {:id => 2}
with_settings :gravatar_enabled => '1' do
get :edit, :params => {:id => 2}
end
assert_response :success
assert_select 'h2>a+img.gravatar'
assert_select 'input[name=?][value=?]', 'user[login]', 'jsmith'
end