From de01cc9c00acda7e18f4fc943636d45eb89e77bb Mon Sep 17 00:00:00 2001 From: Brenda Wallace Date: Wed, 23 Jan 2019 21:57:21 +1300 Subject: [PATCH] Tidy up member edit buttons --- app/views/members/show.html.haml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/app/views/members/show.html.haml b/app/views/members/show.html.haml index 621f35c51..a786b8077 100644 --- a/app/views/members/show.html.haml +++ b/app/views/members/show.html.haml @@ -7,11 +7,17 @@ = tag("meta", property: "og:type", content: "profile") = tag("meta", property: "og:url", content: request.original_url) = tag("meta", property: "og:site_name", content: ENV['GROWSTUFF_SITE_NAME']) + + - content_for :buttonbar do - - if can? :update, @member - = link_to 'Edit profile', edit_member_registration_path, class: 'btn btn-default pull-right' - - if can?(:create, Notification) && current_member != @member - = link_to 'Send message', new_notification_path(recipient_id: @member.id), class: 'btn btn-default pull-right' + %p.btn-group + - if can? :update, @member + = link_to edit_member_registration_path, class: 'btn btn-default pull-right' do + = edit_icon + = t('members.edit_profile') + + - if can?(:create, Notification) && current_member != @member + = link_to 'Send message', new_notification_path(recipient_id: @member.id), class: 'btn btn-default' - if current_member && current_member != @member # must be logged in, can't follow yourself - follow = current_member.get_follow(@member)