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
634783fe
Commit
634783fe
authored
Dec 26, 2012
by
Andrey Kumanyaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename scope "in_group" to "in_namespace"
parent
1e3d2389
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
project.rb
app/models/project.rb
+1
-1
show.html.haml
app/views/admin/groups/show.html.haml
+1
-1
No files found.
app/models/project.rb
View file @
634783fe
...
...
@@ -82,7 +82,7 @@ class Project < ActiveRecord::Base
scope
:public_only
,
where
(
private_flag:
false
)
scope
:without_user
,
->
(
user
)
{
where
(
"id NOT IN (:ids)"
,
ids:
user
.
projects
.
map
(
&
:id
)
)
}
scope
:not_in_group
,
->
(
group
)
{
where
(
"id NOT IN (:ids)"
,
ids:
group
.
project_ids
)
}
scope
:in_
group
,
->
(
group
)
{
where
(
namespace_id:
group
.
id
)
}
scope
:in_
namespace
,
->
(
namespace
)
{
where
(
namespace_id:
namespace
.
id
)
}
scope
:sorted_by_activity
,
->
()
{
order
(
"(SELECT max(events.created_at) FROM events WHERE events.project_id = projects.id) DESC"
)
}
scope
:personal
,
->
(
user
)
{
where
(
namespace_id:
user
.
namespace_id
)
}
scope
:joined
,
->
(
user
)
{
where
(
"namespace_id != ?"
,
user
.
namespace_id
)
}
...
...
app/views/admin/groups/show.html.haml
View file @
634783fe
...
...
@@ -76,7 +76,7 @@
%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
|
project
|
-
u
.
projects
.
in_
namespace
(
@group
).
each
do
|
project
|
-
u_p
=
u
.
users_projects
.
in_project
(
project
).
first
=
"
#{
project
.
name
}
(
#{
link_to
u_p
.
project_access_human
,
edit_admin_team_member_path
(
u_p
)
}
)"
.
html_safe
%tr
...
...
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