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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
0663eb4c
Commit
0663eb4c
authored
Jul 26, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ci skip] Adds quick actions links to the toolbar
parent
d2cfd406
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
10 deletions
+43
-10
app/assets/javascripts/notes/components/issue_comment_form.vue
...ssets/javascripts/notes/components/issue_comment_form.vue
+6
-2
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+7
-1
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
...ts/javascripts/vue_shared/components/markdown/toolbar.vue
+28
-6
app/helpers/issuables_helper.rb
app/helpers/issuables_helper.rb
+2
-1
No files found.
app/assets/javascripts/notes/components/issue_comment_form.vue
View file @
0663eb4c
...
@@ -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
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
0663eb4c
...
@@ -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
...
...
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
View file @
0663eb4c
...
@@ -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"
>
...
...
app/helpers/issuables_helper.rb
View file @
0663eb4c
...
@@ -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
))
...
...
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