diff options
Diffstat (limited to 'app/views/protected_branches/shared/_index.html.haml')
-rw-r--r-- | app/views/protected_branches/shared/_index.html.haml | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/views/protected_branches/shared/_index.html.haml b/app/views/protected_branches/shared/_index.html.haml new file mode 100644 index 00000000000..c204508d355 --- /dev/null +++ b/app/views/protected_branches/shared/_index.html.haml @@ -0,0 +1,20 @@ +- expanded = expanded_by_default? + +%section.settings.no-animate#js-protected-branches-settings{ class: ('expanded' if expanded), data: { qa_selector: 'protected_branches_settings_content' } } + .settings-header + %h4.settings-title.js-settings-toggle.js-settings-toggle-trigger-only + = s_("ProtectedBranch|Protected branches") + = render Pajamas::ButtonComponent.new(button_options: { class: 'js-settings-toggle' }) do + = expanded ? _('Collapse') : _('Expand') + %p + = 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") + .settings-content + %p + = 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") + + - if can? current_user, :admin_project, @project + = content_for :create_protected_branch + + = content_for :branches_list |