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 47 def destroy
48 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 51 end
52 52  
53 53 protected
... ...
app/controllers/teams_controller.rb
... ... @@ -28,7 +28,7 @@ class TeamsController < ApplicationController
28 28  
29 29 def destroy
30 30 user_team.destroy
31   - redirect_to teams_path
  31 + redirect_to dashboard_path
32 32 end
33 33  
34 34 def new
... ...
app/views/projects/_new_form.html.haml
... ... @@ -15,12 +15,20 @@
15 15 %span Namespace
16 16 .input
17 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 24 .clearfix
20 25 .input.light
21   - Need a group for several projects?
  26 + Need a group for several dependent projects?
22 27 = link_to new_group_path, class: "btn very_small" do
23 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
... ...