diff options
author | Drew Blessing <drew.blessing@buckle.com> | 2013-12-02 12:03:07 -0600 |
---|---|---|
committer | Drew Blessing <drew.blessing@buckle.com> | 2013-12-02 16:20:34 -0600 |
commit | b08608b261f8c9c552d8957b6231c7725b9529ac (patch) | |
tree | 566e2ba56ae1ed23305ea5e897f859e8e782a29b /app/views/profiles/show.html.haml | |
parent | e411f3bab2c20ba22b838bb025fa33e980470d20 (diff) | |
download | gitlab-ce-b08608b261f8c9c552d8957b6231c7725b9529ac.tar.gz |
Issue 5716 - Allow removal of avatar
Add class and style
Add spinach tests
Add entry to CHANGELOG
Add entry to CHANGELOG
Diffstat (limited to 'app/views/profiles/show.html.haml')
-rw-r--r-- | app/views/profiles/show.html.haml | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/app/views/profiles/show.html.haml b/app/views/profiles/show.html.haml index c22e00d3d77..69fc7b62c5d 100644 --- a/app/views/profiles/show.html.haml +++ b/app/views/profiles/show.html.haml @@ -59,9 +59,14 @@ .clearfix .profile-avatar-form-option %p.light - You can upload an avatar here - %br - or change it at #{link_to "gravatar.com", "http://gravatar.com"} + - if @user.avatar? + You can change your avatar here + %br + or remove the current avatar to revert to #{link_to "gravatar.com", "http://gravatar.com"} + - else + You can upload an avatar here + %br + or change it at #{link_to "gravatar.com", "http://gravatar.com"} %hr %a.choose-btn.btn.btn-small.js-choose-user-avatar-button %i.icon-paper-clip @@ -70,6 +75,8 @@ %span.file_name.js-avatar-filename File name... = f.file_field :avatar, class: "js-user-avatar-input hide" %span.help-block The maximum file size allowed is 100KB. + - if @user.avatar? + = link_to 'Remove avatar', profile_avatar_path, confirm: "Avatar will be removed. Are you sure?", method: :delete, class: "btn btn-remove remove_avatar" .form-actions - = f.submit 'Save changes', class: "btn btn-save" + = f.submit 'Save changes', class: "btn btn-save"
\ No newline at end of file |