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
4e2e1aad
Commit
4e2e1aad
authored
Oct 06, 2020
by
Lakshit
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply gl-button class to projects/compare
parent
8054d618
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
app/views/projects/compare/_form.html.haml
app/views/projects/compare/_form.html.haml
+4
-4
changelogs/unreleased/-231207-projects-compare.yml
changelogs/unreleased/-231207-projects-compare.yml
+5
-0
No files found.
app/views/projects/compare/_form.html.haml
View file @
4e2e1aad
=
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
-
if
params
[
:to
]
&&
params
[
:from
]
.compare-switch-container
=
link_to
sprite_icon
(
'substitute'
),
{
from:
params
[
:to
],
to:
params
[
:from
]
},
class:
'commits-compare-switch has-tooltip btn btn-white'
,
title:
'Swap revisions'
=
link_to
sprite_icon
(
'substitute'
),
{
from:
params
[
:to
],
to:
params
[
:from
]
},
class:
'commits-compare-switch has-tooltip btn
gl-button
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:
"btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-to-dropdown"
,
selected:
params
[
:to
],
field_name: :to
}
do
=
button_tag
type:
'button'
,
title:
params
[
:to
],
class:
"btn
gl-button
form-control compare-dropdown-toggle js-compare-dropdown has-tooltip"
,
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.monospace.float-left
=
params
[
:to
]
||
_
(
"Select branch/tag"
)
=
sprite_icon
(
'chevron-down'
,
css_class:
'float-right'
)
=
render
'shared/ref_dropdown'
...
...
@@ -19,12 +19,12 @@
.input-group-text
=
s_
(
"CompareBranches|Target"
)
=
hidden_field_tag
:from
,
params
[
:from
]
=
button_tag
type:
'button'
,
title:
params
[
:from
],
class:
"btn form-control compare-dropdown-toggle js-compare-dropdown has-tooltip"
,
required:
true
,
data:
{
refs_url:
refs_project_path
(
@project
),
toggle:
"dropdown"
,
target:
".js-compare-from-dropdown"
,
selected:
params
[
:from
],
field_name: :from
}
do
=
button_tag
type:
'button'
,
title:
params
[
:from
],
class:
"btn
gl-button
form-control compare-dropdown-toggle js-compare-dropdown has-tooltip"
,
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.monospace.float-left
=
params
[
:from
]
||
_
(
"Select branch/tag"
)
=
sprite_icon
(
'chevron-down'
,
css_class:
'float-right'
)
=
render
'shared/ref_dropdown'
=
button_tag
s_
(
"CompareBranches|Compare"
),
class:
"btn btn-success commits-compare-btn"
=
button_tag
s_
(
"CompareBranches|Compare"
),
class:
"btn
gl-button
btn-success commits-compare-btn"
-
if
@merge_request
.
present?
=
link_to
_
(
"View open merge request"
),
project_merge_request_path
(
@project
,
@merge_request
),
class:
'gl-ml-3 btn'
-
elsif
create_mr_button?
...
...
changelogs/unreleased/-231207-projects-compare.yml
0 → 100644
View file @
4e2e1aad
---
title
:
Apply GitLab UI button styles to buttons in app/views/projects/compare directory
merge_request
:
44342
author
:
Lakshit
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