Commit 51e976d295edfefd5e2cb2dfc7967fb90c87ac40
1 parent
8eae01ea
Exists in
spb-stable
and in
2 other branches
Add assignee/milestone block to merge request edit page. And remove branches selector from this page
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
3 changed files
with
18 additions
and
50 deletions
Show diff stats
app/views/projects/merge_requests/_form.html.haml
| ... | ... | @@ -14,33 +14,6 @@ |
| 14 | 14 | - @merge_request.errors.full_messages.each do |msg| |
| 15 | 15 | %div= msg |
| 16 | 16 | |
| 17 | - .merge-request-branches | |
| 18 | - .form-group | |
| 19 | - = label_tag nil, class: 'control-label' do | |
| 20 | - From | |
| 21 | - .col-sm-10 | |
| 22 | - .clearfix | |
| 23 | - .pull-left | |
| 24 | - = f.select(:source_project_id, [[@merge_request.source_project_path,@merge_request.source_project.id]] , {}, { class: 'source_project select2 span3', disabled: @merge_request.persisted? }) | |
| 25 | - .pull-left | |
| 26 | - | |
| 27 | - = f.select(:source_branch, @merge_request.source_branches, { include_blank: "Select branch" }, {class: 'source_branch select2 span2'}) | |
| 28 | - .mr_source_commit | |
| 29 | - %br | |
| 30 | - .form-group | |
| 31 | - = label_tag nil, class: 'control-label' do | |
| 32 | - To | |
| 33 | - .col-sm-10 | |
| 34 | - .clearfix | |
| 35 | - .pull-left | |
| 36 | - - projects = @project.forked_from_project.nil? ? [@project] : [@project, @project.forked_from_project] | |
| 37 | - = f.select(:target_project_id, options_from_collection_for_select(projects, 'id', 'path_with_namespace', f.object.target_project_id), {}, { class: 'target_project select2 span3', disabled: @merge_request.persisted? }) | |
| 38 | - .pull-left | |
| 39 | - | |
| 40 | - = f.select(:target_branch, @merge_request.target_branches, { include_blank: "Select branch" }, {class: 'target_branch select2 span2'}) | |
| 41 | - .mr_target_commit | |
| 42 | - | |
| 43 | - %hr | |
| 44 | 17 | .merge-request-form-info |
| 45 | 18 | .form-group |
| 46 | 19 | = f.label :title, class: 'control-label' do |
| ... | ... | @@ -51,6 +24,23 @@ |
| 51 | 24 | .col-sm-10 |
| 52 | 25 | = f.text_area :description, class: "form-control js-gfm-input", rows: 14 |
| 53 | 26 | %p.hint Description is parsed with #{link_to "GitLab Flavored Markdown", help_markdown_path, target: '_blank'}. |
| 27 | + %hr | |
| 28 | + .form-group | |
| 29 | + .issue-assignee | |
| 30 | + = f.label :assignee_id, class: 'control-label' do | |
| 31 | + %i.icon-user | |
| 32 | + Assign to | |
| 33 | + .col-sm-10 | |
| 34 | + = project_users_select_tag('merge_request[assignee_id]', placeholder: 'Select a user', class: 'custom-form-control', selected: @merge_request.assignee_id) | |
| 35 | + | |
| 36 | + = link_to 'Assign to me', '#', class: 'btn btn-small assign-to-me-link' | |
| 37 | + .form-group | |
| 38 | + .issue-milestone | |
| 39 | + = f.label :milestone_id, class: 'control-label' do | |
| 40 | + %i.icon-time | |
| 41 | + Milestone | |
| 42 | + .col-sm-10= f.select(:milestone_id, milestone_options(@merge_request), { include_blank: "Select milestone" }, {class: 'select2'}) | |
| 43 | + | |
| 54 | 44 | |
| 55 | 45 | .form-actions |
| 56 | 46 | - if @merge_request.new_record? |
| ... | ... | @@ -66,20 +56,3 @@ |
| 66 | 56 | |
| 67 | 57 | :javascript |
| 68 | 58 | disableButtonIfEmptyField("#merge_request_title", ".btn-save"); |
| 69 | - | |
| 70 | - var source_branch = $("#merge_request_source_branch") | |
| 71 | - , target_branch = $("#merge_request_target_branch") | |
| 72 | - , target_project = $("#merge_request_target_project_id"); | |
| 73 | - | |
| 74 | - $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: source_branch.val() }); | |
| 75 | - $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: target_branch.val() }); | |
| 76 | - | |
| 77 | - target_project.on("change", function() { | |
| 78 | - $.get("#{update_branches_project_merge_requests_path(@source_project)}", {target_project_id: $(this).val() }); | |
| 79 | - }); | |
| 80 | - source_branch.on("change", function() { | |
| 81 | - $.get("#{branch_from_project_merge_requests_path(@source_project)}", {ref: $(this).val() }); | |
| 82 | - }); | |
| 83 | - target_branch.on("change", function() { | |
| 84 | - $.get("#{branch_to_project_merge_requests_path(@source_project)}", {target_project_id: target_project.val(),ref: $(this).val() }); | |
| 85 | - }); | ... | ... |
app/views/projects/merge_requests/branch_from.js.haml
app/views/projects/merge_requests/show/_mr_title.html.haml