BigW Consortium Gitlab

Commit bd875692 by Jacob Schatz

Merge branch 'show-inline-edit-btn' into 'master'

Show inline edit button for issues Closes #37474 See merge request gitlab-org/gitlab-ce!15812
parents 76f3ee2f 271ebe66
...@@ -32,7 +32,7 @@ export default { ...@@ -32,7 +32,7 @@ export default {
showInlineEditButton: { showInlineEditButton: {
type: Boolean, type: Boolean,
required: false, required: false,
default: false, default: true,
}, },
showDeleteButton: { showDeleteButton: {
type: Boolean, type: Boolean,
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
v-tooltip v-tooltip
v-if="showInlineEditButton && canUpdate" v-if="showInlineEditButton && canUpdate"
type="button" type="button"
class="btn btn-default btn-edit btn-svg" class="btn btn-default btn-edit btn-svg js-issuable-edit"
v-html="pencilIcon" v-html="pencilIcon"
title="Edit title and description" title="Edit title and description"
data-placement="bottom" data-placement="bottom"
......
import Vue from 'vue'; import Vue from 'vue';
import eventHub from './event_hub';
import issuableApp from './components/app.vue'; import issuableApp from './components/app.vue';
import '../vue_shared/vue_resource_interceptor'; import '../vue_shared/vue_resource_interceptor';
...@@ -7,12 +6,6 @@ document.addEventListener('DOMContentLoaded', () => { ...@@ -7,12 +6,6 @@ document.addEventListener('DOMContentLoaded', () => {
const initialDataEl = document.getElementById('js-issuable-app-initial-data'); const initialDataEl = document.getElementById('js-issuable-app-initial-data');
const props = JSON.parse(initialDataEl.innerHTML.replace(/"/g, '"')); const props = JSON.parse(initialDataEl.innerHTML.replace(/"/g, '"'));
$('.js-issuable-edit').on('click', (e) => {
e.preventDefault();
eventHub.$emit('open.form');
});
return new Vue({ return new Vue({
el: document.getElementById('js-issuable-app'), el: document.getElementById('js-issuable-app'),
components: { components: {
......
...@@ -39,8 +39,6 @@ ...@@ -39,8 +39,6 @@
= icon('caret-down') = icon('caret-down')
.dropdown-menu.dropdown-menu-align-right.hidden-lg .dropdown-menu.dropdown-menu-align-right.hidden-lg
%ul %ul
- if can_update_issue
%li= link_to 'Edit', edit_project_issue_path(@project, @issue), class: 'js-issuable-edit'
- unless current_user == @issue.author - unless current_user == @issue.author
%li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue)) %li= link_to 'Report abuse', new_abuse_report_path(user_id: @issue.author.id, ref_url: issue_url(@issue))
- if can_update_issue - if can_update_issue
...@@ -52,9 +50,6 @@ ...@@ -52,9 +50,6 @@
%li.divider %li.divider
%li= link_to 'New issue', new_project_issue_path(@project), title: 'New issue', id: 'new_issue_link' %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 = render 'shared/issuable/close_reopen_button', issuable: @issue, can_update: can_update_issue
- if can_report_spam - if can_report_spam
......
---
title: Move edit button to second row on issue page (and change it to a pencil icon)
merge_request:
author:
type: changed
...@@ -24,7 +24,7 @@ feature 'Issue Detail', :js do ...@@ -24,7 +24,7 @@ feature 'Issue Detail', :js do
visit project_issue_path(project, issue) visit project_issue_path(project, issue)
wait_for_requests wait_for_requests
click_link 'Edit' page.find('.js-issuable-edit').click
fill_in 'issuable-title', with: 'issue title' fill_in 'issuable-title', with: 'issue title'
click_button 'Save' click_button 'Save'
wait_for_requests wait_for_requests
......
...@@ -32,9 +32,7 @@ feature 'issuable templates', :js do ...@@ -32,9 +32,7 @@ feature 'issuable templates', :js do
message: 'added issue template', message: 'added issue template',
branch_name: 'master') branch_name: 'master')
visit project_issue_path project, issue visit project_issue_path project, issue
page.within('.js-issuable-actions') do page.find('.js-issuable-edit').click
click_on 'Edit'
end
fill_in :'issuable-title', with: 'test issue title' fill_in :'issuable-title', with: 'test issue title'
end end
...@@ -77,9 +75,7 @@ feature 'issuable templates', :js do ...@@ -77,9 +75,7 @@ feature 'issuable templates', :js do
message: 'added issue template', message: 'added issue template',
branch_name: 'master') branch_name: 'master')
visit project_issue_path project, issue visit project_issue_path project, issue
page.within('.js-issuable-actions') do page.find('.js-issuable-edit').click
click_on 'Edit'
end
fill_in :'issuable-title', with: 'test issue title' fill_in :'issuable-title', with: 'test issue title'
fill_in :'issue-description', with: prior_description fill_in :'issue-description', with: prior_description
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment