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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
ba937b2b
Commit
ba937b2b
authored
Feb 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dont show assigned_teams block unless any. Show count in filter
parent
a29db26c
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
17 additions
and
17 deletions
+17
-17
app/controllers/team_members_controller.rb
app/controllers/team_members_controller.rb
+2
-0
app/views/team_members/_assigned_teams.html.haml
app/views/team_members/_assigned_teams.html.haml
+1
-1
app/views/team_members/_team.html.haml
app/views/team_members/_team.html.haml
+1
-9
app/views/team_members/_team_member.html.haml
app/views/team_members/_team_member.html.haml
+1
-1
app/views/team_members/index.html.haml
app/views/team_members/index.html.haml
+12
-6
No files found.
app/controllers/team_members_controller.rb
View file @
ba937b2b
...
@@ -7,6 +7,8 @@ class TeamMembersController < ProjectResourceController
...
@@ -7,6 +7,8 @@ class TeamMembersController < ProjectResourceController
@team
=
@project
.
users_projects
.
scoped
@team
=
@project
.
users_projects
.
scoped
@team
=
@team
.
send
(
params
[
:type
])
if
%w(masters developers reporters guests)
.
include?
(
params
[
:type
])
@team
=
@team
.
send
(
params
[
:type
])
if
%w(masters developers reporters guests)
.
include?
(
params
[
:type
])
@team
=
@team
.
sort_by
(
&
:project_access
).
reverse
.
group_by
(
&
:project_access
)
@team
=
@team
.
sort_by
(
&
:project_access
).
reverse
.
group_by
(
&
:project_access
)
@assigned_teams
=
@project
.
user_team_project_relationships
end
end
def
show
def
show
...
...
app/views/team_members/_assigned_teams.html.haml
View file @
ba937b2b
.ui-box
.ui-box
%ul
.well-list
%ul
.well-list
-
@project
.
user_team_project_relationship
s
.
sort_by
(
&
:team_name
).
each
do
|
team_relation
|
-
assigned_team
s
.
sort_by
(
&
:team_name
).
each
do
|
team_relation
|
=
render
"team_members/assigned_team"
,
team_relation:
team_relation
,
team:
team_relation
.
user_team
=
render
"team_members/assigned_team"
,
team_relation:
team_relation
,
team:
team_relation
.
user_team
app/views/team_members/_team.html.haml
View file @
ba937b2b
-
@
team
.
each
do
|
access
,
members
|
-
team
.
each
do
|
access
,
members
|
.ui-box
.ui-box
%h5
.title
%h5
.title
=
Project
.
access_options
.
key
(
access
).
pluralize
=
Project
.
access_options
.
key
(
access
).
pluralize
...
@@ -6,11 +6,3 @@
...
@@ -6,11 +6,3 @@
%ul
.well-list
%ul
.well-list
-
members
.
sort_by
(
&
:user_name
).
each
do
|
team_member
|
-
members
.
sort_by
(
&
:user_name
).
each
do
|
team_member
|
=
render
'team_members/team_member'
,
member:
team_member
=
render
'team_members/team_member'
,
member:
team_member
:javascript
$
(
function
(){
$
(
'
.repo-access-select, .project-access-select
'
).
live
(
"
change
"
,
function
()
{
$
(
this
.
form
).
submit
();
});
})
app/views/team_members/_team_member.html.haml
View file @
ba937b2b
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
-
if
allow_admin
-
if
allow_admin
.left
.left
=
form_for
(
member
,
as: :team_member
,
url:
project_team_member_path
(
@project
,
member
.
user
))
do
|
f
|
=
form_for
(
member
,
as: :team_member
,
url:
project_team_member_path
(
@project
,
member
.
user
))
do
|
f
|
=
f
.
select
:project_access
,
options_for_select
(
UsersProject
.
access_roles
,
member
.
project_access
),
{},
class:
"medium project-access-select span2"
=
f
.
select
:project_access
,
options_for_select
(
UsersProject
.
access_roles
,
member
.
project_access
),
{},
class:
"medium project-access-select span2
trigger-submit
"
.pull-right
.pull-right
-
if
current_user
==
user
-
if
current_user
==
user
%span
.label
This is you!
%span
.label
This is you!
...
...
app/views/team_members/index.html.haml
View file @
ba937b2b
...
@@ -27,24 +27,30 @@
...
@@ -27,24 +27,30 @@
%li
{
class:
(
"active"
if
params
[
:type
]
==
'masters'
)}
%li
{
class:
(
"active"
if
params
[
:type
]
==
'masters'
)}
=
link_to
project_team_members_path
(
type:
'masters'
)
do
=
link_to
project_team_members_path
(
type:
'masters'
)
do
Masters
Masters
%span
.pull-right
=
@project
.
users_projects
.
masters
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'developers'
)}
%li
{
class:
(
"active"
if
params
[
:type
]
==
'developers'
)}
=
link_to
project_team_members_path
(
type:
'developers'
)
do
=
link_to
project_team_members_path
(
type:
'developers'
)
do
Developers
Developers
%span
.pull-right
=
@project
.
users_projects
.
developers
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'reporters'
)}
%li
{
class:
(
"active"
if
params
[
:type
]
==
'reporters'
)}
=
link_to
project_team_members_path
(
type:
'reporters'
)
do
=
link_to
project_team_members_path
(
type:
'reporters'
)
do
Reporters
Reporters
%span
.pull-right
=
@project
.
users_projects
.
reporters
.
count
%li
{
class:
(
"active"
if
params
[
:type
]
==
'guests'
)}
%li
{
class:
(
"active"
if
params
[
:type
]
==
'guests'
)}
=
link_to
project_team_members_path
(
type:
'guests'
)
do
=
link_to
project_team_members_path
(
type:
'guests'
)
do
Guests
Guests
%span
.pull-right
=
@project
.
users_projects
.
guests
.
count
-
if
@assigned_teams
.
present?
%h5
%h5
Assigned teams
Assigned teams
(
#{
@project
.
user_teams
.
count
}
)
(
#{
@project
.
user_teams
.
count
}
)
%div
%div
=
render
"team_members/assigned_teams"
,
project:
@project
=
render
"team_members/assigned_teams"
,
assigned_teams:
@assigned_teams
.span9
.span9
%div
.team-table
%div
.team-table
=
render
"team_members/team"
,
project:
@project
=
render
"team_members/team"
,
team:
@team
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