diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 15:06:26 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-31 15:06:26 +0300 |
commit | 0be510a49f6e4f8e27b19b707fd1dac61571f78f (patch) | |
tree | 97ca0053d4fad66e900d25fdba61b2adb611efb0 /app/views/shared/issuable | |
parent | 6026bddcd51eca573c530240c421392045172b89 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/shared/issuable')
-rw-r--r-- | app/views/shared/issuable/_form.html.haml | 5 | ||||
-rw-r--r-- | app/views/shared/issuable/form/_branch_chooser.html.haml | 30 | ||||
-rw-r--r-- | app/views/shared/issuable/form/_merge_params.html.haml | 14 |
3 files changed, 24 insertions, 25 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml index 5e2b5f95ee3..a8aae03aad7 100644 --- a/app/views/shared/issuable/_form.html.haml +++ b/app/views/shared/issuable/_form.html.haml @@ -12,6 +12,9 @@ = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), target: "_blank", rel: 'noopener noreferrer' and make sure your changes will not unintentionally remove theirs += render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form + +%hr .form-group.row = form.label :title, class: 'col-form-label col-sm-2' @@ -34,8 +37,6 @@ = render_if_exists 'shared/issuable/approvals', issuable: issuable, presenter: presenter, form: form -= render 'shared/issuable/form/branch_chooser', issuable: issuable, form: form - = render 'shared/issuable/form/merge_params', issuable: issuable = render 'shared/issuable/form/contribution', issuable: issuable, form: form diff --git a/app/views/shared/issuable/form/_branch_chooser.html.haml b/app/views/shared/issuable/form/_branch_chooser.html.haml index fbc96baa0f7..03eebe7c987 100644 --- a/app/views/shared/issuable/form/_branch_chooser.html.haml +++ b/app/views/shared/issuable/form/_branch_chooser.html.haml @@ -4,21 +4,19 @@ - return unless issuable.is_a?(MergeRequest) - return if issuable.closed_without_fork? -%hr -- if issuable.new_record? - .form-group.row - = form.label :source_branch, class: 'col-form-label col-sm-2' - .col-sm-10 - .issuable-form-select-holder - = form.select(:source_branch, [issuable.source_branch], {}, { class: 'source_branch select2 ref-name', disabled: true }) -.form-group.row - = form.label :target_branch, class: 'col-form-label col-sm-2' - .col-sm-10.target-branch-select-dropdown-container - .issuable-form-select-holder - = form.hidden_field(:target_branch, - { class: 'target_branch js-target-branch-select ref-name', - disabled: issuable.new_record?, - data: { placeholder: "Select branch", endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) +- source_title, target_title = format_mr_branch_names(@merge_request) + +.form-group.row.d-flex.gl-pl-3.gl-pr-3.branch-selector + .align-self-center + %span= s_('From %{source_title} into').html_safe % { source_title: "<code>#{source_title}</code>".html_safe } - if issuable.new_record? + %code= target_title - = link_to 'Change branches', mr_change_branches_path(issuable) + = link_to _('Change branches'), mr_change_branches_path(issuable) + - elsif issuable.for_fork? + %code= issuable.target_project_path + ":" + - unless issuable.new_record? + %span.dropdown.prepend-left-5.d-inline-block + = form.hidden_field(:target_branch, + { class: 'target_branch js-target-branch-select ref-name mw-xl', + data: { placeholder: _('Select branch'), endpoint: refs_project_path(@project, sort: 'updated_desc', find: 'branches') }}) diff --git a/app/views/shared/issuable/form/_merge_params.html.haml b/app/views/shared/issuable/form/_merge_params.html.haml index f0c4acdd07f..1b557214e02 100644 --- a/app/views/shared/issuable/form/_merge_params.html.haml +++ b/app/views/shared/issuable/form/_merge_params.html.haml @@ -3,17 +3,17 @@ - return unless issuable.is_a?(MergeRequest) - return if issuable.closed_without_fork? -- if issuable.can_remove_source_branch?(current_user) - .form-group.row - .col-sm-10.offset-sm-2 - .form-check +.form-group.row + .col-sm-2.col-form-label.pt-sm-0 + %label + = _('Merge options') + .col-sm-10 + - if issuable.can_remove_source_branch?(current_user) + .form-check.append-bottom-default = hidden_field_tag 'merge_request[force_remove_source_branch]', '0', id: nil = check_box_tag 'merge_request[force_remove_source_branch]', '1', issuable.force_remove_source_branch?, class: 'form-check-input' = label_tag 'merge_request[force_remove_source_branch]', class: 'form-check-label' do Delete source branch when merge request is accepted. - -.form-group.row - .col-sm-10.offset-sm-2 .form-check = hidden_field_tag 'merge_request[squash]', '0', id: nil = check_box_tag 'merge_request[squash]', '1', issuable.squash, class: 'form-check-input' |