Commit 6743ecec597000315007b51bc3e45ea9c58cbaa7

Authored by Dmitriy Zaporozhets
1 parent 6350b32a

Fix redirects. Add link to new team and new group

app/controllers/admin/teams_controller.rb
@@ -47,7 +47,7 @@ class Admin::TeamsController < Admin::ApplicationController @@ -47,7 +47,7 @@ class Admin::TeamsController < Admin::ApplicationController
47 def destroy 47 def destroy
48 user_team.destroy 48 user_team.destroy
49 49
50 - redirect_to admin_user_teams_path, notice: 'Team of users was successfully deleted.' 50 + redirect_to admin_teams_path, notice: 'Team of users was successfully deleted.'
51 end 51 end
52 52
53 protected 53 protected
app/controllers/teams_controller.rb
@@ -28,7 +28,7 @@ class TeamsController < ApplicationController @@ -28,7 +28,7 @@ class TeamsController < ApplicationController
28 28
29 def destroy 29 def destroy
30 user_team.destroy 30 user_team.destroy
31 - redirect_to teams_path 31 + redirect_to dashboard_path
32 end 32 end
33 33
34 def new 34 def new
app/views/projects/_new_form.html.haml
@@ -15,12 +15,20 @@ @@ -15,12 +15,20 @@
15 %span Namespace 15 %span Namespace
16 .input 16 .input
17 = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'} 17 = f.select :namespace_id, namespaces_options(params[:namespace_id] || :current_user), {}, {class: 'chosen'}
18 - - elsif current_user.can_create_group? 18 +
  19 + %p.padded
  20 + New projects are private by default. You choose who can see the project and commit to repository.
  21 + %hr
  22 +
  23 + - if current_user.can_create_group?
19 .clearfix 24 .clearfix
20 .input.light 25 .input.light
21 - Need a group for several projects? 26 + Need a group for several dependent projects?
22 = link_to new_group_path, class: "btn very_small" do 27 = link_to new_group_path, class: "btn very_small" do
23 Create a group 28 Create a group
24 - %hr  
25 - %p.padded  
26 - New projects are private by default. You choose who can see the project and commit to repository. 29 + - if current_user.can_create_team?
  30 + .clearfix
  31 + .input.light
  32 + Want to share a team between projects?
  33 + = link_to new_team_path, class: "btn very_small" do
  34 + Create a team