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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
96a46521
Commit
96a46521
authored
May 15, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added markdown docs link
[ci skip]
parent
aa6d92ae
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
52 additions
and
26 deletions
+52
-26
app/assets/javascripts/issue_show/components/app.vue
app/assets/javascripts/issue_show/components/app.vue
+6
-5
app/assets/javascripts/issue_show/components/description.vue
app/assets/javascripts/issue_show/components/description.vue
+21
-17
app/assets/javascripts/issue_show/components/fields/description.vue
.../javascripts/issue_show/components/fields/description.vue
+6
-1
app/assets/javascripts/issue_show/index.js
app/assets/javascripts/issue_show/index.js
+3
-0
app/assets/javascripts/vue_shared/components/markdown/field.vue
...sets/javascripts/vue_shared/components/markdown/field.vue
+6
-1
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
...ts/javascripts/vue_shared/components/markdown/toolbar.vue
+9
-2
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-0
No files found.
app/assets/javascripts/issue_show/components/app.vue
View file @
96a46521
...
@@ -45,6 +45,10 @@ export default {
...
@@ -45,6 +45,10 @@ export default {
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
markdownDocs
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
const
store
=
new
Store
({
const
store
=
new
Store
({
...
@@ -152,11 +156,8 @@ export default {
...
@@ -152,11 +156,8 @@ export default {
:store=
"store"
:store=
"store"
:show-form=
"showForm"
:show-form=
"showForm"
:can-update=
"canUpdate"
:can-update=
"canUpdate"
:description-html=
"state.descriptionHtml"
:markdown-preview-url=
"markdownPreviewUrl"
:description-text=
"state.descriptionText"
:markdown-docs=
"markdownDocs"
/>
:updated-at=
"state.updatedAt"
:task-status=
"state.taskStatus"
:markdown-preview-url=
"markdownPreviewUrl"
/>
<edit-actions
<edit-actions
v-if=
"canUpdate && showForm"
v-if=
"canUpdate && showForm"
:can-destroy=
"canDestroy"
/>
:can-destroy=
"canDestroy"
/>
...
...
app/assets/javascripts/issue_show/components/description.vue
View file @
96a46521
...
@@ -9,22 +9,6 @@
...
@@ -9,22 +9,6 @@
type
:
Boolean
,
type
:
Boolean
,
required
:
true
,
required
:
true
,
},
},
descriptionHtml
:
{
type
:
String
,
required
:
true
,
},
descriptionText
:
{
type
:
String
,
required
:
true
,
},
updatedAt
:
{
type
:
String
,
required
:
true
,
},
taskStatus
:
{
type
:
String
,
required
:
true
,
},
store
:
{
store
:
{
type
:
Object
,
type
:
Object
,
required
:
true
,
required
:
true
,
...
@@ -37,14 +21,33 @@
...
@@ -37,14 +21,33 @@
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
markdownDocs
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
state
:
this
.
store
.
state
,
preAnimation
:
false
,
preAnimation
:
false
,
pulseAnimation
:
false
,
pulseAnimation
:
false
,
timeAgoEl
:
$
(
'
.js-issue-edited-ago
'
),
timeAgoEl
:
$
(
'
.js-issue-edited-ago
'
),
};
};
},
},
computed
:
{
descriptionHtml
()
{
return
this
.
state
.
descriptionHtml
;
},
descriptionText
()
{
return
this
.
state
.
descriptionText
;
},
updatedAt
()
{
return
this
.
state
.
updated_at
;
},
taskStatus
()
{
return
this
.
state
.
taskStatus
;
},
},
watch
:
{
watch
:
{
descriptionHtml
()
{
descriptionHtml
()
{
this
.
animateChange
();
this
.
animateChange
();
...
@@ -102,7 +105,8 @@
...
@@ -102,7 +105,8 @@
<description-field
<description-field
v-if=
"showForm"
v-if=
"showForm"
:store=
"store"
:store=
"store"
:markdown-preview-url=
"markdownPreviewUrl"
/>
:markdown-preview-url=
"markdownPreviewUrl"
:markdown-docs=
"markdownDocs"
/>
<div
<div
v-else-if=
"descriptionHtml"
v-else-if=
"descriptionHtml"
class=
"description"
class=
"description"
...
...
app/assets/javascripts/issue_show/components/fields/description.vue
View file @
96a46521
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
type
:
String
,
type
:
String
,
required
:
true
,
required
:
true
,
},
},
markdownDocs
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -32,7 +36,8 @@
...
@@ -32,7 +36,8 @@
Description
Description
</label>
</label>
<markdown-field
<markdown-field
:markdown-preview-url=
"markdownPreviewUrl"
>
:markdown-preview-url=
"markdownPreviewUrl"
:markdown-docs=
"markdownDocs"
>
<textarea
<textarea
id=
"issue-description"
id=
"issue-description"
class=
"note-textarea js-gfm-input js-autosize markdown-area"
class=
"note-textarea js-gfm-input js-autosize markdown-area"
...
...
app/assets/javascripts/issue_show/index.js
View file @
96a46521
...
@@ -26,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -26,6 +26,7 @@ document.addEventListener('DOMContentLoaded', () => {
endpoint
,
endpoint
,
issuableRef
,
issuableRef
,
markdownPreviewUrl
,
markdownPreviewUrl
,
markdownDocs
,
}
=
issuableElement
.
dataset
;
}
=
issuableElement
.
dataset
;
return
{
return
{
...
@@ -37,6 +38,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -37,6 +38,7 @@ document.addEventListener('DOMContentLoaded', () => {
initialDescriptionHtml
:
issuableDescriptionElement
?
issuableDescriptionElement
.
innerHTML
:
''
,
initialDescriptionHtml
:
issuableDescriptionElement
?
issuableDescriptionElement
.
innerHTML
:
''
,
initialDescriptionText
:
issuableDescriptionTextarea
?
issuableDescriptionTextarea
.
textContent
:
''
,
initialDescriptionText
:
issuableDescriptionTextarea
?
issuableDescriptionTextarea
.
textContent
:
''
,
markdownPreviewUrl
,
markdownPreviewUrl
,
markdownDocs
,
};
};
},
},
render
(
createElement
)
{
render
(
createElement
)
{
...
@@ -50,6 +52,7 @@ document.addEventListener('DOMContentLoaded', () => {
...
@@ -50,6 +52,7 @@ document.addEventListener('DOMContentLoaded', () => {
initialDescriptionHtml
:
this
.
initialDescriptionHtml
,
initialDescriptionHtml
:
this
.
initialDescriptionHtml
,
initialDescriptionText
:
this
.
initialDescriptionText
,
initialDescriptionText
:
this
.
initialDescriptionText
,
markdownPreviewUrl
:
this
.
markdownPreviewUrl
,
markdownPreviewUrl
:
this
.
markdownPreviewUrl
,
markdownDocs
:
this
.
markdownDocs
,
},
},
});
});
},
},
...
...
app/assets/javascripts/vue_shared/components/markdown/field.vue
View file @
96a46521
...
@@ -10,6 +10,10 @@
...
@@ -10,6 +10,10 @@
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
markdownDocs
:
{
type
:
String
,
required
:
true
,
},
},
},
data
()
{
data
()
{
return
{
return
{
...
@@ -84,7 +88,8 @@
...
@@ -84,7 +88,8 @@
aria-hidden=
"true"
>
aria-hidden=
"true"
>
</i>
</i>
</a>
</a>
<markdown-toolbar
/>
<markdown-toolbar
:markdown-docs=
"markdownDocs"
/>
</div>
</div>
</div>
</div>
<div
<div
...
...
app/assets/javascripts/vue_shared/components/markdown/toolbar.vue
View file @
96a46521
<
script
>
<
script
>
export
default
{
props
:
{
markdownDocs
:
{
type
:
String
,
required
:
true
,
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"comment-toolbar clearfix"
>
<div
class=
"comment-toolbar clearfix"
>
<div
class=
"toolbar-text"
>
<div
class=
"toolbar-text"
>
<a
<a
href=
"/d
ocs"
:href=
"markdownD
ocs"
target=
"_blank"
target=
"_blank"
tabindex=
"-1"
>
tabindex=
"-1"
>
Markdown is supported
Markdown is supported
...
...
app/views/projects/issues/show.html.haml
View file @
96a46521
...
@@ -56,6 +56,7 @@
...
@@ -56,6 +56,7 @@
"can-destroy"
=>
can?
(
current_user
,
:destroy_issue
,
@issue
).
to_s
,
"can-destroy"
=>
can?
(
current_user
,
:destroy_issue
,
@issue
).
to_s
,
"issuable-ref"
=>
@issue
.
to_reference
,
"issuable-ref"
=>
@issue
.
to_reference
,
"markdown-preview-url"
=>
preview_markdown_path
(
@project
),
"markdown-preview-url"
=>
preview_markdown_path
(
@project
),
"markdown-docs"
=>
help_page_path
(
'user/markdown'
),
}
}
}
}
%h2
.title
=
markdown_field
(
@issue
,
:title
)
%h2
.title
=
markdown_field
(
@issue
,
:title
)
-
if
@issue
.
description
.
present?
-
if
@issue
.
description
.
present?
...
...
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