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
00a842ea
Commit
00a842ea
authored
Nov 25, 2016
by
Gabriel Gizotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add toggle links for using default message and description on change merge commit message container
parent
b4764a8d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
_accept.html.haml
...ews/projects/merge_requests/widget/open/_accept.html.haml
+1
-0
_commit_message_container.html.haml
app/views/shared/_commit_message_container.html.haml
+28
-0
No files found.
app/views/projects/merge_requests/widget/open/_accept.html.haml
View file @
00a842ea
...
...
@@ -41,6 +41,7 @@
Modify commit message
.js-toggle-content.hide.prepend-top-default
=
render
'shared/commit_message_container'
,
params:
params
,
description:
@merge_request
.
description
,
text:
@merge_request
.
merge_commit_message
,
rows:
14
,
hint:
true
...
...
app/views/shared/_commit_message_container.html.haml
View file @
00a842ea
...
...
@@ -14,3 +14,31 @@
%p
.hint
Try to keep the first line under 52 characters
and the others under 72.
-
if
local_assigns
[
:description
]
%p
.hint.use-description-hint
=
link_to
"#"
,
class:
"use-description-link"
do
Use Merge Request description as merge commit message
%p
.hint.use-default-message-hint.hide
=
link_to
"#"
,
class:
"use-default-message-link"
do
Use default Gitlab merge commit message
:javascript
$
(
'.use-description-link'
).
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
$
(
'.use-description-hint'
).
hide
();
$
(
'.use-default-message-hint'
).
show
();
$
(
'.js-commit-message'
).
val
(
"
#{
escape_javascript
local_assigns
[
:description
]
}
"
);
});
$
(
'.use-default-message-link'
).
on
(
'click'
,
function
(
e
)
{
e
.
preventDefault
();
var
defaultMessage
=
"
#{
escape_javascript
(
params
[
:commit_message
]
||
local_assigns
[
:text
]
||
local_assigns
[
:placeholder
])
}
"
;
$
(
'.use-description-hint'
).
show
();
$
(
'.use-default-message-hint'
).
hide
();
$
(
'.js-commit-message'
).
val
(
defaultMessage
);
});
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