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
Jérome Perrin
gitlab-ce
Commits
49bef99c
Commit
49bef99c
authored
Jun 09, 2017
by
Bob Van Landuyt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a bunch of missing translations
parent
b5a14e74
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
29 additions
and
23 deletions
+29
-23
app/models/commit.rb
app/models/commit.rb
+3
-2
app/views/projects/blob/_upload.html.haml
app/views/projects/blob/_upload.html.haml
+5
-3
app/views/projects/buttons/_download.html.haml
app/views/projects/buttons/_download.html.haml
+1
-1
app/views/projects/buttons/_dropdown.html.haml
app/views/projects/buttons/_dropdown.html.haml
+1
-1
app/views/projects/buttons/_fork.html.haml
app/views/projects/buttons/_fork.html.haml
+1
-1
app/views/projects/commit/_change.html.haml
app/views/projects/commit/_change.html.haml
+9
-8
app/views/projects/commits/_commit.html.haml
app/views/projects/commits/_commit.html.haml
+5
-3
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
.../projects/merge_requests/conflicts/_submit_form.html.haml
+1
-1
app/views/shared/_commit_message_container.html.haml
app/views/shared/_commit_message_container.html.haml
+1
-1
app/views/shared/_new_commit_form.html.haml
app/views/shared/_new_commit_form.html.haml
+2
-2
No files found.
app/models/commit.rb
View file @
49bef99c
# coding: utf-8
class
Commit
extend
ActiveModel
::
Naming
...
...
@@ -138,7 +139,7 @@ class Commit
safe_message
.
split
(
"
\n
"
,
2
)[
1
].
try
(
:chomp
)
end
def
description?
description
.
present?
end
...
...
@@ -291,7 +292,7 @@ class Commit
end
def
change_type_title
(
user
)
merged_merge_request?
(
user
)
?
'merge request'
:
'commit'
merged_merge_request?
(
user
)
?
s_
(
'ChangeType|merge request'
)
:
s_
(
'ChangeType|commit'
)
end
# Get the URI type of the given path
...
...
app/views/projects/blob/_upload.html.haml
View file @
49bef99c
...
...
@@ -9,8 +9,10 @@
.dropzone
.dropzone-previews.blob-upload-dropzone-previews
%p
.dz-message.light
Attach a file by drag
&
drop or
=
link_to
'click to upload'
,
'#'
,
class:
"markdown-selector"
-
upload_link
=
link_to
n_
(
'UploadLink|click to upload'
),
'#'
,
class:
"markdown-selector"
-
dropzone_text
=
_
(
'Attach a file by drag & drop or %{upload_link}'
)
%
{
upload_link:
upload_link
}
#{
dropzone_text
.
html_safe
}
%br
.dropzone-alerts.alert.alert-danger.data
{
style:
"display:none"
}
...
...
@@ -18,7 +20,7 @@
.form-actions
=
button_tag
button_title
,
class:
'btn btn-small btn-create btn-upload-file'
,
id:
'submit-all'
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
=
link_to
_
(
"Cancel"
)
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
-
unless
can?
(
current_user
,
:push_code
,
@project
)
.inline.prepend-left-10
...
...
app/views/projects/buttons/_download.html.haml
View file @
49bef99c
...
...
@@ -2,7 +2,7 @@
-
if
!
project
.
empty_repo?
&&
can?
(
current_user
,
:download_code
,
project
)
.project-action-button.dropdown.inline
>
%button
.btn.has-tooltip
{
title:
'Download'
,
'data-toggle'
=>
'dropdown'
,
'aria-label'
=>
s_
(
'DownloadSource|Download'
)
}
%button
.btn.has-tooltip
{
title:
s_
(
'DownloadSource|Download'
)
,
'data-toggle'
=>
'dropdown'
,
'aria-label'
=>
s_
(
'DownloadSource|Download'
)
}
=
icon
(
'download'
)
=
icon
(
"caret-down"
)
%span
.sr-only
=
_
(
'Select Archive Format'
)
...
...
app/views/projects/buttons/_dropdown.html.haml
View file @
49bef99c
-
if
current_user
.project-action-button.dropdown.inline
%a
.btn.dropdown-toggle.has-tooltip
{
href:
'#'
,
title:
'Create new...'
,
'data-toggle'
=>
'dropdown'
,
'data-container'
=>
'body'
,
'aria-label'
=>
'Create new...'
}
%a
.btn.dropdown-toggle.has-tooltip
{
href:
'#'
,
title:
_
(
'Create new...'
),
'data-toggle'
=>
'dropdown'
,
'data-container'
=>
'body'
,
'aria-label'
=>
_
(
'Create new...'
)
}
=
icon
(
'plus'
)
=
icon
(
"caret-down"
)
%ul
.dropdown-menu.dropdown-menu-align-right.project-home-dropdown
...
...
app/views/projects/buttons/_fork.html.haml
View file @
49bef99c
...
...
@@ -10,5 +10,5 @@
%span
=
s_
(
'CreateNewFork|Fork'
)
.count-with-arrow
%span
.arrow
=
link_to
namespace_project_forks_path
(
@project
.
namespace
,
@project
),
title:
n_
(
'Forks'
,
@project
.
forks_count
),
class:
'count'
do
=
link_to
namespace_project_forks_path
(
@project
.
namespace
,
@project
),
title:
n_
(
'Fork
'
,
'Fork
s'
,
@project
.
forks_count
),
class:
'count'
do
=
@project
.
forks_count
app/views/projects/commit/_change.html.haml
View file @
49bef99c
-
case
type
.
to_s
-
when
'revert'
-
label
=
'Revert'
-
branch_label
=
'Revert in branch'
-
label
=
n_
(
'ChangeTypeAction|Revert'
)
-
branch_label
=
_
(
'ChangeTypeActionLabel|Revert in branch'
)
-
when
'cherry-pick'
-
label
=
'Cherry-pick'
-
branch_label
=
'Pick into branch'
-
label
=
n_
(
'ChangeTypeAction|Cherry-pick'
)
-
branch_label
=
n_
(
'ChangeTypeActionLabel|Pick into branch'
)
-
change_type
=
commit
.
change_type_title
(
current_user
)
.modal
{
id:
"modal-#{type}-commit"
}
.modal-dialog
.modal-content
.modal-header
%a
.close
{
href:
"#"
,
"data-dismiss"
=>
"modal"
}
×
%h3
.page-title
==
#{
label
}
this
#{
commit
.
change_type_title
(
current_user
)
}
%h3
.page-title
==
_("%{action} this %{change_type}")
.modal-body
=
form_tag
[
type
.
underscore
,
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
commit
],
method: :post
,
remote:
false
,
class:
"form-horizontal js-
#{
type
}
-form js-requires-input"
do
.form-group.branch
=
label_tag
'start_branch'
,
branch_label
,
class:
'control-label'
.col-sm-10
=
hidden_field_tag
:start_branch
,
@project
.
default_branch
,
id:
'start_branch'
=
dropdown_tag
(
@project
.
default_branch
,
options:
{
title:
"Switch branch"
,
filter:
true
,
placeholder:
"Search branches"
,
toggle_class:
'js-project-refs-dropdown dynamic'
,
dropdown_class:
'dropdown-menu-selectable'
,
data:
{
field_name:
"start_branch"
,
selected:
@project
.
default_branch
,
start_branch:
@project
.
default_branch
,
refs_url:
namespace_project_branches_path
(
@project
.
namespace
,
@project
),
submit_form_on_click:
false
}
})
=
dropdown_tag
(
@project
.
default_branch
,
options:
{
title:
n_
(
"BranchSwitcherTitle|Switch branch"
),
filter:
true
,
placeholder:
n_
(
"BranchSwitcherPlaceholder|Search branches"
)
,
toggle_class:
'js-project-refs-dropdown dynamic'
,
dropdown_class:
'dropdown-menu-selectable'
,
data:
{
field_name:
"start_branch"
,
selected:
@project
.
default_branch
,
start_branch:
@project
.
default_branch
,
refs_url:
namespace_project_branches_path
(
@project
.
namespace
,
@project
),
submit_form_on_click:
false
}
})
-
if
can?
(
current_user
,
:push_code
,
@project
)
.checkbox
=
label_tag
do
=
check_box_tag
'create_merge_request'
,
1
,
true
,
class:
'js-create-merge-request'
,
id:
nil
Start a
<strong>
new merge request
</strong>
with these changes
#{
_
(
'Start a <strong>new merge request</strong> with these changes'
).
html_safe
}
-
else
=
hidden_field_tag
'create_merge_request'
,
1
,
id:
nil
.form-actions
=
submit_tag
label
,
class:
'btn btn-create'
=
link_to
"Cancel"
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
=
link_to
_
(
"Cancel"
)
,
'#'
,
class:
"btn btn-cancel"
,
"data-dismiss"
=>
"modal"
-
unless
can?
(
current_user
,
:push_code
,
@project
)
.inline.prepend-left-10
...
...
app/views/projects/commits/_commit.html.haml
View file @
49bef99c
...
...
@@ -30,9 +30,11 @@
%pre
.commit-row-description.js-toggle-content
=
preserve
(
markdown
(
commit
.
description
,
pipeline: :single_line
,
author:
commit
.
author
))
.commiter
=
commit_author_link
(
commit
,
avatar:
false
,
size:
24
)
#{
_
(
'committed'
)
}
#{
time_ago_with_tooltip
(
commit
.
committed_date
)
}
-
commit_author_link
=
commit_author_link
(
commit
,
avatar:
false
,
size:
24
)
-
commit_timeago
=
time_ago_with_tooltip
(
commit
.
committed_date
)
-
commit_text
=
_
(
'%{commit_author_link} committed %{commit_timeago}'
)
%
{
commit_author_link:
commit_author_link
,
commit_timeago:
commit_timeago
}
#{
commit_text
.
html_safe
}
.commit-actions.flex-row.hidden-xs
-
if
commit
.
status
(
ref
)
...
...
app/views/projects/merge_requests/conflicts/_submit_form.html.haml
View file @
49bef99c
.form-horizontal.resolve-conflicts-form
.form-group
%label
.col-sm-2.control-label
{
"for"
=>
"commit-message"
}
Commit message
#{
_
(
'Commit message'
)
}
.col-sm-10
.commit-message-container
.max-width-marker
...
...
app/views/shared/_commit_message_container.html.haml
View file @
49bef99c
...
...
@@ -2,7 +2,7 @@
-
nonce
=
SecureRandom
.
hex
-
descriptions
=
local_assigns
.
slice
(
:message_with_description
,
:message_without_description
)
=
label_tag
"commit_message-
#{
nonce
}
"
,
class:
'control-label'
do
Commit message
#{
_
(
'Commit message'
)
}
.col-sm-10
.commit-message-container
.max-width-marker
...
...
app/views/shared/_new_commit_form.html.haml
View file @
49bef99c
...
...
@@ -5,7 +5,7 @@
-
else
-
if
can?
(
current_user
,
:push_code
,
@project
)
.form-group.branch
=
label_tag
'branch_name'
,
'Target branch'
,
class:
'control-label'
=
label_tag
'branch_name'
,
_
(
'Target Branch'
)
,
class:
'control-label'
.col-sm-10
=
text_field_tag
'branch_name'
,
@branch_name
||
tree_edit_branch
,
required:
true
,
class:
"form-control js-branch-name ref-name"
...
...
@@ -14,7 +14,7 @@
-
nonce
=
SecureRandom
.
hex
=
label_tag
"create_merge_request-
#{
nonce
}
"
do
=
check_box_tag
'create_merge_request'
,
1
,
true
,
class:
'js-create-merge-request'
,
id:
"create_merge_request-
#{
nonce
}
"
Start a
<strong>
new merge request
</strong>
with these changes
#{
_
(
'Start a <strong>new merge request</strong> with these changes'
).
html_safe
}
-
else
=
hidden_field_tag
'branch_name'
,
@branch_name
||
tree_edit_branch
=
hidden_field_tag
'create_merge_request'
,
1
...
...
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