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
Léo-Paul Géneau
gitlab-ce
Commits
dc40e2a9
Commit
dc40e2a9
authored
May 09, 2018
by
Annabel Dunstone Gray
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix broken layout on compare branches page
parent
780203dd
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
31 deletions
+30
-31
app/assets/stylesheets/pages/projects.scss
app/assets/stylesheets/pages/projects.scss
+1
-1
app/views/projects/compare/_form.html.haml
app/views/projects/compare/_form.html.haml
+28
-29
app/views/projects/diffs/_diffs.html.haml
app/views/projects/diffs/_diffs.html.haml
+1
-1
No files found.
app/assets/stylesheets/pages/projects.scss
View file @
dc40e2a9
...
...
@@ -1006,7 +1006,7 @@ pre.light-well {
margin-top
:
-20px
;
@include
media-breakpoint-up
(
sm
)
{
margin
-top
:
0
;
margin
:
0
$gl-padding-8
0
;
width
:
auto
;
}
}
...
...
app/views/projects/compare/_form.html.haml
View file @
dc40e2a9
=
form_tag
project_compare_index_path
(
@project
),
method: :post
,
class:
'form-inline js-requires-input js-signature-container'
,
data:
{
'signatures-path'
=>
signatures_namespace_project_compare_index_path
}
do
.clearfix
-
if
params
[
:to
]
&&
params
[
:from
]
.compare-switch-container
=
link_to
icon
(
'exchange'
),
{
from:
params
[
:to
],
to:
params
[
:from
]
},
class:
'commits-compare-switch has-tooltip btn btn-white'
,
title:
'Swap revisions'
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
.input-group.inline-input-group
%span
.input-group-prepend
.input-group-text
=
s_
(
"CompareBranches|Source"
)
=
hidden_field_tag
:to
,
params
[
:to
]
=
button_tag
type:
'button'
,
title:
params
[
:to
],
class:
"form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-to-dropdown"
,
selected:
params
[
:to
],
field_name: :to
}
do
.dropdown-toggle-text.str-truncated
=
params
[
:to
]
||
_
(
"Select branch/tag"
)
=
render
'shared/ref_dropdown'
.compare-ellipsis.inline
...
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
.input-group.inline-input-group
%span
.input-group-prepend
.input-group-text
=
s_
(
"CompareBranches|Target"
)
=
hidden_field_tag
:from
,
params
[
:from
]
=
button_tag
type:
'button'
,
title:
params
[
:from
],
class:
"form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-from-dropdown"
,
selected:
params
[
:from
],
field_name: :from
}
do
.dropdown-toggle-text.str-truncated
=
params
[
:from
]
||
_
(
"Select branch/tag"
)
=
render
'shared/ref_dropdown'
=
button_tag
s_
(
"CompareBranches|Compare"
),
class:
"btn btn-create commits-compare-btn"
-
if
@merge_request
.
present?
=
link_to
_
(
"View open merge request"
),
project_merge_request_path
(
@project
,
@merge_request
),
class:
'prepend-left-10 btn'
-
elsif
create_mr_button?
=
link_to
_
(
"Create merge request"
),
create_mr_path
,
class:
'prepend-left-10 btn'
-
if
params
[
:to
]
&&
params
[
:from
]
.compare-switch-container
=
link_to
icon
(
'exchange'
),
{
from:
params
[
:to
],
to:
params
[
:from
]
},
class:
'commits-compare-switch has-tooltip btn btn-white'
,
title:
'Swap revisions'
.form-group.dropdown.compare-form-group.to.js-compare-to-dropdown
.input-group.inline-input-group
%span
.input-group-prepend
.input-group-text
=
s_
(
"CompareBranches|Source"
)
=
hidden_field_tag
:to
,
params
[
:to
]
=
button_tag
type:
'button'
,
title:
params
[
:to
],
class:
"form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-to-dropdown"
,
selected:
params
[
:to
],
field_name: :to
}
do
.dropdown-toggle-text.str-truncated
=
params
[
:to
]
||
_
(
"Select branch/tag"
)
=
render
'shared/ref_dropdown'
.compare-ellipsis.inline
...
.form-group.dropdown.compare-form-group.from.js-compare-from-dropdown
.input-group.inline-input-group
%span
.input-group-prepend
.input-group-text
=
s_
(
"CompareBranches|Target"
)
=
hidden_field_tag
:from
,
params
[
:from
]
=
button_tag
type:
'button'
,
title:
params
[
:from
],
class:
"form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-from-dropdown"
,
selected:
params
[
:from
],
field_name: :from
}
do
.dropdown-toggle-text.str-truncated
=
params
[
:from
]
||
_
(
"Select branch/tag"
)
=
render
'shared/ref_dropdown'
=
button_tag
s_
(
"CompareBranches|Compare"
),
class:
"btn btn-create commits-compare-btn"
-
if
@merge_request
.
present?
=
link_to
_
(
"View open merge request"
),
project_merge_request_path
(
@project
,
@merge_request
),
class:
'prepend-left-10 btn'
-
elsif
create_mr_button?
=
link_to
_
(
"Create merge request"
),
create_mr_path
,
class:
'prepend-left-10 btn'
app/views/projects/diffs/_diffs.html.haml
View file @
dc40e2a9
...
...
@@ -15,7 +15,7 @@
-
elsif
current_controller?
(
'projects/merge_requests/diffs'
)
=
diff_merge_request_whitespace_link
(
diffs
.
project
,
@merge_request
,
class:
'd-none d-sm-block'
)
-
elsif
current_controller?
(
:compare
)
=
diff_compare_whitespace_link
(
diffs
.
project
,
params
[
:from
],
params
[
:to
],
class:
'd-none d-sm-block'
)
=
diff_compare_whitespace_link
(
diffs
.
project
,
params
[
:from
],
params
[
:to
],
class:
'd-none d-sm-
inline-
block'
)
.btn-group
=
inline_diff_btn
=
parallel_diff_btn
...
...
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