Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
c9ea5f13
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 搜索 >>
提交
c9ea5f13
编写于
1月 18, 2012
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
deploy key creation restyled
上级
809413d9
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
41 addition
and
62 deletion
+41
-62
app/assets/stylesheets/style.scss
app/assets/stylesheets/style.scss
+17
-7
app/controllers/deploy_keys_controller.rb
app/controllers/deploy_keys_controller.rb
+2
-2
app/views/deploy_keys/_form.html.haml
app/views/deploy_keys/_form.html.haml
+12
-10
app/views/deploy_keys/create.js.haml
app/views/deploy_keys/create.js.haml
+0
-9
app/views/deploy_keys/edit.html.haml
app/views/deploy_keys/edit.html.haml
+0
-7
app/views/deploy_keys/new.html.haml
app/views/deploy_keys/new.html.haml
+3
-3
app/views/deploy_keys/new.js.haml
app/views/deploy_keys/new.js.haml
+0
-11
app/views/issues/_form.html.haml
app/views/issues/_form.html.haml
+5
-10
app/views/repositories/_head.html.haml
app/views/repositories/_head.html.haml
+1
-1
spec/requests/projects_deploy_keys_spec.rb
spec/requests/projects_deploy_keys_spec.rb
+1
-2
未找到文件。
app/assets/stylesheets/style.scss
浏览文件 @
c9ea5f13
...
...
@@ -220,13 +220,9 @@ input.button{margin-bottom: 1.5em}
.ui-box
.data
{
padding
:
.5em
1em
}
.ui-box
.buttons
{
background-color
:
#f7f8f9
;
padding
:
1em
;
-webkit-border-bottom-right-radius
:
5px
;
-webkit-border-bottom-left-radius
:
5px
;
-moz-border-radius-bottomright
:
5px
;
-moz-border-radius-bottomleft
:
5px
;
border-bottom-right-radius
:
5px
;
border-bottom-left-radius
:
5px
;
.ui-box
.buttons
{
padding
:
1em
;
border-top
:
1px
solid
$lite_border_color
;
}
.ui-box
.buttons
.button
{
padding
:
8px
9px
;
font-size
:
11px
}
...
...
@@ -713,3 +709,17 @@ body, button, input, select, textarea {
}
}
.errors_holder
{
background
:
#FBB
;
border
:
1px
solid
$lite_border_color
;
@include
round-borders-all
(
4px
);
padding
:
5px
;
list-style
:none
;
font-weight
:
bold
;
text-shadow
:
0
-1px
0
rgba
(
255
,
255
,
255
,
0
.25
);
li
{
padding
:
10px
;
}
}
app/controllers/deploy_keys_controller.rb
浏览文件 @
c9ea5f13
class
DeployKeysController
<
ApplicationController
respond_to
:
js
,
:
html
respond_to
:html
layout
"project"
before_filter
:project
...
...
@@ -29,7 +29,7 @@ class DeployKeysController < ApplicationController
@key
=
@project
.
deploy_keys
.
new
(
params
[
:key
])
@key
.
save
re
spond_with
(
@key
)
re
direct_to
project_deploy_keys_path
(
@project
)
end
def
destroy
...
...
app/views/deploy_keys/_form.html.haml
浏览文件 @
c9ea5f13
%div
=
form_for
[
@project
,
@key
],
:url
=>
project_deploy_keys_path
,
:remote
=>
true
do
|
f
|
=
form_for
[
@project
,
@key
],
:url
=>
project_deploy_keys_path
do
|
f
|
-
if
@key
.
errors
.
any?
%ul
%ul
.errors_holder
-
@key
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
.form-row
=
f
.
label
:title
=
f
.
text_field
:title
,
:style
=>
"width:300px"
.form-row
=
f
.
label
:key
=
f
.
text_area
:key
,
:style
=>
"width:300px; height:130px"
.form-row
%table
.no-borders
%tr
%td
=
f
.
label
:title
%td
=
f
.
text_field
:title
,
:style
=>
"width:300px"
%tr
%td
=
f
.
label
:key
%td
=
f
.
text_area
:key
,
:style
=>
"width:300px; height:130px"
%br
.merge-tabs
=
f
.
submit
'Save'
,
:class
=>
"grey-button"
app/views/deploy_keys/create.js.haml
已删除
100644 → 0
浏览文件 @
809413d9
-
if
@key
.
valid?
:plain
$("#new_key_dialog").dialog("close");
$("#keys-table .data").append("
#{
escape_javascript
(
render
(
:partial
=>
'show'
,
:locals
=>
{
:key
=>
@key
}
))
}
");
$("#no_ssh_key_defined").hide();
-
else
:plain
$("#new_key_dialog").empty();
$("#new_key_dialog").append("
#{
escape_javascript
(
render
(
'form'
))
}
");
app/views/deploy_keys/edit.html.haml
已删除
100644 → 0
浏览文件 @
809413d9
%h1
Editing key
=
render
'form'
=
link_to
'Show'
,
@key
\|
=
link_to
'Back'
,
project_deploy_keys_path
app/views/deploy_keys/new.html.haml
浏览文件 @
c9ea5f13
%h1
New key
=
render
"repositories/head"
=
render
'form'
%h2
New Deploy key
=
link_to
'Back'
,
project_deploy_keys_path
=
render
'form'
app/views/deploy_keys/new.js.haml
已删除
100644 → 0
浏览文件 @
809413d9
:plain
var new_key_dialog = $("<div id='new_key_dialog'></div>");
new_key_dialog.html("
#{
escape_javascript
(
render
(
'form'
))
}
");
$(new_key_dialog).dialog({
width: 350,
resizable: false,
draggable: false,
title: "Add new public key",
close: function(event, ui) { $("#new_key_dialog").remove();},
modal: true
});
app/views/issues/_form.html.haml
浏览文件 @
c9ea5f13
...
...
@@ -20,18 +20,13 @@
%i
%h2
=
@issue
.
new_record?
?
"New Issue"
:
"Edit Issue #
#{
@issue
.
id
}
"
%hr
%table
.no-borders
-
if
@issue
.
errors
.
any?
%tr
%td
{
:colspan
=>
2
}
#error_explanation
-
@issue
.
errors
.
full_messages
.
each
do
|
msg
|
%span
=
msg
%br
-
if
@issue
.
errors
.
any?
%ul
.errors_holder
-
@issue
.
errors
.
full_messages
.
each
do
|
msg
|
%li
=
msg
%table
.no-borders
%tr
%td
=
f
.
label
:assignee_id
%td
=
f
.
select
(
:assignee_id
,
@project
.
users
.
all
.
collect
{
|
p
|
[
p
.
name
,
p
.
id
]
},
{
:include_blank
=>
"Select user"
})
...
...
app/views/repositories/_head.html.haml
浏览文件 @
c9ea5f13
...
...
@@ -23,6 +23,6 @@
-
if
current_page?
(
project_deploy_keys_path
(
@project
))
-
if
can?
current_user
,
:admin_project
,
@project
=
link_to
new_project_deploy_key_path
(
@project
),
:class
=>
"add_new"
,
:title
=>
"New Deploy Key"
,
:remote
=>
true
do
=
link_to
new_project_deploy_key_path
(
@project
),
:class
=>
"add_new"
,
:title
=>
"New Deploy Key"
do
=
image_tag
"add_new.png"
,
:width
=>
14
spec/requests/projects_deploy_keys_spec.rb
浏览文件 @
c9ea5f13
...
...
@@ -36,7 +36,7 @@ describe "Projects", "DeployKeys" do
end
it
"should open new key popup"
do
page
.
should
have_content
(
"
Add new public
key"
)
page
.
should
have_content
(
"
New Deploy
key"
)
end
describe
"fill in"
do
...
...
@@ -50,7 +50,6 @@ describe "Projects", "DeployKeys" do
it
"should add new key to table"
do
click_button
"Save"
page
.
should_not
have_content
(
"Add new public key"
)
page
.
should
have_content
"laptop"
end
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录