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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
3098e7a4
Commit
3098e7a4
authored
Sep 27, 2014
by
Ciro Santilli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor commit message textareas.
parent
b0349915
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
26 additions
and
37 deletions
+26
-37
app/assets/javascripts/merge_request.js.coffee
app/assets/javascripts/merge_request.js.coffee
+1
-1
app/controllers/projects/merge_requests_controller.rb
app/controllers/projects/merge_requests_controller.rb
+1
-1
app/views/projects/blob/_remove.html.haml
app/views/projects/blob/_remove.html.haml
+2
-6
app/views/projects/edit_tree/show.html.haml
app/views/projects/edit_tree/show.html.haml
+2
-7
app/views/projects/merge_requests/show/_mr_accept.html.haml
app/views/projects/merge_requests/show/_mr_accept.html.haml
+3
-9
app/views/projects/new_tree/show.html.haml
app/views/projects/new_tree/show.html.haml
+2
-9
app/views/shared/_commit_message_container.html.haml
app/views/shared/_commit_message_container.html.haml
+14
-3
features/steps/project/merge_requests.rb
features/steps/project/merge_requests.rb
+1
-1
No files found.
app/assets/javascripts/merge_request.js.coffee
View file @
3098e7a4
...
@@ -15,7 +15,7 @@ class MergeRequest
...
@@ -15,7 +15,7 @@ class MergeRequest
modal
=
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
modal
=
$
(
'#modal_merge_info'
).
modal
(
show
:
false
)
disableButtonIfEmptyField
'#
merge_
commit_message'
,
'.accept_merge_request'
disableButtonIfEmptyField
'#commit_message'
,
'.accept_merge_request'
# Local jQuery finder
# Local jQuery finder
...
...
app/controllers/projects/merge_requests_controller.rb
View file @
3098e7a4
...
@@ -122,7 +122,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
...
@@ -122,7 +122,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
if
@merge_request
.
open?
&&
@merge_request
.
can_be_merged?
if
@merge_request
.
open?
&&
@merge_request
.
can_be_merged?
@merge_request
.
should_remove_source_branch
=
params
[
:should_remove_source_branch
]
@merge_request
.
should_remove_source_branch
=
params
[
:should_remove_source_branch
]
@merge_request
.
automerge!
(
current_user
,
params
[
:
merge_
commit_message
])
@merge_request
.
automerge!
(
current_user
,
params
[
:commit_message
])
@status
=
true
@status
=
true
else
else
@status
=
false
@status
=
false
...
...
app/views/projects/blob/_remove.html.haml
View file @
3098e7a4
...
@@ -10,12 +10,8 @@
...
@@ -10,12 +10,8 @@
.modal-body
.modal-body
=
form_tag
project_blob_path
(
@project
,
@id
),
method: :delete
,
class:
'form-horizontal'
do
=
form_tag
project_blob_path
(
@project
,
@id
),
method: :delete
,
class:
'form-horizontal'
do
.form-group.commit_message-group
=
render
'shared/commit_message_container'
,
params:
params
,
=
label_tag
'commit_message'
,
class:
"control-label"
do
placeholder:
'Removed this file because...'
Commit message
.col-sm-10
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
'commit_message'
,
params
[
:commit_message
],
placeholder:
"Removed this file because..."
,
required:
true
,
rows:
3
,
class:
'form-control'
)}
.form-group
.form-group
.col-sm-2
.col-sm-2
.col-sm-10
.col-sm-10
...
...
app/views/projects/edit_tree/show.html.haml
View file @
3098e7a4
...
@@ -21,13 +21,8 @@
...
@@ -21,13 +21,8 @@
.center
.center
%h2
%h2
%i
.icon-spinner.icon-spin
%i
.icon-spinner.icon-spin
=
render
'shared/commit_message_container'
,
params:
params
,
.form-group.commit_message-group
placeholder:
"Update
#{
@blob
.
name
}
"
=
label_tag
'commit_message'
,
class:
"control-label"
do
Commit message
.col-sm-10
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
'commit_message'
,
''
,
placeholder:
"Update
#{
@blob
.
name
}
"
,
required:
true
,
rows:
3
,
class:
'form-control'
)}
.form-actions
.form-actions
=
hidden_field_tag
'last_commit'
,
@last_commit
=
hidden_field_tag
'last_commit'
,
@last_commit
=
hidden_field_tag
'content'
,
''
,
id:
"file-content"
=
hidden_field_tag
'content'
,
''
,
id:
"file-content"
...
...
app/views/projects/merge_requests/show/_mr_accept.html.haml
View file @
3098e7a4
...
@@ -22,15 +22,9 @@
...
@@ -22,15 +22,9 @@
%strong
=
link_to
"modify merge commit message"
,
"#"
,
class:
"modify-merge-commit-link js-toggle-button"
,
title:
"Modify merge commit message"
%strong
=
link_to
"modify merge commit message"
,
"#"
,
class:
"modify-merge-commit-link js-toggle-button"
,
title:
"Modify merge commit message"
before accepting merge request
before accepting merge request
.js-toggle-content.hide
.js-toggle-content.hide
.form-group
=
render
'shared/commit_message_container'
,
params:
params
,
=
label_tag
:merge_commit_message
,
"Commit message"
,
class:
'control-label'
text:
@merge_request
.
merge_commit_message
,
.col-sm-10
rows:
14
,
hint:
true
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
:merge_commit_message
,
@merge_request
.
merge_commit_message
,
class:
"form-control js-gfm-input"
,
rows:
14
,
required:
true
)}
%p
.hint
Try to keep the first line under 52 characters
and the others under 72.
.accept-group
.accept-group
.pull-left
.pull-left
=
f
.
submit
"Accept Merge Request"
,
class:
"btn btn-create accept_merge_request"
=
f
.
submit
"Accept Merge Request"
,
class:
"btn btn-create accept_merge_request"
...
...
app/views/projects/new_tree/show.html.haml
View file @
3098e7a4
...
@@ -19,15 +19,8 @@
...
@@ -19,15 +19,8 @@
Encoding
Encoding
.col-sm-10
.col-sm-10
=
select_tag
:encoding
,
options_for_select
([
"base64"
,
"text"
],
"text"
),
class:
'form-control'
=
select_tag
:encoding
,
options_for_select
([
"base64"
,
"text"
],
"text"
),
class:
'form-control'
=
render
'shared/commit_message_container'
,
params:
params
,
.form-group.commit_message-group
placeholder:
'Add new file'
=
label_tag
'commit_message'
,
class:
"control-label"
do
Commit message
.col-sm-10
=
render
'shared/commit_message_container'
,
{
textarea:
text_area_tag
(
'commit_message'
,
params
[
:commit_message
],
placeholder:
'Add new file'
,
required:
true
,
rows:
3
,
class:
'form-control'
)}
.file-holder
.file-holder
.file-title
.file-title
%i
.icon-file
%i
.icon-file
...
...
app/views/shared/_commit_message_container.html.haml
View file @
3098e7a4
.commit-message-container
.form-group.commit_message-group
.max-width-marker
=
label_tag
'commit_message'
,
class:
'control-label'
do
=
textarea
Commit message
.col-sm-10
.commit-message-container
.max-width-marker
=
text_area_tag
'commit_message'
,
(
params
[
:commit_message
]
||
local_assigns
[
:text
]),
class:
'form-control'
,
placeholder:
local_assigns
[
:placeholder
],
required:
true
,
rows:
(
local_assigns
[
:rows
]
||
3
)
-
if
local_assigns
[
:hint
]
%p
.hint
Try to keep the first line under 52 characters
and the others under 72.
features/steps/project/merge_requests.rb
View file @
3098e7a4
...
@@ -154,7 +154,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
...
@@ -154,7 +154,7 @@ class Spinach::Features::ProjectMergeRequests < Spinach::FeatureSteps
step
'I modify merge commit message'
do
step
'I modify merge commit message'
do
find
(
'.modify-merge-commit-link'
).
click
find
(
'.modify-merge-commit-link'
).
click
fill_in
'
merge_commit_message'
,
with:
"wow such merge"
fill_in
'
commit_message'
,
with:
'wow such merge'
end
end
step
'merge request "Bug NS-05" is mergeable'
do
step
'merge request "Bug NS-05" is mergeable'
do
...
...
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