diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-05 17:37:41 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-05-05 17:37:41 +0300 |
commit | 5a8b8ba6c76a74dcad401a627b271b10bb7a1088 (patch) | |
tree | 04c67e3195f140948b5a8961f67dc12338e7f502 /app | |
parent | 4bef939e27d7a6b2df9984f445485207f3dacd43 (diff) |
Fix group settings dropdown for group members and visitors
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app')
-rw-r--r-- | app/views/layouts/nav/_group.html.haml | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/app/views/layouts/nav/_group.html.haml b/app/views/layouts/nav/_group.html.haml index 5c11d3c36c6..dff188e0b15 100644 --- a/app/views/layouts/nav/_group.html.haml +++ b/app/views/layouts/nav/_group.html.haml @@ -1,19 +1,19 @@ - if current_user - .controls - %span.dropdown.group-settings-dropdown - %a.dropdown-new.btn.btn-gray#group-settings-button{href: '#', 'data-toggle' => 'dropdown'} - = icon('cog') - = icon('caret-down') - %ul.dropdown-menu.dropdown-menu-align-right - = nav_link(path: 'groups#projects') do - = link_to projects_group_path(@group), title: 'Projects' do - Projects - %li.divider - - if can?(current_user, :admin_group, @group) - %li - = link_to edit_group_path(@group) do - Edit Group - - if access = @group.users.find_by(id: current_user.id) + - if access = @group.users.find_by(id: current_user.id) + .controls + %span.dropdown.group-settings-dropdown + %a.dropdown-new.btn.btn-gray#group-settings-button{href: '#', 'data-toggle' => 'dropdown'} + = icon('cog') + = icon('caret-down') + %ul.dropdown-menu.dropdown-menu-align-right + - if can?(current_user, :admin_group, @group) + = nav_link(path: 'groups#projects') do + = link_to projects_group_path(@group), title: 'Projects' do + Projects + %li.divider + %li + = link_to edit_group_path(@group) do + Edit Group %li = link_to leave_group_group_members_path(@group), data: { confirm: leave_group_message(@group.name) }, method: :delete, title: 'Leave group' do |