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
Kazuhiko Shiozaki
gitlab-ce
Commits
224fb577
Commit
224fb577
authored
Oct 03, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added ability to manage groups from admin
parent
010ac2b1
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
26 additions
and
7 deletions
+26
-7
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+8
-0
app/views/admin/groups/_form.html.haml
app/views/admin/groups/_form.html.haml
+1
-1
app/views/admin/groups/edit.html.haml
app/views/admin/groups/edit.html.haml
+3
-0
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+1
-0
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+4
-0
app/views/admin/projects/index.html.haml
app/views/admin/projects/index.html.haml
+1
-0
app/views/admin/projects/show.html.haml
app/views/admin/projects/show.html.haml
+1
-0
app/views/admin/shared/_projects_head.html.haml
app/views/admin/shared/_projects_head.html.haml
+5
-0
app/views/groups/_projects.html.haml
app/views/groups/_projects.html.haml
+0
-5
app/views/layouts/admin.html.haml
app/views/layouts/admin.html.haml
+1
-1
config/routes.rb
config/routes.rb
+1
-0
No files found.
app/controllers/admin/groups_controller.rb
View file @
224fb577
...
...
@@ -52,6 +52,14 @@ class Admin::GroupsController < AdminController
redirect_to
:back
,
notice:
'Group was successfully updated.'
end
def
remove_project
@project
=
Project
.
find
(
params
[
:project_id
])
@project
.
group_id
=
nil
@project
.
save
redirect_to
:back
,
notice:
'Group was successfully updated.'
end
def
destroy
@group
.
destroy
...
...
app/views/admin/groups/_form.html.haml
View file @
224fb577
...
...
@@ -16,4 +16,4 @@
=
f
.
text_field
:code
,
placeholder:
"example"
.form-actions
=
f
.
submit
'
Create group'
,
class:
"btn primary
"
=
f
.
submit
'
Save group'
,
class:
"btn save-btn
"
app/views/admin/groups/edit.html.haml
0 → 100644
View file @
224fb577
%h3
.page_title
Edit Group
%br
=
render
'form'
app/views/admin/groups/index.html.haml
View file @
224fb577
=
render
'admin/shared/projects_head'
%h3
.page_title
Groups
=
link_to
'New Group'
,
new_admin_group_path
,
class:
"btn small right"
...
...
app/views/admin/groups/show.html.haml
View file @
224fb577
=
render
'admin/shared/projects_head'
%h3
.page_title
Group:
#{
@group
.
name
}
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn right"
do
...
...
@@ -38,6 +39,9 @@
%li
.wll
%strong
=
link_to
project
.
name
,
[
:admin
,
project
]
.right
=
link_to
'Remove from group'
,
remove_project_admin_group_path
(
@group
,
project_id:
project
.
id
),
confirm:
'Are you sure?'
,
method: :delete
,
class:
"btn danger small"
.clearfix
%br
%h3
Add new project
...
...
app/views/admin/projects/index.html.haml
View file @
224fb577
=
render
'admin/shared/projects_head'
%h3
.page_title
Projects
=
link_to
'New Project'
,
new_admin_project_path
,
class:
"btn small right"
...
...
app/views/admin/projects/show.html.haml
View file @
224fb577
=
render
'admin/shared/projects_head'
%h3
.page_title
Project:
#{
@admin_project
.
name
}
=
link_to
edit_admin_project_path
(
@admin_project
),
class:
"btn right"
do
...
...
app/views/admin/shared/_projects_head.html.haml
0 → 100644
View file @
224fb577
%ul
.nav.nav-tabs
=
nav_link
(
controller: :projects
)
do
=
link_to
'Projects'
,
admin_projects_path
,
class:
"tab"
=
nav_link
(
controller: :groups
)
do
=
link_to
'Groups'
,
admin_groups_path
,
class:
"tab"
app/views/groups/_projects.html.haml
View file @
224fb577
...
...
@@ -3,11 +3,6 @@
Projects
%small
(
#{
projects
.
count
}
)
-
if
current_user
.
can_create_project?
%span
.right
=
link_to
new_project_path
,
class:
"btn very_small info"
do
%i
.icon-plus
New Project
%ul
.unstyled
-
projects
.
each
do
|
project
|
%li
.wll
...
...
app/views/layouts/admin.html.haml
View file @
224fb577
...
...
@@ -8,7 +8,7 @@
%ul
.main_menu
=
nav_link
(
controller: :dashboard
,
html_options:
{
class:
'home'
})
do
=
link_to
"Stats"
,
admin_root_path
=
nav_link
(
controller:
:projects
)
do
=
nav_link
(
controller:
[
:projects
,
:groups
]
)
do
=
link_to
"Projects"
,
admin_projects_path
=
nav_link
(
controller: :users
)
do
=
link_to
"Users"
,
admin_users_path
...
...
config/routes.rb
View file @
224fb577
...
...
@@ -46,6 +46,7 @@ Gitlab::Application.routes.draw do
resources
:groups
,
constraints:
{
id:
/[^\/]+/
}
do
member
do
put
:project_update
delete
:remove_project
end
end
resources
:projects
,
constraints:
{
id:
/[^\/]+/
}
do
...
...
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