Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
cc4405db
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,发现更多精彩内容 >>
提交
cc4405db
编写于
8月 03, 2015
作者:
D
Dmitriy Zaporozhets
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'add-license'
上级
c1c89500
f71d67dd
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
69 addition
and
8 deletion
+69
-8
CHANGELOG
CHANGELOG
+1
-0
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+9
-0
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+40
-4
app/views/projects/show.html.haml
app/views/projects/show.html.haml
+18
-3
app/views/shared/issuable/_form.html.haml
app/views/shared/issuable/_form.html.haml
+1
-1
未找到文件。
CHANGELOG
浏览文件 @
cc4405db
...
...
@@ -25,6 +25,7 @@ v 7.14.0 (unreleased)
- Fix bug causing Bitbucket importer to crash when OAuth application had been removed.
- Add fetch command to the MR page.
- Add ability to manage user email addresses via the API.
- Show buttons to add license, changelog and contribution guide if they're missing.
- Disabled autocapitalize and autocorrect on login field (Daryl Chan)
- Mention group and project name in creation, update and deletion notices (Achilleas Pipinellis)
- Remove redis-store TTL monkey patch
...
...
app/assets/stylesheets/pages/projects.scss
浏览文件 @
cc4405db
...
...
@@ -297,6 +297,15 @@ table.table.protected-branches-list tr.no-border {
ul
.nav-pills
{
display
:inline-block
;
}
li
{
display
:inline
;
}
a
{
float
:left
;
}
li
.missing
a
{
color
:
#bbb
;
border
:
1px
dashed
#ccc
;
&
:hover
{
background-color
:
#FAFAFA
;
}
}
}
pre
.light-well
{
...
...
app/helpers/projects_helper.rb
浏览文件 @
cc4405db
...
...
@@ -184,7 +184,43 @@ module ProjectsHelper
end
end
def
contribution_guide_url
(
project
)
def
add_contribution_guide_path
(
project
)
if
project
&&
!
project
.
repository
.
contribution_guide
namespace_project_new_blob_path
(
project
.
namespace
,
project
,
project
.
default_branch
,
file_name:
"CONTRIBUTING.md"
,
commit_message:
"Add contribution guide"
)
end
end
def
add_changelog_path
(
project
)
if
project
&&
!
project
.
repository
.
changelog
namespace_project_new_blob_path
(
project
.
namespace
,
project
,
project
.
default_branch
,
file_name:
"CHANGELOG"
,
commit_message:
"Add changelog"
)
end
end
def
add_license_path
(
project
)
if
project
&&
!
project
.
repository
.
license
namespace_project_new_blob_path
(
project
.
namespace
,
project
,
project
.
default_branch
,
file_name:
"LICENSE"
,
commit_message:
"Add license"
)
end
end
def
contribution_guide_path
(
project
)
if
project
&&
contribution_guide
=
project
.
repository
.
contribution_guide
namespace_project_blob_path
(
project
.
namespace
,
...
...
@@ -195,7 +231,7 @@ module ProjectsHelper
end
end
def
changelog_
url
(
project
)
def
changelog_
path
(
project
)
if
project
&&
changelog
=
project
.
repository
.
changelog
namespace_project_blob_path
(
project
.
namespace
,
...
...
@@ -206,7 +242,7 @@ module ProjectsHelper
end
end
def
license_
url
(
project
)
def
license_
path
(
project
)
if
project
&&
license
=
project
.
repository
.
license
namespace_project_blob_path
(
project
.
namespace
,
...
...
@@ -217,7 +253,7 @@ module ProjectsHelper
end
end
def
version_
url
(
project
)
def
version_
path
(
project
)
if
project
&&
version
=
project
.
repository
.
version
namespace_project_blob_path
(
project
.
namespace
,
...
...
app/views/projects/show.html.haml
浏览文件 @
cc4405db
...
...
@@ -22,19 +22,34 @@
%li
=
link_to
namespace_project_tags_path
(
@project
.
namespace
,
@project
)
do
=
pluralize
(
number_with_delimiter
(
@repository
.
tag_names
.
count
),
'tag'
)
-
if
@repository
.
changelog
%li
=
link_to
changelog_
url
(
@project
)
do
=
link_to
changelog_
path
(
@project
)
do
Changelog
-
if
@repository
.
license
%li
=
link_to
license_
url
(
@project
)
do
=
link_to
license_
path
(
@project
)
do
License
-
if
@repository
.
contribution_guide
%li
=
link_to
contribution_guide_
url
(
@project
)
do
=
link_to
contribution_guide_
path
(
@project
)
do
Contribution guide
-
if
current_user
&&
can_push_branch?
(
@project
,
@project
.
default_branch
)
-
unless
@repository
.
changelog
%li
.missing
=
link_to
add_changelog_path
(
@project
)
do
Add Changelog
-
unless
@repository
.
license
%li
.missing
=
link_to
add_license_path
(
@project
)
do
Add License
-
unless
@repository
.
contribution_guide
%li
.missing
=
link_to
add_contribution_guide_path
(
@project
)
do
Add Contribution guide
-
if
@project
.
archived?
.text-warning.center.prepend-top-20
%p
...
...
app/views/shared/issuable/_form.html.haml
浏览文件 @
cc4405db
...
...
@@ -100,7 +100,7 @@
=
link_to
'Change branches'
,
mr_change_branches_path
(
@merge_request
)
.form-actions
-
if
!
issuable
.
project
.
empty_repo?
&&
(
guide_url
=
contribution_guide_
url
(
issuable
.
project
))
&&
!
issuable
.
persisted?
-
if
!
issuable
.
project
.
empty_repo?
&&
(
guide_url
=
contribution_guide_
path
(
issuable
.
project
))
&&
!
issuable
.
persisted?
%p
Please review the
%strong
#{
link_to
'guidelines for contribution'
,
guide_url
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录