Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
95bd93fe
Commit
95bd93fe
authored
Sep 16, 2012
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove Projects#team action
Uses TeamMembers#index instead, to be more RESTful
parent
8cfb197d
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
13 additions
and
20 deletions
+13
-20
app/controllers/team_members_controller.rb
app/controllers/team_members_controller.rb
+3
-3
app/helpers/application_helper.rb
app/helpers/application_helper.rb
+1
-1
app/helpers/tab_helper.rb
app/helpers/tab_helper.rb
+1
-1
app/views/projects/_project_head.html.haml
app/views/projects/_project_head.html.haml
+2
-2
app/views/team_members/_form.html.haml
app/views/team_members/_form.html.haml
+1
-1
app/views/team_members/_team.html.haml
app/views/team_members/_team.html.haml
+0
-0
app/views/team_members/index.html.haml
app/views/team_members/index.html.haml
+2
-4
app/views/team_members/show.html.haml
app/views/team_members/show.html.haml
+1
-1
config/routes.rb
config/routes.rb
+1
-1
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+1
-1
spec/routing/routing_spec.rb
spec/routing/routing_spec.rb
+0
-5
No files found.
app/controllers/team_members_controller.rb
View file @
95bd93fe
...
@@ -22,7 +22,7 @@ class TeamMembersController < ApplicationController
...
@@ -22,7 +22,7 @@ class TeamMembersController < ApplicationController
params
[
:project_access
]
params
[
:project_access
]
)
)
redirect_to
team_project
_path
(
@project
)
redirect_to
project_team_index
_path
(
@project
)
end
end
def
update
def
update
...
@@ -32,7 +32,7 @@ class TeamMembersController < ApplicationController
...
@@ -32,7 +32,7 @@ class TeamMembersController < ApplicationController
unless
@team_member
.
valid?
unless
@team_member
.
valid?
flash
[
:alert
]
=
"User should have at least one role"
flash
[
:alert
]
=
"User should have at least one role"
end
end
redirect_to
team_project
_path
(
@project
)
redirect_to
project_team_index
_path
(
@project
)
end
end
def
destroy
def
destroy
...
@@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
...
@@ -40,7 +40,7 @@ class TeamMembersController < ApplicationController
@team_member
.
destroy
@team_member
.
destroy
respond_to
do
|
format
|
respond_to
do
|
format
|
format
.
html
{
redirect_to
team_project
_path
(
@project
)
}
format
.
html
{
redirect_to
project_team_index
_path
(
@project
)
}
format
.
js
{
render
nothing:
true
}
format
.
js
{
render
nothing:
true
}
end
end
end
end
...
...
app/helpers/application_helper.rb
View file @
95bd93fe
...
@@ -62,7 +62,7 @@ module ApplicationHelper
...
@@ -62,7 +62,7 @@ module ApplicationHelper
{
label:
"
#{
@project
.
name
}
/ Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Wall"
,
url:
wall_project_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Tree"
,
url:
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Tree"
,
url:
tree_project_ref_path
(
@project
,
@project
.
root_ref
)
},
{
label:
"
#{
@project
.
name
}
/ Commits"
,
url:
project_commits_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Commits"
,
url:
project_commits_path
(
@project
)
},
{
label:
"
#{
@project
.
name
}
/ Team"
,
url:
team_project
_path
(
@project
)
}
{
label:
"
#{
@project
.
name
}
/ Team"
,
url:
project_team_index
_path
(
@project
)
}
]
]
end
end
...
...
app/helpers/tab_helper.rb
View file @
95bd93fe
...
@@ -8,7 +8,7 @@ module TabHelper
...
@@ -8,7 +8,7 @@ module TabHelper
end
end
def
project_tab_class
def
project_tab_class
[
:show
,
:files
,
:
team
,
:
edit
,
:update
].
each
do
|
action
|
[
:show
,
:files
,
:edit
,
:update
].
each
do
|
action
|
return
"current"
if
current_page?
(
controller:
"projects"
,
action:
action
,
id:
@project
)
return
"current"
if
current_page?
(
controller:
"projects"
,
action:
action
,
id:
@project
)
end
end
...
...
app/views/projects/_project_head.html.haml
View file @
95bd93fe
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
=
link_to
project_path
(
@project
),
class:
"activities-tab tab"
do
=
link_to
project_path
(
@project
),
class:
"activities-tab tab"
do
%i
.icon-home
%i
.icon-home
Show
Show
%li
{
class:
" #{'active' if (controller.controller_name == "
team_members
") || current_page?(
team_project
_path(@project)) }"
}
%li
{
class:
" #{'active' if (controller.controller_name == "
team_members
") || current_page?(
project_team_index
_path(@project)) }"
}
=
link_to
team_project
_path
(
@project
),
class:
"team-tab tab"
do
=
link_to
project_team_index
_path
(
@project
),
class:
"team-tab tab"
do
%i
.icon-user
%i
.icon-user
Team
Team
%li
{
class:
"#{'active' if current_page?(files_project_path(@project)) }"
}
%li
{
class:
"#{'active' if current_page?(files_project_path(@project)) }"
}
...
...
app/views/team_members/_form.html.haml
View file @
95bd93fe
...
@@ -20,4 +20,4 @@
...
@@ -20,4 +20,4 @@
.actions
.actions
=
f
.
submit
'Save'
,
class:
"btn save-btn"
=
f
.
submit
'Save'
,
class:
"btn save-btn"
=
link_to
"Cancel"
,
team_project
_path
(
@project
),
class:
"btn cancel-btn"
=
link_to
"Cancel"
,
project_team_index
_path
(
@project
),
class:
"btn cancel-btn"
app/views/
project
s/_team.html.haml
→
app/views/
team_member
s/_team.html.haml
View file @
95bd93fe
File moved
app/views/
projects/team
.html.haml
→
app/views/
team_members/index
.html.haml
View file @
95bd93fe
=
render
"project_head"
=
render
"project
s/project
_head"
%h3
.page_title
%h3
.page_title
Team Members
Team Members
%small
(
#{
@project
.
users_projects
.
count
}
)
%small
(
#{
@project
.
users_projects
.
count
}
)
...
@@ -10,6 +10,4 @@
...
@@ -10,6 +10,4 @@
Read more about project permissions
Read more about project permissions
%strong
=
link_to
"here"
,
help_permissions_path
,
class:
"vlink"
%strong
=
link_to
"here"
,
help_permissions_path
,
class:
"vlink"
=
render
partial:
"team_members/team"
,
locals:
{
project:
@project
}
=
render
partial:
"team"
,
locals:
{
project:
@project
}
app/views/team_members/show.html.haml
View file @
95bd93fe
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
%hr
%hr
.back_link
.back_link
%br
%br
=
link_to
team_project
_path
(
@project
),
class:
""
do
=
link_to
project_team_index
_path
(
@project
),
class:
""
do
←
To team list
←
To team list
%br
%br
.row
.row
...
...
config/routes.rb
View file @
95bd93fe
...
@@ -90,7 +90,6 @@ Gitlab::Application.routes.draw do
...
@@ -90,7 +90,6 @@ Gitlab::Application.routes.draw do
#
#
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
except:
[
:new
,
:create
,
:index
],
path:
"/"
do
resources
:projects
,
constraints:
{
id:
/[^\/]+/
},
except:
[
:new
,
:create
,
:index
],
path:
"/"
do
member
do
member
do
get
"team"
get
"wall"
get
"wall"
get
"graph"
get
"graph"
get
"files"
get
"files"
...
@@ -192,6 +191,7 @@ Gitlab::Application.routes.draw do
...
@@ -192,6 +191,7 @@ Gitlab::Application.routes.draw do
get
:patch
get
:patch
end
end
end
end
resources
:team
,
controller:
'team_members'
,
only:
[
:index
]
resources
:team_members
resources
:team_members
resources
:milestones
resources
:milestones
resources
:labels
,
only:
[
:index
]
resources
:labels
,
only:
[
:index
]
...
...
features/steps/shared/paths.rb
View file @
95bd93fe
...
@@ -98,7 +98,7 @@ module SharedPaths
...
@@ -98,7 +98,7 @@ module SharedPaths
end
end
Then
'I visit project "Shop" team page'
do
Then
'I visit project "Shop" team page'
do
visit
team_project
_path
(
Project
.
find_by_name
(
"Shop"
))
visit
project_team_index
_path
(
Project
.
find_by_name
(
"Shop"
))
end
end
Then
'I visit project "Shop" wall page'
do
Then
'I visit project "Shop" wall page'
do
...
...
spec/routing/routing_spec.rb
View file @
95bd93fe
...
@@ -227,7 +227,6 @@ end
...
@@ -227,7 +227,6 @@ end
# projects POST /projects(.:format) projects#create
# projects POST /projects(.:format) projects#create
# new_project GET /projects/new(.:format) projects#new
# new_project GET /projects/new(.:format) projects#new
# team_project GET /:id/team(.:format) projects#team
# wall_project GET /:id/wall(.:format) projects#wall
# wall_project GET /:id/wall(.:format) projects#wall
# graph_project GET /:id/graph(.:format) projects#graph
# graph_project GET /:id/graph(.:format) projects#graph
# files_project GET /:id/files(.:format) projects#files
# files_project GET /:id/files(.:format) projects#files
...
@@ -244,10 +243,6 @@ describe ProjectsController, "routing" do
...
@@ -244,10 +243,6 @@ describe ProjectsController, "routing" do
get
(
"/projects/new"
).
should
route_to
(
'projects#new'
)
get
(
"/projects/new"
).
should
route_to
(
'projects#new'
)
end
end
it
"to #team"
do
get
(
"/gitlabhq/team"
).
should
route_to
(
'projects#team'
,
id:
'gitlabhq'
)
end
it
"to #wall"
do
it
"to #wall"
do
get
(
"/gitlabhq/wall"
).
should
route_to
(
'projects#wall'
,
id:
'gitlabhq'
)
get
(
"/gitlabhq/wall"
).
should
route_to
(
'projects#wall'
,
id:
'gitlabhq'
)
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment