BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
1587caa3
Commit
1587caa3
authored
Mar 13, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use name+username in team -> new
parent
fa9a8c38
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
user_decorator.rb
app/decorators/user_decorator.rb
+0
-4
user.rb
app/models/user.rb
+4
-0
_form.html.haml
app/views/team_members/_form.html.haml
+1
-1
new.html.haml
app/views/teams/members/new.html.haml
+1
-1
No files found.
app/decorators/user_decorator.rb
View file @
1587caa3
...
@@ -8,8 +8,4 @@ class UserDecorator < ApplicationDecorator
...
@@ -8,8 +8,4 @@ class UserDecorator < ApplicationDecorator
def
tm_of
(
project
)
def
tm_of
(
project
)
project
.
team_member_by_id
(
self
.
id
)
project
.
team_member_by_id
(
self
.
id
)
end
end
def
name_with_email
"
#{
name
}
(
#{
email
}
)"
end
end
end
app/models/user.rb
View file @
1587caa3
...
@@ -340,4 +340,8 @@ class User < ActiveRecord::Base
...
@@ -340,4 +340,8 @@ class User < ActiveRecord::Base
def
owned_teams
def
owned_teams
UserTeam
.
where
(
owner_id:
self
.
id
)
UserTeam
.
where
(
owner_id:
self
.
id
)
end
end
def
name_with_username
"
#{
name
}
(
#{
username
}
)"
end
end
end
app/views/team_members/_form.html.haml
View file @
1587caa3
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
%h6
1. Choose people you want in the team
%h6
1. Choose people you want in the team
.clearfix
.clearfix
=
f
.
label
:user_ids
,
"People"
=
f
.
label
:user_ids
,
"People"
.input
=
select_tag
(
:user_ids
,
options_from_collection_for_select
(
User
.
active
.
not_in_project
(
@project
).
alphabetically
,
:id
,
:name
),
{
data:
{
placeholder:
"Select users"
},
class:
"chosen xxlarge"
,
multiple:
true
})
.input
=
select_tag
(
:user_ids
,
options_from_collection_for_select
(
User
.
active
.
not_in_project
(
@project
).
alphabetically
,
:id
,
:name
_with_username
),
{
data:
{
placeholder:
"Select users"
},
class:
"chosen xxlarge"
,
multiple:
true
})
%h6
2. Set access level for them
%h6
2. Set access level for them
.clearfix
.clearfix
...
...
app/views/teams/members/new.html.haml
View file @
1587caa3
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
%td
=
@team
.
admin?
(
member
)
?
"Admin"
:
"Member"
%td
=
@team
.
admin?
(
member
)
?
"Admin"
:
"Member"
%td
%td
%tr
%tr
%td
=
select_tag
:user_ids
,
options_from_collection_for_select
(
@users
,
:id
,
:name_with_
email
),
multiple:
true
,
data:
{
placeholder:
'Select users'
},
class:
'chosen span5'
%td
=
select_tag
:user_ids
,
options_from_collection_for_select
(
@users
,
:id
,
:name_with_
username
),
multiple:
true
,
data:
{
placeholder:
'Select users'
},
class:
'chosen span5'
%td
=
select_tag
:default_project_access
,
options_for_select
(
Project
.
access_options
),
{
class:
"project-access-select chosen span3"
}
%td
=
select_tag
:default_project_access
,
options_for_select
(
Project
.
access_options
),
{
class:
"project-access-select chosen span3"
}
%td
%td
%span
=
check_box_tag
:group_admin
%span
=
check_box_tag
:group_admin
...
...
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