Welcome to mirror list, hosted at ThFree Co, Russian Federation.

_default_branch.html.haml « repository « settings « groups « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: cae33820a05a146011f89294abe9e350b3342b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
%section.settings.as-default-branch-name.no-animate#js-default-branch-name{ class: ('expanded' if expanded_by_default?) }
  .settings-header
    %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
      = _('Default branch')
    = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do
      = expanded_by_default? ? _('Collapse') : _('Expand')
    %p
      = s_('GroupSettings|Set the initial name and protections for the default branch of new repositories created in the group.')
  .settings-content
    = gitlab_ui_form_for @group, url: group_path(@group, anchor: 'js-default-branch-name'), html: { class: 'fieldset-form' } do |f|
      = form_errors(@group, pajamas_alert: true)
      - fallback_branch_name = "<code>#{Gitlab::DefaultBranch.value(object: @group)}</code>"

      %fieldset
        .form-group
          = f.label :default_branch_name, _('Initial default branch name'), class: 'label-light'
          = f.text_field :default_branch_name, value: group.namespace_settings&.default_branch_name, placeholder: Gitlab::DefaultBranch.value(object: @group), class: 'form-control'
          %span.form-text.text-muted
            = (s_("GroupSettings|If not specified at the group or instance level, the default is %{default_initial_branch_name}. Does not affect existing repositories.") % { default_initial_branch_name: fallback_branch_name }).html_safe

        = render 'groups/settings/default_branch_protection', f: f, group: @group

        = f.hidden_field :redirect_target, value: "repository_settings"
        = f.submit _('Save changes'), class: 'btn gl-button btn-confirm'