Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
ba74fa14
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
ba74fa14
编写于
12月 03, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Remove some bugs. Add warnings for renaming group. Add ability to cahnge group owner.
上级
7f6bbf06
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
101 addition
and
51 deletion
+101
-51
app/assets/stylesheets/gitlab_bootstrap/common.scss
app/assets/stylesheets/gitlab_bootstrap/common.scss
+0
-14
app/assets/stylesheets/sections/projects.scss
app/assets/stylesheets/sections/projects.scss
+22
-1
app/controllers/admin/groups_controller.rb
app/controllers/admin/groups_controller.rb
+1
-0
app/controllers/admin/projects_controller.rb
app/controllers/admin/projects_controller.rb
+1
-0
app/views/admin/groups/_form.html.haml
app/views/admin/groups/_form.html.haml
+0
-12
app/views/admin/groups/edit.html.haml
app/views/admin/groups/edit.html.haml
+19
-3
app/views/admin/groups/index.html.haml
app/views/admin/groups/index.html.haml
+3
-3
app/views/admin/groups/show.html.haml
app/views/admin/groups/show.html.haml
+49
-15
app/views/admin/projects/_form.html.haml
app/views/admin/projects/_form.html.haml
+4
-1
app/views/dashboard/index.html.haml
app/views/dashboard/index.html.haml
+1
-1
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+1
-1
未找到文件。
app/assets/stylesheets/gitlab_bootstrap/common.scss
浏览文件 @
ba74fa14
...
...
@@ -100,17 +100,3 @@ input[type='search'].search-text-input {
}
fieldset
legend
{
font-size
:
17px
;
}
ul
.nav.nav-projects-tabs
{
@extend
.nav-tabs
;
padding-left
:
8px
;
li
{
a
{
padding
:
4px
20px
;
margin-top
:
2px
;
border-color
:
#DDD
;
}
}
}
app/assets/stylesheets/sections/projects.scss
浏览文件 @
ba74fa14
...
...
@@ -4,7 +4,6 @@
}
.side
{
@extend
.span4
;
@extend
.right
;
.groups_box
,
...
...
@@ -117,3 +116,25 @@
}
}
ul
.nav.nav-projects-tabs
{
@extend
.nav-tabs
;
padding-left
:
8px
;
li
{
a
{
padding
:
4px
20px
;
margin-top
:
2px
;
border-color
:
#DDD
;
background-color
:
#EEE
;
text-shadow
:
0
1px
1px
white
;
color
:
#555
;
}
&
.active
{
a
{
font-weight
:
bold
;
}
}
}
}
app/controllers/admin/groups_controller.rb
浏览文件 @
ba74fa14
...
...
@@ -11,6 +11,7 @@ class Admin::GroupsController < AdminController
@projects
=
Project
.
scoped
@projects
=
@projects
.
not_in_group
(
@group
)
if
@group
.
projects
.
present?
@projects
=
@projects
.
all
@projects
.
reject!
(
&
:empty_repo?
)
end
def
new
...
...
app/controllers/admin/projects_controller.rb
浏览文件 @
ba74fa14
...
...
@@ -4,6 +4,7 @@ class Admin::ProjectsController < AdminController
def
index
@projects
=
Project
.
scoped
@projects
=
@projects
.
where
(
namespace_id:
params
[
:namespace_id
])
if
params
[
:namespace_id
].
present?
@projects
=
@projects
.
where
(
namespace_id:
nil
)
if
params
[
:namespace_id
]
==
Namespace
.
global_id
@projects
=
@projects
.
search
(
params
[
:name
])
if
params
[
:name
].
present?
@projects
=
@projects
.
includes
(
:namespace
).
order
(
"namespaces.path, projects.name ASC"
).
page
(
params
[
:page
]).
per
(
20
)
end
...
...
app/views/admin/groups/_form.html.haml
已删除
100644 → 0
浏览文件 @
7f6bbf06
=
form_for
[
:admin
,
@group
]
do
|
f
|
-
if
@group
.
errors
.
any?
.alert-message.block-message.error
%span
=
@group
.
errors
.
full_messages
.
first
.clearfix.group_name_holder
=
f
.
label
:name
do
Group name is
.input
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
.form-actions
=
f
.
submit
'Save group'
,
class:
"btn save-btn"
app/views/admin/groups/edit.html.haml
浏览文件 @
ba74fa14
%h3
.page_title
Edit Group
%br
=
render
'form'
%h3
.page_title
Rename Group
%hr
.alert
Renaming group can have unintended side effects.
%br
Renaming group will rename directory for all related projects
=
form_for
[
:admin
,
@group
]
do
|
f
|
-
if
@group
.
errors
.
any?
.alert-message.block-message.error
%span
=
@group
.
errors
.
full_messages
.
first
.clearfix.group_name_holder
=
f
.
label
:name
do
Group name is
.input
=
f
.
text_field
:name
,
placeholder:
"Example Group"
,
class:
"xxlarge"
.form-actions
=
f
.
submit
'Rename group'
,
class:
"btn save-btn"
=
link_to
'Cancel'
,
admin_groups_path
,
class:
"btn cancel-btn"
app/views/admin/groups/index.html.haml
浏览文件 @
ba74fa14
...
...
@@ -15,7 +15,6 @@
%th
Name
%th
Path
%th
Projects
%th
Edit
%th
.cred
Danger Zone!
-
@groups
.
each
do
|
group
|
...
...
@@ -23,6 +22,7 @@
%td
=
link_to
group
.
name
,
[
:admin
,
group
]
%td
=
group
.
path
%td
=
group
.
projects
.
count
%td
=
link_to
'Edit'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn small"
%td
.bgred
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
%td
.bgred
=
link_to
'Rename'
,
edit_admin_group_path
(
group
),
id:
"edit_
#{
dom_id
(
group
)
}
"
,
class:
"btn small"
=
link_to
'Destroy'
,
[
:admin
,
group
],
confirm:
"REMOVE
#{
group
.
name
}
? Are you sure?"
,
method: :delete
,
class:
"btn small danger"
=
paginate
@groups
,
theme:
"admin"
app/views/admin/groups/show.html.haml
浏览文件 @
ba74fa14
%h3
.page_title
Group:
#{
@group
.
name
}
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn right"
do
%i
.icon-edit
Edit
%br
%table
.zebra-striped
...
...
@@ -16,6 +13,10 @@
Name:
%td
=
@group
.
name
=
link_to
edit_admin_group_path
(
@group
),
class:
"btn btn-small right"
do
%i
.icon-edit
Rename
%tr
%td
%b
...
...
@@ -28,24 +29,43 @@
Owner:
%td
=
@group
.
owner_name
.ui-box
%h5
Projects
%small
(
#{
@group
.
projects
.
count
}
)
%ul
.unstyled
.right
=
link_to
"#"
,
class:
"btn btn-small change-owner-link"
do
%i
.icon-edit
Change owner
.change-owner-holder.hide
=
form_for
[
:admin
,
@group
]
do
|
f
|
=
f
.
select
:owner_id
,
User
.
all
.
map
{
|
user
|
[
user
.
name
,
user
.
id
]
},
{},
{
class:
'chosen'
}
=
f
.
submit
'Save'
,
class:
"btn btn-small save-btn"
=
link_to
"Cancel"
,
"#"
,
class:
"btn btn-small change-owner-cancel-link"
%fieldset
%legend
Projects (
#{
@group
.
projects
.
count
}
)
%table
%thead
%tr
%th
Project name
%th
Path
%th
Users
%th
.cred
Danger Zone!
-
@group
.
projects
.
each
do
|
project
|
%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
%tr
%td
=
link_to
project
.
name_with_namespace
,
[
:admin
,
project
]
%td
%span
.monospace
=
project
.
path_with_namespace
+
".git"
%td
=
project
.
users
.
count
%td
.bgred
=
link_to
'Transfer project to global namespace'
,
remove_project_admin_group_path
(
@group
,
project_id:
project
.
id
),
confirm:
'Remove project from group and move to global namespace. Are you sure?'
,
method: :delete
,
class:
"btn danger small"
=
form_tag
project_update_admin_group_path
(
@group
),
class:
"bulk_import"
,
method: :put
do
%fieldset
%legend
Move projects to group
.alert
You can move only projects with existing repos
%br
Group projects will be moved in group directory and will not be accessible by old path
.clearfix
=
label_tag
:project_ids
do
Projects
...
...
@@ -53,3 +73,17 @@
=
select_tag
:project_ids
,
options_from_collection_for_select
(
@projects
,
:id
,
:name_with_namespace
),
multiple:
true
,
data:
{
placeholder:
'Select projects'
},
class:
'chosen span5'
.form-actions
=
submit_tag
'Add'
,
class:
"btn primary"
:javascript
$
(
function
(){
var
modal
=
$
(
'
.change-owner-holder
'
);
$
(
'
.change-owner-link
'
).
bind
(
"
click
"
,
function
(){
$
(
this
).
hide
();
modal
.
show
();
});
$
(
'
.change-owner-cancel-link
'
).
bind
(
"
click
"
,
function
(){
modal
.
hide
();
$
(
'
.change-owner-link
'
).
show
();
})
})
app/views/admin/projects/_form.html.haml
浏览文件 @
ba74fa14
...
...
@@ -22,7 +22,10 @@
-
unless
project
.
new_record?
.clearfix
=
f
.
label
:namespace_id
.input
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
),
{},
{
class:
'chosen'
}
.input
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
),
{},
{
class:
'chosen'
}
%span
.cred
Be careful. Changing project namespace can have unintended side effects
-
if
project
.
repo_exists?
.clearfix
...
...
app/views/dashboard/index.html.haml
浏览文件 @
ba74fa14
...
...
@@ -2,7 +2,7 @@
.projects
.activities.span8
=
render
'activities'
.side
.side
.span4
=
render
'sidebar'
-
else
...
...
app/views/groups/show.html.haml
浏览文件 @
ba74fa14
...
...
@@ -11,7 +11,7 @@
-
else
%p
.nothing_here_message
Projects activity will be displayed here
.loading.hide
.side
.side
.span4
=
render
"projects"
,
projects:
@projects
%div
%span
.rss-icon
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录