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
1e3d2389
Commit
1e3d2389
authored
Dec 26, 2012
by
Andrey Kumanyaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace short loop variable from "p" to "project"
parent
2753cea7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
groups_controller.rb
app/controllers/admin/groups_controller.rb
+2
-2
groups_controller.rb
app/controllers/groups_controller.rb
+2
-2
show.html.haml
app/views/admin/groups/show.html.haml
+3
-3
No files found.
app/controllers/admin/groups_controller.rb
View file @
1e3d2389
...
...
@@ -68,8 +68,8 @@ class Admin::GroupsController < AdminController
end
def
project_teams_update
@group
.
projects
.
each
do
|
p
|
p
.
add_users_ids_to_team
(
params
[
:user_ids
],
params
[
:project_access
])
@group
.
projects
.
each
do
|
p
roject
|
p
roject
.
add_users_ids_to_team
(
params
[
:user_ids
],
params
[
:project_access
])
end
redirect_to
[
:admin
,
@group
],
notice:
'Users was successfully added.'
end
...
...
app/controllers/groups_controller.rb
View file @
1e3d2389
...
...
@@ -59,8 +59,8 @@ class GroupsController < ApplicationController
end
def
team_members
@group
.
projects
.
each
do
|
p
|
p
.
add_users_ids_to_team
(
params
[
:user_ids
],
params
[
:project_access
])
@group
.
projects
.
each
do
|
p
roject
|
p
roject
.
add_users_ids_to_team
(
params
[
:user_ids
],
params
[
:project_access
])
end
redirect_to
people_group_path
(
@group
),
notice:
'Users was successfully added.'
end
...
...
app/views/admin/groups/show.html.haml
View file @
1e3d2389
...
...
@@ -76,9 +76,9 @@
%tr
{
class:
"user_#{u.id}"
}
%td
.name
=
link_to
u
.
name
,
admin_user_path
(
u
)
%td
.projects_access
-
u
.
projects
.
in_group
(
@group
).
each
do
|
p
|
-
u_p
=
u
.
users_projects
.
in_project
(
p
).
first
=
"
#{
p
.
name
}
(
#{
link_to
u_p
.
project_access_human
,
edit_admin_team_member_path
(
u_p
)
}
)"
.
html_safe
-
u
.
projects
.
in_group
(
@group
).
each
do
|
p
roject
|
-
u_p
=
u
.
users_projects
.
in_project
(
p
roject
).
first
=
"
#{
p
roject
.
name
}
(
#{
link_to
u_p
.
project_access_human
,
edit_admin_team_member_path
(
u_p
)
}
)"
.
html_safe
%tr
%td
.input
=
select_tag
:user_ids
,
options_from_collection_for_select
(
@users
,
:id
,
:name
),
multiple:
true
,
data:
{
placeholder:
'Select users'
},
class:
'chosen span5'
%td
=
select_tag
:project_access
,
options_for_select
(
Project
.
access_options
),
{
class:
"project-access-select chosen span3"
}
...
...
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