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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
269e39e8
Commit
269e39e8
authored
Sep 21, 2018
by
Lukas Eipert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix merge request header margins
parent
4ce9f2fd
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
25 deletions
+40
-25
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
.../vue_merge_request_widget/components/mr_widget_header.vue
+35
-25
changelogs/unreleased/leipert-fix-mr-widget-header-margins.yml
...elogs/unreleased/leipert-fix-mr-widget-header-margins.yml
+5
-0
No files found.
app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue
View file @
269e39e8
...
@@ -28,11 +28,17 @@ export default {
...
@@ -28,11 +28,17 @@ export default {
return
this
.
mr
.
divergedCommitsCount
>
0
;
return
this
.
mr
.
divergedCommitsCount
>
0
;
},
},
commitsBehindText
()
{
commitsBehindText
()
{
return
sprintf
(
s__
(
'
mrWidget|The source branch is %{commitsBehindLinkStart}%{commitsBehind}%{commitsBehindLinkEnd} the target branch
'
),
{
return
sprintf
(
s__
(
'
mrWidget|The source branch is %{commitsBehindLinkStart}%{commitsBehind}%{commitsBehindLinkEnd} the target branch
'
,
),
{
commitsBehindLinkStart
:
`<a href="
${
_
.
escape
(
this
.
mr
.
targetBranchPath
)}
">`
,
commitsBehindLinkStart
:
`<a href="
${
_
.
escape
(
this
.
mr
.
targetBranchPath
)}
">`
,
commitsBehind
:
n__
(
'
%d commit behind
'
,
'
%d commits behind
'
,
this
.
mr
.
divergedCommitsCount
),
commitsBehind
:
n__
(
'
%d commit behind
'
,
'
%d commits behind
'
,
this
.
mr
.
divergedCommitsCount
),
commitsBehindLinkEnd
:
'
</a>
'
,
commitsBehindLinkEnd
:
'
</a>
'
,
},
false
);
},
false
,
);
},
},
branchNameClipboardData
()
{
branchNameClipboardData
()
{
// This supports code in app/assets/javascripts/copy_to_clipboard.js that
// This supports code in app/assets/javascripts/copy_to_clipboard.js that
...
@@ -45,17 +51,24 @@ export default {
...
@@ -45,17 +51,24 @@ export default {
},
},
webIdePath
()
{
webIdePath
()
{
if
(
this
.
mr
.
canPushToSourceBranch
)
{
if
(
this
.
mr
.
canPushToSourceBranch
)
{
return
mergeUrlParams
({
return
mergeUrlParams
(
target_project
:
this
.
mr
.
sourceProjectFullPath
!==
this
.
mr
.
targetProjectFullPath
?
{
this
.
mr
.
targetProjectFullPath
:
''
,
target_project
:
},
webIDEUrl
(
`/
${
this
.
mr
.
sourceProjectFullPath
}
/merge_requests/
${
this
.
mr
.
iid
}
`
));
this
.
mr
.
sourceProjectFullPath
!==
this
.
mr
.
targetProjectFullPath
?
this
.
mr
.
targetProjectFullPath
:
''
,
},
webIDEUrl
(
`/
${
this
.
mr
.
sourceProjectFullPath
}
/merge_requests/
${
this
.
mr
.
iid
}
`
),
);
}
}
return
null
;
return
null
;
},
},
ideButtonTitle
()
{
ideButtonTitle
()
{
return
!
this
.
mr
.
canPushToSourceBranch
return
!
this
.
mr
.
canPushToSourceBranch
?
s__
(
'
mrWidget|You are not allowed to edit this project directly. Please fork to make changes.
'
)
?
s__
(
'
mrWidget|You are not allowed to edit this project directly. Please fork to make changes.
'
,
)
:
''
;
:
''
;
},
},
},
},
...
@@ -104,37 +117,34 @@ export default {
...
@@ -104,37 +117,34 @@ export default {
<div
<div
v-if=
"mr.isOpen"
v-if=
"mr.isOpen"
class=
"branch-actions"
class=
"branch-actions d-flex"
>
<span
v-tooltip
:title=
"ideButtonTitle"
data-placement=
"bottom"
tabindex=
"0"
>
>
<a
<a
v-if=
"!mr.sourceBranchRemoved"
v-if=
"!mr.sourceBranchRemoved"
v-tooltip
:href=
"webIdePath"
:href=
"webIdePath"
:title=
"ideButtonTitle"
:class=
"
{ disabled: !mr.canPushToSourceBranch }"
:class=
"
{ disabled: !mr.canPushToSourceBranch }"
class="btn btn-default inline js-web-ide d-none d-md-inline-block"
class="btn btn-default js-web-ide d-none d-md-inline-block append-right-8"
data-placement="bottom"
tabindex="0"
role="button"
role="button"
>
>
{{
s__
(
"
mrWidget|Open in Web IDE
"
)
}}
{{
s__
(
"
mrWidget|Open in Web IDE
"
)
}}
</a>
</a>
</span>
<button
<button
:disabled=
"mr.sourceBranchRemoved"
:disabled=
"mr.sourceBranchRemoved"
data-target=
"#modal_merge_info"
data-target=
"#modal_merge_info"
data-toggle=
"modal"
data-toggle=
"modal"
class=
"btn btn-default
inline js-check-out-branch
"
class=
"btn btn-default
js-check-out-branch append-right-default
"
type=
"button"
type=
"button"
>
>
{{
s__
(
"
mrWidget|Check out branch
"
)
}}
{{
s__
(
"
mrWidget|Check out branch
"
)
}}
</button>
</button>
<span
class=
"dropdown
prepend-left-10
"
>
<span
class=
"dropdown"
>
<button
<button
type=
"button"
type=
"button"
class=
"btn
inline
dropdown-toggle"
class=
"btn dropdown-toggle"
data-toggle=
"dropdown"
data-toggle=
"dropdown"
aria-label=
"Download as"
aria-label=
"Download as"
aria-haspopup=
"true"
aria-haspopup=
"true"
...
...
changelogs/unreleased/leipert-fix-mr-widget-header-margins.yml
0 → 100644
View file @
269e39e8
---
title
:
Fix merge request header margins
merge_request
:
21878
author
:
type
:
other
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