BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
3871941d
Commit
3871941d
authored
Apr 05, 2017
by
Alfredo Sumaran
Committed by
Alfredo Sumaran
Apr 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move discussion button to its own file
Also customizes the message for the “Comment” option to match the current noteable
parent
5f947856
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
_comment_type_button.html.haml
app/views/projects/notes/_comment_type_button.html.haml
+18
-0
_form.html.haml
app/views/projects/notes/_form.html.haml
+1
-17
No files found.
app/views/projects/notes/_comment_type_button.html.haml
0 → 100644
View file @
3871941d
.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
%button
.btn.btn-nr.btn-create.comment-btn.js-comment-button.js-comment-submit-button
Comment
-
if
@note
.
can_be_discussion_note?
=
button_tag
type:
'button'
,
class:
'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion'
,
data:
{
'dropdown-trigger'
=>
'#resolvable-comment-menu'
}
do
=
icon
(
'caret-down'
)
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%li
#comment
{
data:
{
value:
''
,
'button-text'
=>
'Comment'
,
'secondary-button-text'
=>
'Comment & close merge request'
},
class:
'droplab-item-selected'
}
=
icon
(
'check'
)
.description
%strong
Comment
%p
=
"Add a general comment to this
#{
@note
.
noteable_type
.
titleize
.
downcase
}
."
%li
.divider
%li
#discussion
{
data:
{
value:
'DiscussionNote'
,
'button-text'
=>
'Start discussion'
,
'secondary-button-text'
=>
'Start discussion & close merge request'
}
}
=
icon
(
'check'
)
.description
%strong
Start discussion
%p
Discuss a specific suggestion or question that needs to be resolved.
app/views/projects/notes/_form.html.haml
View file @
3871941d
...
...
@@ -28,23 +28,7 @@
.error-alert
.note-form-actions.clearfix
.btn-group.append-right-10.comment-type-dropdown.js-comment-type-dropdown
=
f
.
submit
'Comment'
,
class:
"btn btn-nr btn-create comment-btn js-comment-button js-comment-submit-button"
-
if
@note
.
can_be_discussion_note?
=
button_tag
type:
'button'
,
class:
'btn btn-nr dropdown-toggle comment-btn js-note-new-discussion'
,
data:
{
'dropdown-trigger'
=>
'#resolvable-comment-menu'
}
do
=
icon
(
'caret-down'
)
%ul
#resolvable-comment-menu
.dropdown-menu
{
data:
{
dropdown:
true
}
}
%li
#comment
{
data:
{
value:
''
,
'button-text'
=>
'Comment'
,
'secondary-button-text'
=>
'Comment & close merge request'
},
class:
'droplab-item-selected'
}
=
icon
(
'check'
)
.description
%strong
Comment
%p
Add a general comment to this merge request.
%li
.divider
%li
#discussion
{
data:
{
value:
'DiscussionNote'
,
'button-text'
=>
'Start discussion'
,
'secondary-button-text'
=>
'Start discussion & close merge request'
}
}
=
icon
(
'check'
)
.description
%strong
Start discussion
%p
Discuss a specific suggestion or question that needs to be resolved.
=
render
partial:
'projects/notes/comment_type_button'
,
locals:
{
show_close_button:
true
}
=
yield
(
:note_actions
)
...
...
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