%h3.page-title Protected branches %p.light Keep stable branches secure and force developers to use Merge Requests %hr .alert.alert-info %p Protected branches are designed to %ul %li prevent pushes from everybody except #{link_to "masters", help_page_path("permissions", "permissions"), class: "vlink"} %li prevent anyone from force pushing to the branch %li prevent anyone from deleting the branch %p Read more about #{link_to "project permissions", help_page_path("permissions", "permissions"), class: "underlined-link"} - if can? current_user, :admin_project, @project = form_for [@project.namespace.becomes(Namespace), @project, @protected_branch], html: { class: 'form-horizontal' } do |f| -if @protected_branch.errors.any? .alert.alert-danger %ul - @protected_branch.errors.full_messages.each do |msg| %li= msg .form-group = f.label :name, "Branch", class: 'control-label' .col-sm-10 = f.select(:name, @project.open_branches.map { |br| [br.name, br.name] } , {include_blank: "Select branch"}, {class: "select2"}) .form-group = f.label :developers_can_push, class: 'control-label' do Developers can push .col-sm-10 .checkbox = f.check_box :developers_can_push %span.descr Allow developers to push to this branch .form-actions = f.submit 'Protect', class: "btn-create btn" = render 'branches_list'