Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
6b3ce96a
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 搜索 >>
提交
6b3ce96a
编写于
9月 03, 2012
作者:
A
Alex Denisov
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' into api_create_project_fixes
上级
e078a173
c7cfe3d8
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
58 addition
and
66 deletion
+58
-66
app/decorators/commit_decorator.rb
app/decorators/commit_decorator.rb
+8
-0
app/views/devise/sessions/_new_ldap.html.erb
app/views/devise/sessions/_new_ldap.html.erb
+0
-39
app/views/devise/sessions/_new_ldap.html.haml
app/views/devise/sessions/_new_ldap.html.haml
+29
-0
app/views/devise/sessions/new.html.erb
app/views/devise/sessions/new.html.erb
+0
-27
app/views/devise/sessions/new.html.haml
app/views/devise/sessions/new.html.haml
+21
-0
未找到文件。
app/decorators/commit_decorator.rb
浏览文件 @
6b3ce96a
...
...
@@ -16,6 +16,8 @@ class CommitDecorator < ApplicationDecorator
# In case this first line is longer than 80 characters, it is cut off
# after 70 characters and ellipses (`&hellp;`) are appended.
def
title
return
no_commit_message
unless
safe_message
title_end
=
safe_message
.
index
(
/\n/
)
if
(
!
title_end
&&
safe_message
.
length
>
80
)
||
(
title_end
&&
title_end
>
80
)
safe_message
[
0
..
69
]
<<
"…"
.
html_safe
...
...
@@ -35,4 +37,10 @@ class CommitDecorator < ApplicationDecorator
safe_message
.
split
(
/\n/
,
2
)[
1
].
try
(
:chomp
)
end
end
protected
def
no_commit_message
"--no commit message"
end
end
app/views/devise/sessions/_new_ldap.html.erb
已删除
100644 → 0
浏览文件 @
e078a173
<%=
form_tag
(
user_omniauth_callback_path
(
:ldap
),
:class
=>
"login-box"
,
:id
=>
'new_ldap_user'
)
do
%>
<%=
image_tag
"login-logo.png"
,
:width
=>
"304"
,
:height
=>
"66"
,
:class
=>
"login-logo"
,
:alt
=>
"Login Logo"
%>
<%=
text_field_tag
:username
,
nil
,
{
:class
=>
"text top"
,
:placeholder
=>
"LDAP Login"
}
%>
<%=
password_field_tag
:password
,
nil
,
{
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
}
%>
<br/>
<%=
submit_tag
"LDAP Sign in"
,
:class
=>
"primary btn"
%>
<%-
if
devise_mapping
.
omniauthable?
%>
<%-
(
resource_class
.
omniauth_providers
-
[
:ldap
]).
each
do
|
provider
|
%>
<hr/>
<%=
link_to
"Sign in with
#{
provider
.
to_s
.
titleize
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
),
:class
=>
"btn primary"
%>
<br
/>
<%
end
-%>
<%
end
-%>
<hr/>
<a
href=
"#"
id=
"other_form_toggle"
onclick=
"javascript:$('#new_user').toggle();"
>
Other Sign in
</a>
<!-- inline for right now just to illustrate -->
<script
type=
"text/javascript"
>
$
(
function
()
{
$
(
'
#new_user
'
).
toggle
();
});
</script>
<%
end
%>
<%=
form_for
(
resource
,
:as
=>
resource_name
,
:url
=>
session_path
(
resource_name
),
:html
=>
{
:class
=>
"login-box"
})
do
|
f
|
%>
<%=
f
.
text_field
:email
,
:class
=>
"text top"
,
:placeholder
=>
"Email"
%>
<%=
f
.
password_field
:password
,
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
%>
<%
if
devise_mapping
.
rememberable?
-%>
<div
class=
"clearfix inputs-list"
>
<label
class=
"checkbox remember_me"
for=
"user_remember_me"
>
<%=
f
.
check_box
:remember_me
%>
<span>
Remember me
</span></label></div>
<%
end
-%>
<br/>
<%=
f
.
submit
"Sign in"
,
:class
=>
"primary btn"
%>
<div
class=
"right"
>
<%=
render
:partial
=>
"devise/shared/links"
%>
</div>
<%
end
%>
app/views/devise/sessions/_new_ldap.html.haml
0 → 100644
浏览文件 @
6b3ce96a
=
form_tag
(
user_omniauth_callback_path
(
:ldap
),
:class
=>
"login-box"
,
:id
=>
'new_ldap_user'
)
do
=
image_tag
"login-logo.png"
,
:width
=>
"304"
,
:height
=>
"66"
,
:class
=>
"login-logo"
,
:alt
=>
"Login Logo"
=
text_field_tag
:username
,
nil
,
{
:class
=>
"text top"
,
:placeholder
=>
"LDAP Login"
}
=
password_field_tag
:password
,
nil
,
{
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
}
%br
/
=
submit_tag
"LDAP Sign in"
,
:class
=>
"primary btn"
-
if
devise_mapping
.
omniauthable?
-
(
resource_class
.
omniauth_providers
-
[
:ldap
]).
each
do
|
provider
|
%hr
/
=
link_to
"Sign in with
#{
provider
.
to_s
.
titleize
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
),
:class
=>
"btn primary"
%br
/
%hr
/
%a
#other_form_toggle
{
:href
=>
"#"
,
:onclick
=>
"javascript:$('#new_user').toggle();"
}
Other Sign in
:javascript
$
(
function
()
{
$
(
'
#new_user
'
).
toggle
();
});
=
form_for
(
resource
,
:as
=>
resource_name
,
:url
=>
session_path
(
resource_name
),
:html
=>
{
:class
=>
"login-box"
})
do
|
f
|
=
f
.
text_field
:email
,
:class
=>
"text top"
,
:placeholder
=>
"Email"
=
f
.
password_field
:password
,
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
-
if
devise_mapping
.
rememberable?
.clearfix.inputs-list
%label
.checkbox.remember_me
{
:for
=>
"user_remember_me"
}
=
f
.
check_box
:remember_me
%span
Remember me
%br
/
=
f
.
submit
"Sign in"
,
:class
=>
"primary btn"
.right
=
render
:partial
=>
"devise/shared/links"
app/views/devise/sessions/new.html.erb
已删除
100644 → 0
浏览文件 @
e078a173
<%
unless
ldap_enable?
-%>
<%=
form_for
(
resource
,
:as
=>
resource_name
,
:url
=>
session_path
(
resource_name
),
:html
=>
{
:class
=>
"login-box"
})
do
|
f
|
%>
<%=
image_tag
"login-logo.png"
,
:width
=>
"304"
,
:height
=>
"66"
,
:class
=>
"login-logo"
,
:alt
=>
"Login Logo"
%>
<%=
f
.
text_field
:email
,
:class
=>
"text top"
,
:placeholder
=>
"Email"
%>
<%=
f
.
password_field
:password
,
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
%>
<%
if
devise_mapping
.
rememberable?
-%>
<div
class=
"clearfix inputs-list"
>
<label
class=
"checkbox remember_me"
for=
"user_remember_me"
>
<%=
f
.
check_box
:remember_me
%>
<span>
Remember me
</span></label></div>
<%
end
-%>
<br/>
<%=
f
.
submit
"Sign in"
,
:class
=>
"primary btn"
%>
<div
class=
"right"
>
<%=
render
:partial
=>
"devise/shared/links"
%>
</div>
<%-
if
devise_mapping
.
omniauthable?
%>
<%-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%>
<hr/>
<%=
link_to
"Sign in with
#{
provider
.
to_s
.
titleize
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
),
:class
=>
"btn primary"
%>
<br
/>
<%
end
-%>
<%
end
-%>
<%
end
%>
<%
else
%>
<%=
render
:partial
=>
'devise/sessions/new_ldap'
%>
<%
end
%>
app/views/devise/sessions/new.html.haml
0 → 100644
浏览文件 @
6b3ce96a
-
if
ldap_enable?
=
render
:partial
=>
'devise/sessions/new_ldap'
-
else
=
form_for
(
resource
,
:as
=>
resource_name
,
:url
=>
session_path
(
resource_name
),
:html
=>
{
:class
=>
"login-box"
})
do
|
f
|
=
image_tag
"login-logo.png"
,
:width
=>
"304"
,
:height
=>
"66"
,
:class
=>
"login-logo"
,
:alt
=>
"Login Logo"
=
f
.
text_field
:email
,
:class
=>
"text top"
,
:placeholder
=>
"Email"
=
f
.
password_field
:password
,
:class
=>
"text bottom"
,
:placeholder
=>
"Password"
-
if
devise_mapping
.
rememberable?
.clearfix.inputs-list
%label
.checkbox.remember_me
{
:for
=>
"user_remember_me"
}
=
f
.
check_box
:remember_me
%span
Remember me
%br
/
=
f
.
submit
"Sign in"
,
:class
=>
"primary btn wide"
.right
=
render
:partial
=>
"devise/shared/links"
-
if
devise_mapping
.
omniauthable?
-
resource_class
.
omniauth_providers
.
each
do
|
provider
|
%hr
/
=
link_to
"Sign in with
#{
provider
.
to_s
.
titleize
}
"
,
omniauth_authorize_path
(
resource_name
,
provider
),
:class
=>
"btn primary"
%br
/
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录