Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
271ebe66
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 搜索 >>
提交
271ebe66
编写于
12月 19, 2017
作者:
C
Clement Ho
提交者:
Jacob Schatz
12月 19, 2017
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Show inline edit button for issues
上级
76f3ee2f
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
10 addition
and
21 deletion
+10
-21
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+1
-1
app/assets/javascripts/issue_show/components/title.vue
app/assets/javascripts/issue_show/components/title.vue
+1
-1
app/assets/javascripts/issue_show/index.js
app/assets/javascripts/issue_show/index.js
+0
-7
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+0
-5
changelogs/unreleased/show-inline-edit-btn.yml
changelogs/unreleased/show-inline-edit-btn.yml
+5
-0
spec/features/issues/issue_detail_spec.rb
spec/features/issues/issue_detail_spec.rb
+1
-1
spec/features/projects/issuable_templates_spec.rb
spec/features/projects/issuable_templates_spec.rb
+2
-6
未找到文件。
app/assets/javascripts/issue_show/components/app.vue
浏览文件 @
271ebe66
...
...
@@ -32,7 +32,7 @@ export default {
showInlineEditButton
:
{
type
:
Boolean
,
required
:
false
,
default
:
fals
e
,
default
:
tru
e
,
},
showDeleteButton
:
{
type
:
Boolean
,
...
...
app/assets/javascripts/issue_show/components/title.vue
浏览文件 @
271ebe66
...
...
@@ -79,7 +79,7 @@
v-tooltip
v-if=
"showInlineEditButton && canUpdate"
type=
"button"
class=
"btn btn-default btn-edit btn-svg"
class=
"btn btn-default btn-edit btn-svg
js-issuable-edit
"
v-html=
"pencilIcon"
title=
"Edit title and description"
data-placement=
"bottom"
...
...
app/assets/javascripts/issue_show/index.js
浏览文件 @
271ebe66
import
Vue
from
'
vue
'
;
import
eventHub
from
'
./event_hub
'
;
import
issuableApp
from
'
./components/app.vue
'
;
import
'
../vue_shared/vue_resource_interceptor
'
;
...
...
@@ -7,12 +6,6 @@ document.addEventListener('DOMContentLoaded', () => {
const
initialDataEl
=
document
.
getElementById
(
'
js-issuable-app-initial-data
'
);
const
props
=
JSON
.
parse
(
initialDataEl
.
innerHTML
.
replace
(
/"/g
,
'
"
'
));
$
(
'
.js-issuable-edit
'
).
on
(
'
click
'
,
(
e
)
=>
{
e
.
preventDefault
();
eventHub
.
$emit
(
'
open.form
'
);
});
return
new
Vue
({
el
:
document
.
getElementById
(
'
js-issuable-app
'
),
components
:
{
...
...
app/views/projects/issues/show.html.haml
浏览文件 @
271ebe66
...
...
@@ -39,8 +39,6 @@
=
icon
(
'caret-down'
)
.dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul
-
if
can_update_issue
%li
=
link_to
'Edit'
,
edit_project_issue_path
(
@project
,
@issue
),
class:
'js-issuable-edit'
-
unless
current_user
==
@issue
.
author
%li
=
link_to
'Report abuse'
,
new_abuse_report_path
(
user_id:
@issue
.
author
.
id
,
ref_url:
issue_url
(
@issue
))
-
if
can_update_issue
...
...
@@ -52,9 +50,6 @@
%li
.divider
%li
=
link_to
'New issue'
,
new_project_issue_path
(
@project
),
title:
'New issue'
,
id:
'new_issue_link'
-
if
can_update_issue
=
link_to
'Edit'
,
edit_project_issue_path
(
@project
,
@issue
),
class:
'hidden-xs hidden-sm btn btn-grouped js-issuable-edit'
=
render
'shared/issuable/close_reopen_button'
,
issuable:
@issue
,
can_update:
can_update_issue
-
if
can_report_spam
...
...
changelogs/unreleased/show-inline-edit-btn.yml
0 → 100644
浏览文件 @
271ebe66
---
title
:
Move edit button to second row on issue page (and change it to a pencil icon)
merge_request
:
author
:
type
:
changed
spec/features/issues/issue_detail_spec.rb
浏览文件 @
271ebe66
...
...
@@ -24,7 +24,7 @@ feature 'Issue Detail', :js do
visit
project_issue_path
(
project
,
issue
)
wait_for_requests
click_link
'Edit'
page
.
find
(
'.js-issuable-edit'
).
click
fill_in
'issuable-title'
,
with:
'issue title'
click_button
'Save'
wait_for_requests
...
...
spec/features/projects/issuable_templates_spec.rb
浏览文件 @
271ebe66
...
...
@@ -32,9 +32,7 @@ feature 'issuable templates', :js do
message:
'added issue template'
,
branch_name:
'master'
)
visit
project_issue_path
project
,
issue
page
.
within
(
'.js-issuable-actions'
)
do
click_on
'Edit'
end
page
.
find
(
'.js-issuable-edit'
).
click
fill_in
:'issuable-title'
,
with:
'test issue title'
end
...
...
@@ -77,9 +75,7 @@ feature 'issuable templates', :js do
message:
'added issue template'
,
branch_name:
'master'
)
visit
project_issue_path
project
,
issue
page
.
within
(
'.js-issuable-actions'
)
do
click_on
'Edit'
end
page
.
find
(
'.js-issuable-edit'
).
click
fill_in
:'issuable-title'
,
with:
'test issue title'
fill_in
:'issue-description'
,
with:
prior_description
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录