Commit be0b3cc1 authored by Jose Ivan Vargas's avatar Jose Ivan Vargas

Changed "Edit Group" subtab to "General" and moved it

to the first option inside said subtab.

Also code cleanup
parent 30f99608
- can_admin_group = can?(current_user, :admin_group, @group)
- can_edit = can?(current_user, :admin_group, @group)
= content_for :sub_nav do
.scrolling-tabs-container.sub-nav-scroll
= render 'shared/nav_scroll'
.nav-links.sub-nav.scrolling-tabs
%ul{ class: container_class }
= nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group), title: 'General' do
%span
General
= nav_link(path: 'groups#projects') do
= link_to projects_group_path(@group), title: 'Projects' do
%span
Projects
- if can_edit && can_admin_group
= nav_link(path: 'groups#edit') do
= link_to edit_group_path(@group), title: 'Edit Group' do
%span
Edit Group
- can_admin_group = can?(current_user, :admin_group, @group)
.scrolling-tabs-container{ class: nav_control_class }
.fade-left
= icon('angle-left')
......@@ -25,8 +24,8 @@
= link_to group_group_members_path(@group), title: 'Members' do
%span
Members
- if current_user && can_admin_group
- if current_user && can?(current_user, :admin_group, @group)
= nav_link(path: %w[groups#projects groups#edit]) do
= link_to projects_group_path(@group), title: 'Settings' do
= link_to edit_group_path(@group), title: 'Settings' do
%span
Settings
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