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
Tatuya Kamada
gitlab-ce
Commits
40c6d871
Commit
40c6d871
authored
Dec 20, 2012
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2315 from koenpunt/gh-issue-513
Added compare switch
parents
4b02f4a2
b2e31692
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
app/assets/images/switch_icon.png
app/assets/images/switch_icon.png
+0
-0
app/assets/stylesheets/sections/commits.scss
app/assets/stylesheets/sections/commits.scss
+9
-0
app/views/compare/_form.html.haml
app/views/compare/_form.html.haml
+4
-0
features/steps/project/project_browse_commits.rb
features/steps/project/project_browse_commits.rb
+2
-2
No files found.
app/assets/images/switch_icon.png
0 → 100644
View file @
40c6d871
1.17 KB
app/assets/stylesheets/sections/commits.scss
View file @
40c6d871
...
@@ -300,3 +300,12 @@
...
@@ -300,3 +300,12 @@
color
:
#fff
;
color
:
#fff
;
font-family
:
$monospace
;
font-family
:
$monospace
;
}
}
.commits-compare-switch
{
background
:
url('switch_icon.png')
;
width
:
16px
;
height
:
18px
;
text-indent
:
-9999px
;
display
:
inline-block
;
}
\ No newline at end of file
app/views/compare/_form.html.haml
View file @
40c6d871
...
@@ -13,12 +13,16 @@
...
@@ -13,12 +13,16 @@
=
text_field_tag
:from
,
params
[
:from
],
placeholder:
"master"
,
class:
"xlarge"
=
text_field_tag
:from
,
params
[
:from
],
placeholder:
"master"
,
class:
"xlarge"
=
"..."
=
"..."
=
text_field_tag
:to
,
params
[
:to
],
placeholder:
"aa8b4ef"
,
class:
"xlarge"
=
text_field_tag
:to
,
params
[
:to
],
placeholder:
"aa8b4ef"
,
class:
"xlarge"
-
if
params
[
:to
]
&&
params
[
:from
]
=
link_to
'switch'
,
{
from:
params
[
:to
],
to:
params
[
:from
]},
{
class:
'commits-compare-switch has_tooltip'
,
title:
'Switch base of comparison'
}
-
if
@refs_are_same
-
if
@refs_are_same
.alert
.alert
%span
Refs are the same
%span
Refs are the same
.actions
.actions
=
submit_tag
"Compare"
,
class:
"btn primary wide commits-compare-btn"
=
submit_tag
"Compare"
,
class:
"btn primary wide commits-compare-btn"
:javascript
:javascript
$
(
function
()
{
$
(
function
()
{
var
availableTags
=
#{
@project
.
ref_names
.
to_json
}
;
var
availableTags
=
#{
@project
.
ref_names
.
to_json
}
;
...
...
features/steps/project/project_browse_commits.rb
View file @
40c6d871
...
@@ -32,8 +32,8 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
...
@@ -32,8 +32,8 @@ class ProjectBrowseCommits < Spinach::FeatureSteps
end
end
And
'I fill compare fields with refs'
do
And
'I fill compare fields with refs'
do
fill_in
"from"
,
with:
"
bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a
"
fill_in
"from"
,
with:
"
8716fc78f3c65bbf7bcf7b574febd583bc5d2812
"
fill_in
"to"
,
with:
"
8716fc78f3c65bbf7bcf7b574febd583bc5d2812
"
fill_in
"to"
,
with:
"
bcf03b5de6c33f3869ef70d68cf06e679d1d7f9a
"
click_button
"Compare"
click_button
"Compare"
end
end
...
...
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