2019-07-31 22:56:46 +05:30
|
|
|
- expanded = expanded_by_default?
|
2017-09-10 17:25:29 +05:30
|
|
|
|
2020-10-24 23:57:45 +05:30
|
|
|
%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } }
|
2017-09-10 17:25:29 +05:30
|
|
|
.settings-header
|
2021-04-17 20:07:23 +05:30
|
|
|
%h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only
|
2021-09-30 23:02:18 +05:30
|
|
|
= s_("ProtectedBranch|Protected branches")
|
2022-07-23 23:45:48 +05:30
|
|
|
= render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle qa-expand-protected-branches' }) do
|
|
|
|
= expanded ? _('Collapse') : _('Expand')
|
2017-09-10 17:25:29 +05:30
|
|
|
%p
|
2021-09-30 23:02:18 +05:30
|
|
|
= s_("ProtectedBranch|Keep stable branches secure and force developers to use merge requests.")
|
|
|
|
= link_to s_("ProtectedBranch|What are protected branches?"), help_page_path("user/project/protected_branches")
|
2018-03-17 18:26:18 +05:30
|
|
|
.settings-content
|
2017-09-10 17:25:29 +05:30
|
|
|
%p
|
2021-09-30 23:02:18 +05:30
|
|
|
= s_("ProtectedBranch|By default, protected branches restrict who can modify the branch.")
|
|
|
|
= link_to s_("ProtectedBranch|Learn more."), help_page_path("user/project/protected_branches", anchor: "who-can-modify-a-protected-branch")
|
2017-09-10 17:25:29 +05:30
|
|
|
|
|
|
|
- if can? current_user, :admin_project, @project
|
|
|
|
= content_for :create_protected_branch
|
|
|
|
|
|
|
|
= content_for :branches_list
|