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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
069a6dfa
Commit
069a6dfa
authored
Sep 12, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compare link for branches
parent
6f037b9f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
0 deletions
+5
-0
app/helpers/compare_helper.rb
app/helpers/compare_helper.rb
+1
-0
app/views/projects/branches/_branch.html.haml
app/views/projects/branches/_branch.html.haml
+4
-0
No files found.
app/helpers/compare_helper.rb
View file @
069a6dfa
...
...
@@ -3,6 +3,7 @@ module CompareHelper
params
[
:from
].
present?
&&
params
[
:to
].
present?
&&
@repository
.
branch_names
.
include?
(
params
[
:from
])
&&
@repository
.
branch_names
.
include?
(
params
[
:to
])
&&
params
[
:from
]
!=
params
[
:to
]
&&
!
@refs_are_same
end
...
...
app/views/projects/branches/_branch.html.haml
View file @
069a6dfa
...
...
@@ -13,6 +13,10 @@
=
link_to
archive_project_repository_path
(
@project
,
ref:
branch
.
name
),
class:
'btn grouped btn-small'
do
%i
.icon-download-alt
Download
=
link_to
project_compare_index_path
(
@project
,
from:
branch
.
name
,
to:
branch
.
name
),
class:
'btn grouped btn-small'
,
title:
"Compare"
do
%i
.icon-copy
Compare
-
if
can?
(
current_user
,
:admin_project
,
@project
)
&&
branch
.
name
!=
@repository
.
root_ref
=
link_to
project_branch_path
(
@project
,
branch
.
name
),
class:
'btn grouped btn-small remove-row'
,
method: :delete
,
confirm:
'Removed branch cannot be restored. Are you sure?'
,
remote:
true
do
%i
.icon-trash
...
...
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