summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-29 15:01:54 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-05-29 15:01:54 +0000
commita1c45338f37560b044f23f1af07fea7bef2107cd (patch)
treead9deb2fe7158f1cd52f9599255c013784eae8c0 /app/views
parentab2e67550b350efb73a397a53040ec9c46966b0d (diff)
parent5e4384ec9bc5e015c6a5427e337d8f5412e91d1e (diff)
downloadgitlab-ce-a1c45338f37560b044f23f1af07fea7bef2107cd.tar.gz
Merge branch 'support-edit-target-branch-in-mr' into 'master'
Support editing target branch of merge request ### What does this MR do? This MR makes it possible to edit the target branch of a merge request and adds a system note when this happens. ### Why was this MR needed? Because lots of people requested this feature. :) ### Screenshots **Edit MR page** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/9b3d405bf7b5f945e35bae3534c2b67b/image.png) **New MR page** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/3657a2a9efad6d10e8470637d1166bdb/image.png) **System note** ![image](https://gitlab.com/gitlab-org/gitlab-ce/uploads/cc8066f3d3bdf09c0cce27193210567d/image.png) ### What are the relevant issue numbers? * Closes https://github.com/gitlabhq/gitlabhq/issues/7105 * See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/130! See merge request !738
Diffstat (limited to 'app/views')
-rw-r--r--app/views/projects/_issuable_form.html.haml18
1 files changed, 18 insertions, 0 deletions
diff --git a/app/views/projects/_issuable_form.html.haml b/app/views/projects/_issuable_form.html.haml
index c85da8eff98..2c5b24b8130 100644
--- a/app/views/projects/_issuable_form.html.haml
+++ b/app/views/projects/_issuable_form.html.haml
@@ -79,6 +79,24 @@
- if can? current_user, :admin_label, issuable.project
= link_to 'Create new label', new_namespace_project_label_path(issuable.project.namespace, issuable.project), target: :blank
+- if issuable.is_a?(MergeRequest)
+ %hr
+ - unless @merge_request.persisted?
+ .form-group
+ = f.label :source_branch, class: 'control-label' do
+ %i.fa.fa-code-fork
+ Source Branch
+ .col-sm-10
+ = f.select(:source_branch, [@merge_request.source_branch], { }, { class: 'source_branch select2 span2', disabled: true })
+ %p.help-block
+ = link_to 'Change source branch', mr_change_branches_path(@merge_request)
+ .form-group
+ = f.label :target_branch, class: 'control-label' do
+ %i.fa.fa-code-fork
+ Target Branch
+ .col-sm-10
+ = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, { class: 'target_branch select2 span2' })
+
.form-actions
- if !issuable.project.empty_repo? && (guide_url = contribution_guide_url(issuable.project)) && !issuable.persisted?
%p