summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-05-28 18:00:37 -0700
committerStan Hu <stanhu@gmail.com>2015-05-29 04:08:08 -0700
commit5e4384ec9bc5e015c6a5427e337d8f5412e91d1e (patch)
tree6ebe10b61122e0128027529676df362aadaee77b /app/views
parent06250eef2e12ed509b88f3770ae6d3fa4614b74d (diff)
downloadgitlab-ce-5e4384ec9bc5e015c6a5427e337d8f5412e91d1e.tar.gz
Support editing target branch of merge request
Closes https://github.com/gitlabhq/gitlabhq/issues/7105 See: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/130
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 2292aaaa214..b1e337c3977 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