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
dbd58dc4
Commit
dbd58dc4
authored
Jul 26, 2016
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve merge request version switcher
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
b8fef7eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
9 deletions
+27
-9
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+6
-0
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+6
-0
app/views/projects/merge_requests/show/_versions.html.haml
app/views/projects/merge_requests/show/_versions.html.haml
+15
-9
No files found.
app/assets/stylesheets/framework/dropdowns.scss
View file @
dbd58dc4
...
@@ -17,6 +17,12 @@
...
@@ -17,6 +17,12 @@
.dropdown
{
.dropdown
{
position
:
relative
;
position
:
relative
;
.btn-link
{
&
:hover
{
cursor
:
pointer
;
}
}
}
}
.open
{
.open
{
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
dbd58dc4
...
@@ -371,3 +371,9 @@
...
@@ -371,3 +371,9 @@
}
}
}
}
}
}
.mr-version-switch
{
background
:
$background-color
;
padding
:
$gl-btn-padding
;
border-bottom
:
1px
solid
$border-color
;
}
app/views/projects/merge_requests/show/_versions.html.haml
View file @
dbd58dc4
-
if
@merge_request
.
merge_request_diffs
.
size
>
1
-
diffs_count
=
@merge_request
.
merge_request_diffs
.
count
-
latest_diff
=
@merge_request
.
merge_request_diff
.light-well
Merge Request version
-
if
diffs_count
>
1
-
latest_diff
=
@merge_request
.
merge_request_diff
.mr-version-switch
Version:
%span
.dropdown.inline
%span
.dropdown.inline
%a
.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%a
.btn-link.dropdown-toggle
{
data:
{
toggle: :dropdown
}
}
%strong
.monospace
#{
@merge_request_diff
.
base_commit
.
short_id
}
..
#{
@merge_request_diff
.
head_commit
.
short_id
}
%strong
.monospace
<
-
if
latest_diff
==
@merge_request_diff
#{
"latest"
}
-
else
#{
@merge_request_diff
.
base_commit
.
short_id
}
..
#{
@merge_request_diff
.
head_commit
.
short_id
}
%span
.caret
%span
.caret
%ul
.dropdown-menu
%ul
.dropdown-menu
.dropdown-menu-selectable
-
@merge_request
.
merge_request_diffs
.
each
do
|
merge_request_diff
|
-
@merge_request
.
merge_request_diffs
.
each
do
|
merge_request_diff
|
%li
{
class:
(
'active'
if
merge_request_diff
==
latest_diff
)
}
%li
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
,
diff_id:
merge_request_diff
.
id
)
do
=
link_to
diffs_namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
,
diff_id:
merge_request_diff
.
id
)
,
class:
(
'is-active'
if
merge_request_diff
==
@merge_request_diff
)
do
%strong
.monospace
%strong
.monospace
#{
merge_request_diff
.
base_commit
.
short_id
}
..
#{
merge_request_diff
.
head_commit
.
short_id
}
#{
merge_request_diff
.
base_commit
.
short_id
}
..
#{
merge_request_diff
.
head_commit
.
short_id
}
%br
%br
%small
%small
=
time_ago_with_tooltip
(
merge_request_diff
.
created_at
)
=
time_ago_with_tooltip
(
merge_request_diff
.
created_at
)
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