Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
271ebe66
Commit
271ebe66
authored
Dec 19, 2017
by
Clement Ho
Committed by
Jacob Schatz
Dec 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show inline edit button for issues
parent
76f3ee2f
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
21 deletions
+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
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
View file @
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment