Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e8a82603
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 搜索 >>
未验证
提交
e8a82603
编写于
10月 08, 2014
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
show danger settings by default
Signed-off-by:
N
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
上级
d30e1f5c
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
75 addition
and
86 deletion
+75
-86
app/views/projects/edit.html.haml
app/views/projects/edit.html.haml
+75
-86
未找到文件。
app/views/projects/edit.html.haml
浏览文件 @
e8a82603
...
...
@@ -86,101 +86,90 @@
.danger-settings.js-toggle-container
.centered-light-block
%h3
%i
.fa.fa-exclamation-triangle
Dangerous settings
%p
Project settings below may result in data loss!
=
link_to
'#'
,
class:
'btn js-toggle-button'
do
Show them to me
%i
.fa.fa-chevron-down
.js-toggle-content.hide
-
if
can?
current_user
,
:archive_project
,
@project
.panel.panel-default.panel.panel-warning
.panel-heading
-
if
@project
.
archived?
Unarchive project
-
else
Archive project
.panel-body
-
if
@project
.
archived?
%p
Unarchiving the project will mark its repository as active.
%br
The project can be committed to.
%br
%strong
Once active this project shows up in the search and on the dashboard.
=
link_to
'Unarchive'
,
unarchive_project_path
(
@project
),
data:
{
confirm:
"Are you sure that you want to unarchive this project?
\n
When this project is unarchived it is active and can be committed to again."
},
method: :post
,
class:
"btn btn-remove"
-
else
%p
Archiving the project will mark its repository as read-only.
%br
It is hidden from the dashboard and doesn't show up in searches.
%br
%strong
Archived projects cannot be committed to!
=
link_to
'Archive'
,
archive_project_path
(
@project
),
data:
{
confirm:
"Are you sure that you want to archive this project?
\n
An archived project cannot be committed to."
},
method: :post
,
class:
"btn btn-warning"
-
else
.nothing-here-block
Only the project owner can archive a project
.danger-settings
-
if
can?
current_user
,
:archive_project
,
@project
.panel.panel-default.panel.panel-warning
.panel-heading
Rename repository
.panel-heading
-
if
@project
.
archived?
Unarchive project
-
else
Archive project
.panel-body
-
if
@project
.
archived?
%p
Unarchiving the project will mark its repository as active.
%br
The project can be committed to.
%br
%strong
Once active this project shows up in the search and on the dashboard.
=
link_to
'Unarchive'
,
unarchive_project_path
(
@project
),
data:
{
confirm:
"Are you sure that you want to unarchive this project?
\n
When this project is unarchived it is active and can be committed to again."
},
method: :post
,
class:
"btn btn-remove"
-
else
%p
Archiving the project will mark its repository as read-only.
%br
It is hidden from the dashboard and doesn't show up in searches.
%br
%strong
Archived projects cannot be committed to!
=
link_to
'Archive'
,
archive_project_path
(
@project
),
data:
{
confirm:
"Are you sure that you want to archive this project?
\n
An archived project cannot be committed to."
},
method: :post
,
class:
"btn btn-warning"
-
else
.nothing-here-block
Only the project owner can archive a project
.panel.panel-default.panel.panel-warning
.panel-heading
Rename repository
.errors-holder
.panel-body
=
form_for
(
@project
,
html:
{
class:
'form-horizontal'
})
do
|
f
|
.form-group
=
f
.
label
:path
,
class:
'control-label'
do
%span
Path
.col-sm-9
.form-group
.input-group
=
f
.
text_field
:path
,
class:
'form-control'
%span
.input-group-addon
.git
%ul
%li
Be careful. Renaming a project's repository can have unintended side effects.
%li
You will need to update your local repositories to point to the new location.
.form-actions
=
f
.
submit
'Rename'
,
class:
"btn btn-warning"
-
if
can?
(
current_user
,
:change_namespace
,
@project
)
.panel.panel-default.panel.panel-danger
.panel-heading
Transfer project
.errors-holder
.panel-body
=
form_for
(
@project
,
html:
{
class:
'
form-horizontal'
})
do
|
f
|
=
form_for
(
@project
,
url:
transfer_project_path
(
@project
),
method: :put
,
remote:
true
,
html:
{
class:
'transfer-project
form-horizontal'
})
do
|
f
|
.form-group
=
f
.
label
:
path
,
class:
'control-label'
do
%span
Path
.col-sm-
9
=
f
.
label
:
namespace_id
,
class:
'control-label'
do
%span
Namespace
.col-sm-
10
.form-group
.input-group
=
f
.
text_field
:path
,
class:
'form-control'
%span
.input-group-addon
.git
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
),
{
prompt:
'Choose a project namespace'
},
{
class:
'select2'
}
%ul
%li
Be careful. Renaming a project's repository can have unintended side effects.
%li
Be careful. Changing the project's namespace can have unintended side effects.
%li
You can only transfer the project to namespaces you manage.
%li
You will need to update your local repositories to point to the new location.
.form-actions
=
f
.
submit
'Rename'
,
class:
"btn btn-warning"
-
if
can?
(
current_user
,
:change_namespace
,
@project
)
.panel.panel-default.panel.panel-danger
.panel-heading
Transfer project
.errors-holder
.panel-body
=
form_for
(
@project
,
url:
transfer_project_path
(
@project
),
method: :put
,
remote:
true
,
html:
{
class:
'transfer-project form-horizontal'
})
do
|
f
|
.form-group
=
f
.
label
:namespace_id
,
class:
'control-label'
do
%span
Namespace
.col-sm-10
.form-group
=
f
.
select
:namespace_id
,
namespaces_options
(
@project
.
namespace_id
),
{
prompt:
'Choose a project namespace'
},
{
class:
'select2'
}
%ul
%li
Be careful. Changing the project's namespace can have unintended side effects.
%li
You can only transfer the project to namespaces you manage.
%li
You will need to update your local repositories to point to the new location.
.form-actions
=
f
.
submit
'Transfer'
,
class:
"btn btn-remove"
-
else
.nothing-here-block
Only the project owner can transfer a project
-
if
can?
(
current_user
,
:remove_project
,
@project
)
.panel.panel-default.panel.panel-danger
.panel-heading
Remove project
.panel-body
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
%strong
Removed projects cannot be restored!
=
f
.
submit
'Transfer'
,
class:
"btn btn-remove"
-
else
.nothing-here-block
Only the project owner can transfer a project
=
link_to
'Remove project'
,
@project
,
data:
{
confirm:
remove_project_message
(
@project
)
},
method: :delete
,
class:
"btn btn-remove"
-
else
.nothing-here-block
Only project owner can remove a project
-
if
can?
(
current_user
,
:remove_project
,
@project
)
.panel.panel-default.panel.panel-danger
.panel-heading
Remove project
.panel-body
%p
Removing the project will delete its repository and all related resources including issues, merge requests etc.
%br
%strong
Removed projects cannot be restored!
=
link_to
'Remove project'
,
@project
,
data:
{
confirm:
remove_project_message
(
@project
)
},
method: :delete
,
class:
"btn btn-remove"
-
else
.nothing-here-block
Only project owner can remove a project
.save-project-loader.hide
.center
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录