2019-07-31 22:56:46 +05:30
|
|
|
- expanded = expanded_by_default?
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
%section.settings.no-animate#default-branch-settings{ class: ('expanded' if expanded) }
|
|
|
|
.settings-header
|
2021-04-17 20:07:23 +05:30
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only= _('Default branch')
|
|
|
|
%button.btn.gl-button.btn-default.js-settings-toggle
|
2018-11-20 20:47:30 +05:30
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
|
|
|
%p
|
2021-03-11 19:13:27 +05:30
|
|
|
= _('Set the default branch for this project. All merge requests and commits are made against this branch unless you specify a different one.')
|
2018-11-20 20:47:30 +05:30
|
|
|
|
|
|
|
.settings-content
|
2020-10-24 23:57:45 +05:30
|
|
|
= form_for @project, remote: true, html: { multipart: true, anchor: 'default-branch-settings' }, authenticity_token: true do |f|
|
2020-03-13 15:44:24 +05:30
|
|
|
%fieldset
|
|
|
|
- if @project.empty_repo?
|
|
|
|
.text-secondary
|
|
|
|
= _('A default branch cannot be chosen for an empty project.')
|
|
|
|
- else
|
2018-11-20 20:47:30 +05:30
|
|
|
.form-group
|
2021-03-11 19:13:27 +05:30
|
|
|
= f.label :default_branch, "Default branch", class: 'label-bold'
|
2018-11-20 20:47:30 +05:30
|
|
|
= f.select(:default_branch, @project.repository.branch_names, {}, {class: 'select2 select-wide'})
|
2020-03-13 15:44:24 +05:30
|
|
|
|
|
|
|
.form-group
|
|
|
|
.form-check
|
|
|
|
= f.check_box :autoclose_referenced_issues, class: 'form-check-input'
|
|
|
|
= f.label :autoclose_referenced_issues, class: 'form-check-label' do
|
|
|
|
%strong= _("Auto-close referenced issues on default branch")
|
|
|
|
.form-text.text-muted
|
2021-03-11 19:13:27 +05:30
|
|
|
= _("When merge requests and commits in the default branch close, any issues they reference also close.")
|
2020-11-24 15:15:51 +05:30
|
|
|
= link_to sprite_icon('question-o'), help_page_path('user/project/issues/managing_issues.md', anchor: 'disabling-automatic-issue-closing'), target: '_blank'
|
2020-03-13 15:44:24 +05:30
|
|
|
|
2021-01-29 00:20:46 +05:30
|
|
|
= f.submit _('Save changes'), class: "gl-button btn btn-success"
|