BigW Consortium Gitlab

Commit 234f176d by Lukas Eipert Committed by Rémy Coutable

Cleanup code for General Project Settings

parent ec1d3e10
- form = local_assigns.fetch(:form) - form = local_assigns.fetch(:form)
- project = local_assigns.fetch(:project) - project = local_assigns.fetch(:project)
.form-check .form-group
= label_tag :merge_method_merge, class: 'label-light' do
Merge method
.form-check
= label_tag :project_merge_method_merge do
= form.radio_button :merge_method, :merge, class: "js-merge-method-radio"
%strong Merge commit
%br
%span.descr
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
.form-check
= label_tag :project_merge_method_rebase_merge do
= form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio"
%strong Merge commit with semi-linear history
%br
%span.descr
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible.
This way you could make sure that if this merge request would build, after merging to target branch it would also build.
%br
%span.descr
When fast-forward merge is not possible, the user is given the option to rebase.
.form-check
= label_tag :project_merge_method_ff do = label_tag :project_merge_method_ff do
= form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff" = form.radio_button :merge_method, :ff, class: "js-merge-method-radio qa-radio-button-merge-ff"
%strong Fast-forward merge %strong Fast-forward merge
......
- form = local_assigns.fetch(:form)
.form-check
= label_tag :project_merge_method_rebase_merge do
= form.radio_button :merge_method, :rebase_merge, class: "js-merge-method-radio"
%strong Merge commit with semi-linear history
%br
%span.descr
A merge commit is created for every merge, but merging is only allowed if fast-forward merge is possible.
This way you could make sure that if this merge request would build, after merging to target branch it would also build.
%br
%span.descr
When fast-forward merge is not possible, the user is given the option to rebase.
- form = local_assigns.fetch(:form) - form = local_assigns.fetch(:form)
.form-group = render 'projects/merge_request_merge_method_settings', project: @project, form: form
= label_tag :merge_method_merge, class: 'label-light' do
Merge method
.form-check
= label_tag :project_merge_method_merge do
= form.radio_button :merge_method, :merge, class: "js-merge-method-radio"
%strong Merge commit
%br
%span.descr
A merge commit is created for every merge, and merging is allowed as long as there are no conflicts.
= render 'merge_request_rebase_settings', form: form
= render 'merge_request_fast_forward_settings', project: @project, form: form
= render 'projects/merge_request_merge_settings', form: form = render 'projects/merge_request_merge_settings', form: form
...@@ -33,10 +33,15 @@ ...@@ -33,10 +33,15 @@
%span.light (optional) %span.light (optional)
= f.text_area :description, class: "form-control", rows: 3, maxlength: 250 = f.text_area :description, class: "form-control", rows: 3, maxlength: 250
= render_if_exists 'projects/classification_policy_settings', f: f
- unless @project.empty_repo? - unless @project.empty_repo?
.form-group .form-group
= f.label :default_branch, "Default Branch", class: 'label-light' = f.label :default_branch, "Default Branch", class: 'label-light'
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'}) = f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
= render_if_exists 'shared/repository_size_limit_setting', form: f, type: :project
.form-group .form-group
= f.label :tag_list, "Tags", class: 'label-light' = f.label :tag_list, "Tags", class: 'label-light'
= f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control" = f.text_field :tag_list, value: @project.tag_list.sort.join(', '), maxlength: 2000, class: "form-control"
...@@ -75,6 +80,8 @@ ...@@ -75,6 +80,8 @@
.js-project-permissions-form .js-project-permissions-form
= f.submit 'Save changes', class: "btn btn-save" = f.submit 'Save changes', class: "btn btn-save"
= render_if_exists 'projects/issues_settings'
%section.settings.merge-requests-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] } %section.settings.merge-requests-feature.no-animate{ class: [('expanded' if expanded), ('hidden' if @project.project_feature.send(:merge_requests_access_level) == 0)] }
.settings-header .settings-header
%h4 %h4
...@@ -84,10 +91,14 @@ ...@@ -84,10 +91,14 @@
%p %p
Customize your merge request restrictions. Customize your merge request restrictions.
.settings-content .settings-content
= render_if_exists 'shared/promotions/promote_mr_features'
= form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form" }, authenticity_token: true do |f| = form_for [@project.namespace.becomes(Namespace), @project], remote: true, html: { multipart: true, class: "merge-request-settings-form" }, authenticity_token: true do |f|
= render 'merge_request_settings', form: f = render 'projects/merge_request_settings', form: f
= f.submit 'Save changes', class: "btn btn-save qa-save-merge-request-changes" = f.submit 'Save changes', class: "btn btn-save qa-save-merge-request-changes"
= render_if_exists 'projects/service_desk_settings'
= render 'export', project: @project = render 'export', project: @project
%section.settings.advanced-settings.no-animate{ class: ('expanded' if expanded) } %section.settings.advanced-settings.no-animate{ class: ('expanded' if expanded) }
......
...@@ -5,7 +5,7 @@ module QA ...@@ -5,7 +5,7 @@ module QA
class MergeRequest < QA::Page::Base class MergeRequest < QA::Page::Base
include Common include Common
view 'app/views/projects/_merge_request_fast_forward_settings.html.haml' do view 'app/views/projects/_merge_request_merge_method_settings.html.haml' do
element :radio_button_merge_ff element :radio_button_merge_ff
end end
......
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