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
74a81cbf
Commit
74a81cbf
authored
Dec 02, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix branch rendering
parent
05c9d882
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
3 deletions
+6
-3
app/helpers/merge_requests_helper.rb
app/helpers/merge_requests_helper.rb
+4
-2
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+2
-1
No files found.
app/helpers/merge_requests_helper.rb
View file @
74a81cbf
...
@@ -56,12 +56,14 @@ module MergeRequestsHelper
...
@@ -56,12 +56,14 @@ module MergeRequestsHelper
end
end
def
source_branch_with_namespace
(
merge_request
)
def
source_branch_with_namespace
(
merge_request
)
branch
=
link_to
(
merge_request
.
source_branch
,
namespace_project_commits_path
(
merge_request
.
source_project
.
namespace
,
merge_request
.
source_project
,
merge_request
.
source_branch
))
if
merge_request
.
for_fork?
if
merge_request
.
for_fork?
namespace
=
link_to
(
merge_request
.
source_project_namespace
,
namespace
=
link_to
(
merge_request
.
source_project_namespace
,
project_path
(
merge_request
.
source_project
))
project_path
(
merge_request
.
source_project
))
namespace
+
":
#{
merge_request
.
source_branch
}
"
namespace
+
":
"
+
branch
else
else
merge_request
.
source_
branch
branch
end
end
end
end
...
...
app/views/projects/merge_requests/_show.html.haml
View file @
74a81cbf
...
@@ -26,7 +26,8 @@
...
@@ -26,7 +26,8 @@
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
%li
=
link_to
"Plain Diff"
,
merge_request_path
(
@merge_request
,
format: :diff
)
.normal
.normal
%span
Request to merge
%span
Request to merge
=
link_to
source_branch_with_namespace
(
@merge_request
),
namespace_project_commits_path
(
@merge_request
.
source_project
.
namespace
,
@merge_request
.
source_project
,
@merge_request
.
source_branch
),
class:
"label-branch"
%span
.label-branch
=
source_branch_with_namespace
(
@merge_request
)
%span
into
%span
into
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@merge_request
.
target_branch
),
class:
"label-branch"
do
=
link_to
namespace_project_commits_path
(
@project
.
namespace
,
@project
,
@merge_request
.
target_branch
),
class:
"label-branch"
do
=
@merge_request
.
target_branch
=
@merge_request
.
target_branch
...
...
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