Commit 3e0ba775 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Move command line insturction out of mr widget

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 630a9421
...@@ -61,23 +61,10 @@ ...@@ -61,23 +61,10 @@
} }
.label-branch { .label-branch {
@include border-radius(4px); color: #222;
padding: 3px 4px;
border: none;
background: $hover;
color: #333;
font-family: $monospace_font; font-family: $monospace_font;
font-weight: normal; font-weight: bold;
overflow: hidden; overflow: hidden;
.label-project {
@include border-radius-left(4px);
padding: 3px 4px;
background: #279;
position: relative;
left: -4px;
letter-spacing: -1px;
}
} }
.mr-list { .mr-list {
......
...@@ -61,4 +61,14 @@ module MergeRequestsHelper ...@@ -61,4 +61,14 @@ module MergeRequestsHelper
} }
) )
end end
def source_branch_with_namespace(merge_request)
if merge_request.for_fork?
namespace = link_to(merge_request.source_project_namespace,
project_path(merge_request.source_project))
namespace + ":#{merge_request.source_branch}"
else
merge_request.source_branch
end
end
end end
...@@ -6,21 +6,6 @@ ...@@ -6,21 +6,6 @@
= render "projects/merge_requests/show/mr_box" = render "projects/merge_requests/show/mr_box"
%hr %hr
.append-bottom-20 .append-bottom-20
.slead
%span From
- if @merge_request.for_fork?
%strong.label-branch<
- if @merge_request.source_project
= link_to @merge_request.source_project_namespace, namespace_project_path(@merge_request.source_project.namespace, @merge_request.source_project)
- else
\ #{@merge_request.source_project_namespace}
\:#{@merge_request.source_branch}
%span into
%strong.label-branch #{@merge_request.target_project_namespace}:#{@merge_request.target_branch}
- else
%strong.label-branch #{@merge_request.source_branch}
%span into
%strong.label-branch #{@merge_request.target_branch}
- if @merge_request.open? - if @merge_request.open?
.btn-group.btn-group-sm.pull-right .btn-group.btn-group-sm.pull-right
%a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} } %a.btn.btn-sm.dropdown-toggle{ data: {toggle: :dropdown} }
...@@ -30,6 +15,16 @@ ...@@ -30,6 +15,16 @@
%ul.dropdown-menu %ul.dropdown-menu
%li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch) %li= link_to "Email Patches", merge_request_path(@merge_request, format: :patch)
%li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff) %li= link_to "Plain Diff", merge_request_path(@merge_request, format: :diff)
.light
%div
%span From
%span.label-branch #{source_branch_with_namespace(@merge_request)}
%span into
%span.label-branch #{@merge_request.target_branch}
- if @merge_request.open? && !@merge_request.branch_missing?
%div
If you want to try or merge this request manually, you can use the
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
- if @merge_request.open? and @merge_request.source_branch_exists? - if @merge_request.open? and @merge_request.source_branch_exists?
.append-bottom-20 .append-bottom-20
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment