Commit 0663eb4c authored by Filipa Lacerda's avatar Filipa Lacerda

[ci skip] Adds quick actions links to the toolbar

parent d2cfd406
......@@ -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">
<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))
......
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