Commit 6743ecec authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix redirects. Add link to new team and new group

parent 6350b32a
...@@ -47,7 +47,7 @@ class Admin::TeamsController < Admin::ApplicationController ...@@ -47,7 +47,7 @@ class Admin::TeamsController < Admin::ApplicationController
def destroy def destroy
user_team.destroy user_team.destroy
redirect_to admin_user_teams_path, notice: 'Team of users was successfully deleted.' redirect_to admin_teams_path, notice: 'Team of users was successfully deleted.'
end end
protected protected
......
...@@ -28,7 +28,7 @@ class TeamsController < ApplicationController ...@@ -28,7 +28,7 @@ class TeamsController < ApplicationController
def destroy def destroy
user_team.destroy user_team.destroy
redirect_to teams_path redirect_to dashboard_path
end end
def new def new
......
...@@ -15,12 +15,20 @@ ...@@ -15,12 +15,20 @@
%span Namespace %span Namespace
.input .input
= f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'} = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
- elsif current_user.can_create_group?
%p.padded
New projects are private by default. You choose who can see the project and commit to repository.
%hr
- if current_user.can_create_group?
.clearfix .clearfix
.input.light .input.light
Need a group for several projects? Need a group for several dependent projects?
= link_to new_group_path, class: "btn very_small" do = link_to new_group_path, class: "btn very_small" do
Create a group Create a group
%hr - if current_user.can_create_team?
%p.padded .clearfix
New projects are private by default. You choose who can see the project and commit to repository. .input.light
Want to share a team between projects?
= link_to new_team_path, class: "btn very_small" do
Create a team
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