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
9e321043
Commit
9e321043
authored
Nov 29, 2016
by
Gabriel Gizotti
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
extract duplicate logic into a variable on _commit_message_container
parent
41815285
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
_commit_message_container.html.haml
app/views/shared/_commit_message_container.html.haml
+3
-2
No files found.
app/views/shared/_commit_message_container.html.haml
View file @
9e321043
.form-group.commit_message-group
-
nonce
=
SecureRandom
.
hex
-
descriptions
=
local_assigns
.
slice
(
:message_with_description
,
:message_without_description
)
=
label_tag
"commit_message-
#{
nonce
}
"
,
class:
'control-label'
do
Commit message
.col-sm-10
...
...
@@ -8,14 +9,14 @@
=
text_area_tag
'commit_message'
,
(
params
[
:commit_message
]
||
local_assigns
[
:text
]
||
local_assigns
[
:placeholder
]),
class:
'form-control js-commit-message'
,
placeholder:
local_assigns
[
:placeholder
],
data:
local_assigns
.
slice
(
:message_with_description
,
:message_without_description
)
,
data:
descriptions
,
required:
true
,
rows:
(
local_assigns
[
:rows
]
||
3
),
id:
"commit_message-
#{
nonce
}
"
-
if
local_assigns
[
:hint
]
%p
.hint
Try to keep the first line under 52 characters
and the others under 72.
-
if
local_assigns
.
slice
(
:message_with_description
,
:message_without_description
)
.
present?
-
if
descriptions
.
present?
%p
.hint.with-description-hint
=
link_to
"#"
,
class:
"with-description-link"
do
Include description in commit message
...
...
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