Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
e45e540d
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 搜索 >>
提交
e45e540d
编写于
5月 20, 2017
作者:
D
Douwe Maan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Consistently display last push event widget
上级
e20eb712
变更
20
显示空白变更内容
内联
并排
Showing
20 changed file
with
46 addition
and
57 deletion
+46
-57
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+0
-4
app/controllers/dashboard/projects_controller.rb
app/controllers/dashboard/projects_controller.rb
+1
-2
app/controllers/dashboard_controller.rb
app/controllers/dashboard_controller.rb
+0
-2
app/controllers/groups_controller.rb
app/controllers/groups_controller.rb
+0
-1
app/helpers/projects_helper.rb
app/helpers/projects_helper.rb
+1
-0
app/views/dashboard/_activities.html.haml
app/views/dashboard/_activities.html.haml
+0
-3
app/views/dashboard/activity.html.haml
app/views/dashboard/activity.html.haml
+3
-0
app/views/dashboard/projects/index.html.haml
app/views/dashboard/projects/index.html.haml
+2
-2
app/views/dashboard/projects/starred.html.haml
app/views/dashboard/projects/starred.html.haml
+2
-3
app/views/events/_event_last_push.html.haml
app/views/events/_event_last_push.html.haml
+0
-14
app/views/events/event/_push.html.haml
app/views/events/event/_push.html.haml
+1
-1
app/views/groups/_activities.html.haml
app/views/groups/_activities.html.haml
+0
-3
app/views/groups/_head.html.haml
app/views/groups/_head.html.haml
+3
-0
app/views/groups/show.html.haml
app/views/groups/show.html.haml
+1
-1
app/views/projects/_last_push.html.haml
app/views/projects/_last_push.html.haml
+19
-17
app/views/projects/activity.html.haml
app/views/projects/activity.html.haml
+2
-1
app/views/projects/merge_requests/index.html.haml
app/views/projects/merge_requests/index.html.haml
+4
-1
app/views/projects/tree/show.html.haml
app/views/projects/tree/show.html.haml
+2
-1
changelogs/unreleased/dm-consistent-last-push-event.yml
changelogs/unreleased/dm-consistent-last-push-event.yml
+4
-0
features/steps/dashboard/dashboard.rb
features/steps/dashboard/dashboard.rb
+1
-1
未找到文件。
app/assets/stylesheets/pages/projects.scss
浏览文件 @
e45e540d
...
...
@@ -384,10 +384,6 @@ a.deploy-project-label {
}
}
.last-push-widget
{
margin-top
:
-1px
;
}
.fork-namespaces
{
.row
{
-webkit-flex-wrap
:
wrap
;
...
...
app/controllers/dashboard/projects_controller.rb
浏览文件 @
e45e540d
...
...
@@ -8,7 +8,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
load_projects
(
params
.
merge
(
non_public:
true
)).
page
(
params
[
:page
])
respond_to
do
|
format
|
format
.
html
{
@last_push
=
current_user
.
recent_push
}
format
.
html
format
.
atom
do
load_events
render
layout:
false
...
...
@@ -25,7 +25,6 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
@projects
=
load_projects
(
params
.
merge
(
starred:
true
)).
includes
(
:forked_from_project
,
:tags
).
page
(
params
[
:page
])
@last_push
=
current_user
.
recent_push
@groups
=
[]
respond_to
do
|
format
|
...
...
app/controllers/dashboard_controller.rb
浏览文件 @
e45e540d
...
...
@@ -9,8 +9,6 @@ class DashboardController < Dashboard::ApplicationController
respond_to
:html
def
activity
@last_push
=
current_user
.
recent_push
respond_to
do
|
format
|
format
.
html
...
...
app/controllers/groups_controller.rb
浏览文件 @
e45e540d
...
...
@@ -165,7 +165,6 @@ class GroupsController < Groups::ApplicationController
def
user_actions
if
current_user
@last_push
=
current_user
.
recent_push
@notification_setting
=
current_user
.
notification_settings_for
(
group
)
end
end
...
...
app/helpers/projects_helper.rb
浏览文件 @
e45e540d
...
...
@@ -116,6 +116,7 @@ module ProjectsHelper
def
last_push_event
return
unless
current_user
return
current_user
.
recent_push
unless
@project
project_ids
=
[
@project
.
id
]
if
fork
=
current_user
.
fork_of
(
@project
)
...
...
app/views/dashboard/_activities.html.haml
浏览文件 @
e45e540d
.hidden-xs
=
render
"events/event_last_push"
,
event:
@last_push
.nav-block.activities
.controls
=
link_to
dashboard_projects_path
(
rss_url_options
),
class:
'btn rss-btn has-tooltip'
,
title:
'Subscribe'
do
...
...
app/views/dashboard/activity.html.haml
浏览文件 @
e45e540d
...
...
@@ -4,6 +4,9 @@
-
page_title
"Activity"
-
header_title
"Activity"
,
activity_dashboard_path
.hidden-xs
=
render
"projects/last_push"
=
render
'dashboard/activity_head'
%section
.activities
...
...
app/views/dashboard/projects/index.html.haml
浏览文件 @
e45e540d
...
...
@@ -7,11 +7,11 @@
-
unless
show_user_callout?
=
render
'shared/user_callout'
=
render
"projects/last_push"
-
if
@projects
.
any?
||
params
[
:name
]
=
render
'dashboard/projects_head'
-
if
@last_push
=
render
"events/event_last_push"
,
event:
@last_push
-
if
@projects
.
any?
||
params
[
:name
]
=
render
'projects'
...
...
app/views/dashboard/projects/starred.html.haml
浏览文件 @
e45e540d
-
page_title
"Starred Projects"
-
header_title
"Projects"
,
dashboard_projects_path
=
render
'dashboard/projects_head'
=
render
"projects/last_push"
-
if
@last_push
=
render
"events/event_last_push"
,
event:
@last_push
=
render
'dashboard/projects_head'
-
if
@projects
.
any?
||
params
[
:filter_projects
]
=
render
'projects'
...
...
app/views/events/_event_last_push.html.haml
已删除
100644 → 0
浏览文件 @
e20eb712
-
if
show_last_push_widget?
(
event
)
.row-content-block.clear-block.last-push-widget
.event-last-push
.event-last-push-text
%span
You pushed to
=
link_to
namespace_project_commits_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
ref_name
),
title:
h
(
event
.
project
.
name
)
do
%strong
=
event
.
ref_name
%span
at
%strong
=
link_to_project
event
.
project
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
.pull-right
=
link_to
new_mr_path_from_push_event
(
event
),
title:
"New merge request"
,
class:
"btn btn-info btn-sm"
do
Create merge request
app/views/events/event/_push.html.haml
浏览文件 @
e45e540d
...
...
@@ -7,7 +7,7 @@
%span
.pushed
#{
event
.
action_name
}
#{
event
.
ref_type
}
%strong
-
commits_link
=
namespace_project_commits_path
(
project
.
namespace
,
project
,
event
.
ref_name
)
=
link_to_if
project
.
repository
.
branch_exists?
(
event
.
ref_name
),
event
.
ref_name
,
commits_link
=
link_to_if
project
.
repository
.
branch_exists?
(
event
.
ref_name
),
event
.
ref_name
,
commits_link
,
class:
'ref-name'
=
render
"events/event_scope"
,
event:
event
...
...
app/views/groups/_activities.html.haml
浏览文件 @
e45e540d
.hidden-xs
=
render
"events/event_last_push"
,
event:
@last_push
.nav-block
.controls
=
link_to
group_path
(
@group
,
rss_url_options
),
class:
'btn rss-btn has-tooltip'
,
title:
'Subscribe'
do
...
...
app/views/groups/_head.html.haml
浏览文件 @
e45e540d
...
...
@@ -12,3 +12,6 @@
=
link_to
activity_group_path
(
@group
),
title:
'Activity'
do
%span
Activity
.hidden-xs
=
render
"projects/last_push"
app/views/groups/show.html.haml
浏览文件 @
e45e540d
...
...
@@ -4,8 +4,8 @@
=
auto_discovery_link_tag
(
:atom
,
group_url
(
@group
,
rss_url_options
),
title:
"
#{
@group
.
name
}
activity"
)
=
render
'groups/head'
=
render
'groups/home_panel'
=
render
'groups/home_panel'
.groups-header
{
class:
container_class
}
.top-area
...
...
app/views/projects/_last_push.html.haml
浏览文件 @
e45e540d
-
if
event
=
last_push_event
-
if
show_last_push_widget?
(
event
)
-
event
=
last_push_event
-
if
event
&&
show_last_push_widget?
(
event
)
.row-content-block.top-block.hidden-xs.white
%div
{
class:
container_class
}
.event-last-push
.event-last-push-text
%span
You pushed to
=
link_to
namespace_project_commits_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
ref_name
,
class:
'commit-sha'
)
do
=
link_to
namespace_project_commits_path
(
event
.
project
.
namespace
,
event
.
project
,
event
.
ref_name
),
class:
'ref-name'
do
%strong
=
event
.
ref_name
-
if
@project
&&
event
.
project
!=
@project
=
clipboard_button
(
text:
event
.
ref_name
,
gfm:
"`
#{
event
.
ref_name
}
`"
,
class:
'btn-clipboard btn-transparent'
,
title:
'Copy branch name to clipboard'
)
-
if
event
.
project
!=
@project
%span
at
%strong
=
link_to_project
event
.
project
=
clipboard_button
(
text:
event
.
ref_name
,
class:
'btn-clipboard btn-transparent'
,
title:
'Copy branch to clipboard'
)
#{
time_ago_with_tooltip
(
event
.
created_at
)
}
.pull-right
...
...
app/views/projects/activity.html.haml
浏览文件 @
e45e540d
-
page_title
"Activity"
=
render
"projects/head"
=
render
'projects/last_push'
%div
{
class:
container_class
}
=
render
'projects/last_push'
=
render
'projects/activity'
app/views/projects/merge_requests/index.html.haml
浏览文件 @
e45e540d
...
...
@@ -5,12 +5,15 @@
-
unless
@project
.
default_issues_tracker?
=
content_for
:sub_nav
do
=
render
"projects/merge_requests/head"
=
render
'projects/last_push'
-
content_for
:page_specific_javascripts
do
=
webpack_bundle_tag
'common_vue'
=
webpack_bundle_tag
'filtered_search'
%div
{
class:
container_class
}
=
render
'projects/last_push'
-
if
@project
.
merge_requests
.
exists?
%div
{
class:
container_class
}
.top-area
...
...
app/views/projects/tree/show.html.haml
浏览文件 @
e45e540d
...
...
@@ -4,7 +4,8 @@
=
content_for
:meta_tags
do
=
auto_discovery_link_tag
(
:atom
,
namespace_project_commits_url
(
@project
.
namespace
,
@project
,
@ref
,
rss_url_options
),
title:
"
#{
@project
.
name
}
:
#{
@ref
}
commits"
)
=
render
"projects/commits/head"
=
render
'projects/last_push'
%div
{
class:
container_class
}
=
render
'projects/last_push'
=
render
'projects/files'
,
commit:
@last_commit
,
project:
@project
,
ref:
@ref
changelogs/unreleased/dm-consistent-last-push-event.yml
0 → 100644
浏览文件 @
e45e540d
---
title
:
Consistently display last push event widget
merge_request
:
author
:
features/steps/dashboard/dashboard.rb
浏览文件 @
e45e540d
...
...
@@ -22,7 +22,7 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
end
step
'I click "Create merge request" link'
do
click_link
"Create merge request"
find_link
(
"Create merge request"
,
visible:
false
).
click
end
step
'I see prefilled new Merge Request page'
do
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录