[ci skip] Adds quick actions links to the toolbar
This commit is contained in:
parent
d2cfd4060f
commit
0663eb4cc2
|
|
@ -16,6 +16,7 @@
|
|||
return {
|
||||
note: '',
|
||||
markdownDocsUrl: '',
|
||||
quickActionsDocsUrl: null,
|
||||
markdownPreviewUrl: gl.issueData.preview_note_path,
|
||||
noteType: constants.COMMENT,
|
||||
issueState: state,
|
||||
|
|
@ -149,6 +150,7 @@
|
|||
const issueData = JSON.parse(issuableDataEl.innerHTML.replace(/"/g, '"'));
|
||||
|
||||
this.markdownDocsUrl = issueData.markdownDocs;
|
||||
this.quickActionsDocsUrl = issueData.quickActionsDocs;
|
||||
|
||||
eventHub.$on('issueStateChanged', (isClosed) => {
|
||||
this.issueState = isClosed ? constants.CLOSED : constants.REOPENED;
|
||||
|
|
@ -183,7 +185,8 @@
|
|||
<markdown-field
|
||||
:markdown-preview-url="markdownPreviewUrl"
|
||||
:markdown-docs="markdownDocsUrl"
|
||||
:addSpacingClasses="false">
|
||||
:quick-actions-docs="quickActionsDocsUrl"
|
||||
:add-spacing-classes="false">
|
||||
<textarea
|
||||
id="note-body"
|
||||
name="note[note]"
|
||||
|
|
@ -217,7 +220,8 @@
|
|||
aria-label="Open comment type dropdown">
|
||||
<i
|
||||
aria-hidden="true"
|
||||
class="fa fa-caret-down toggle-icon"></i>
|
||||
class="fa fa-caret-down toggle-icon">
|
||||
</i>
|
||||
</button>
|
||||
<ul class="note-type-dropdown dropdown-open-top dropdown-menu">
|
||||
<li
|
||||
|
|
|
|||
|
|
@ -21,6 +21,10 @@
|
|||
required: false,
|
||||
default: true,
|
||||
},
|
||||
quickActionsDocs: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
|
|
@ -115,7 +119,9 @@
|
|||
</i>
|
||||
</a>
|
||||
<markdown-toolbar
|
||||
:markdown-docs="markdownDocs" />
|
||||
:markdown-docs="markdownDocs"
|
||||
:quick-actions-docs="quickActionsDocs"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
|
|
|
|||
|
|
@ -5,6 +5,10 @@
|
|||
type: String,
|
||||
required: true,
|
||||
},
|
||||
quickActionsDocs: {
|
||||
type: String,
|
||||
required: false,
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
@ -12,12 +16,30 @@
|
|||
<template>
|
||||
<div class="comment-toolbar clearfix">
|
||||
<div class="toolbar-text">
|
||||
<a
|
||||
:href="markdownDocs"
|
||||
target="_blank"
|
||||
tabindex="-1">
|
||||
Markdown is supported
|
||||
</a>
|
||||
<template v-if="!quickActionsDocs && markdownDocs">
|
||||
<a
|
||||
:href="markdownDocs"
|
||||
target="_blank"
|
||||
tabindex="-1">
|
||||
Markdown is supported
|
||||
</a>
|
||||
</template>
|
||||
<template v-if="quickActionsDocs && markdownDocs">
|
||||
<a
|
||||
:href="markdownDocs"
|
||||
target="_blank"
|
||||
tabindex="-1">
|
||||
Markdown
|
||||
</a>
|
||||
and
|
||||
<a
|
||||
:href="quickActionsDocs"
|
||||
target="_blank"
|
||||
tabindex="-1">
|
||||
quick actions
|
||||
</a>
|
||||
are supported
|
||||
</template>
|
||||
</div>
|
||||
<span class="uploading-container">
|
||||
<span class="uploading-progress-container hide">
|
||||
|
|
|
|||
|
|
@ -213,7 +213,8 @@ module IssuablesHelper
|
|||
initialTitleText: issuable.title,
|
||||
initialDescriptionHtml: markdown_field(issuable, :description),
|
||||
initialDescriptionText: issuable.description,
|
||||
initialTaskStatus: issuable.task_status
|
||||
initialTaskStatus: issuable.task_status,
|
||||
quickActionsDocs: help_page_path('user/project/quick_actions'),
|
||||
}
|
||||
|
||||
data.merge!(updated_at_by(issuable))
|
||||
|
|
|
|||
Loading…
Reference in New Issue