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
8f75ab21
Commit
8f75ab21
authored
May 09, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Link Commits tab to current branch from Compare page.
parent
40c8295a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/controllers/projects/compare_controller.rb
app/controllers/projects/compare_controller.rb
+2
-1
app/views/projects/commits/_head.html.haml
app/views/projects/commits/_head.html.haml
+1
-1
No files found.
app/controllers/projects/compare_controller.rb
View file @
8f75ab21
...
@@ -6,11 +6,12 @@ class Projects::CompareController < Projects::ApplicationController
...
@@ -6,11 +6,12 @@ class Projects::CompareController < Projects::ApplicationController
before_action
:authorize_download_code!
before_action
:authorize_download_code!
def
index
def
index
@ref
=
Addressable
::
URI
.
unescape
(
params
[
:to
])
end
end
def
show
def
show
base_ref
=
Addressable
::
URI
.
unescape
(
params
[
:from
])
base_ref
=
Addressable
::
URI
.
unescape
(
params
[
:from
])
head_ref
=
Addressable
::
URI
.
unescape
(
params
[
:to
])
@ref
=
head_ref
=
Addressable
::
URI
.
unescape
(
params
[
:to
])
compare_result
=
CompareService
.
new
.
execute
(
compare_result
=
CompareService
.
new
.
execute
(
current_user
,
current_user
,
...
...
app/views/projects/commits/_head.html.haml
View file @
8f75ab21
%ul
.nav.nav-tabs
%ul
.nav.nav-tabs
=
nav_link
(
controller:
[
:commit
,
:commits
])
do
=
nav_link
(
controller:
[
:commit
,
:commits
])
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@repository
.
root_ref
)
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@re
f
||
@re
pository
.
root_ref
)
do
Commits
Commits
%span
.badge
=
number_with_precision
(
@repository
.
commit_count
,
precision:
0
,
delimiter:
','
)
%span
.badge
=
number_with_precision
(
@repository
.
commit_count
,
precision:
0
,
delimiter:
','
)
=
nav_link
(
controller: :compare
)
do
=
nav_link
(
controller: :compare
)
do
...
...
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