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