Commit 5a8b8ba6 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix group settings dropdown for group members and visitors

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 4bef939e
- if current_user - if current_user
.controls - if access = @group.users.find_by(id: current_user.id)
%span.dropdown.group-settings-dropdown .controls
%a.dropdown-new.btn.btn-gray#group-settings-button{href: '#', 'data-toggle' => 'dropdown'} %span.dropdown.group-settings-dropdown
= icon('cog') %a.dropdown-new.btn.btn-gray#group-settings-button{href: '#', 'data-toggle' => 'dropdown'}
= icon('caret-down') = icon('cog')
%ul.dropdown-menu.dropdown-menu-align-right = icon('caret-down')
= nav_link(path: 'groups#projects') do %ul.dropdown-menu.dropdown-menu-align-right
= link_to projects_group_path(@group), title: 'Projects' do - if can?(current_user, :admin_group, @group)
Projects = nav_link(path: 'groups#projects') do
%li.divider = link_to projects_group_path(@group), title: 'Projects' do
- if can?(current_user, :admin_group, @group) Projects
%li %li.divider
= link_to edit_group_path(@group) do %li
Edit Group = link_to edit_group_path(@group) do
- if access = @group.users.find_by(id: current_user.id) Edit Group
%li %li
= link_to leave_group_group_members_path(@group), = link_to leave_group_group_members_path(@group),
data: { confirm: leave_group_message(@group.name) }, method: :delete, title: 'Leave group' do data: { confirm: leave_group_message(@group.name) }, method: :delete, title: 'Leave group' do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment