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

_create_protected_branch.html.haml « shared « protected_branches « projects « views « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: ae03b198bc9819ba35e836a00d629cc658edc1cd (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
25
26
27
28
29
30
31
32
33
= form_for [@project, @protected_branch], html: { class: 'new-protected-branch js-new-protected-branch' } do |f|
  %input{ type: 'hidden', name: 'update_section', value: 'js-protected-branches-settings' }
  .card
    .card-header
      = s_("ProtectedBranch|Protect a branch")
    .card-body
      = form_errors(@protected_branch)
      .form-group.row
        = f.label :name, s_('ProtectedBranch|Branch:'), class: 'col-md-2 text-left text-md-right'
        .col-md-10
          = render partial: "projects/protected_branches/shared/dropdown", locals: { f: f }
          .form-text.text-muted
            - wildcards_url = help_page_url('user/project/protected_branches', anchor: 'wildcard-protected-branches')
            - wildcards_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wildcards_url }
            = (s_("ProtectedBranch|%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}*-stable%{code_tag_end} or %{code_tag_start}production/*%{code_tag_end} are supported.") % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>', code_tag_start: '<code>', code_tag_end: '</code>' }).html_safe
      .form-group.row
        = f.label :merge_access_levels_attributes, s_("ProtectedBranch|Allowed to merge:"), class: 'col-md-2 text-left text-md-right'
        .col-md-10
          = yield :merge_access_levels
      .form-group.row
        = f.label :push_access_levels_attributes, s_("ProtectedBranch|Allowed to push:"), class: 'col-md-2 text-left text-md-right'
        .col-md-10
          = yield :push_access_levels
      - if ::Feature.enabled?(:allow_force_push_to_protected_branches, @project)
        .form-group.row
          = f.label :allow_force_push, s_("ProtectedBranch|Allow force push:"), class: 'col-md-2 gl-text-left text-md-right'
          .col-md-10
            = render "shared/buttons/project_feature_toggle", class_list: "js-force-push-toggle project-feature-toggle"
            .form-text.gl-text-gray-600.gl-mt-0
              = s_("ProtectedBranch|Allow force push for all users with push access.")
      = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form', f: f
    .card-footer
      = f.submit s_('ProtectedBranch|Protect'), class: 'btn-success gl-button btn', disabled: true, data: { qa_selector: 'protect_button' }