summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_branches
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/protected_branches')
-rw-r--r--app/views/projects/protected_branches/shared/_create_protected_branch.html.haml13
-rw-r--r--app/views/projects/protected_branches/shared/_index.html.haml13
2 files changed, 11 insertions, 15 deletions
diff --git a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
index 7131e9925b3..6ce01566a42 100644
--- a/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
+++ b/app/views/projects/protected_branches/shared/_create_protected_branch.html.haml
@@ -6,24 +6,21 @@
.card-body
= form_errors(@protected_branch)
.form-group.row
- .col-md-2.text-right
- = f.label :name, 'Branch:'
+ = 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
+ = (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
- %label.col-md-2.text-right{ for: 'merge_access_levels_attributes' }
- = s_("ProtectedBranch|Allowed to merge:")
+ = 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
- %label.col-md-2.text-right{ for: 'push_access_levels_attributes' }
- = s_("ProtectedBranch|Allowed to push:")
+ = 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
- = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form'
+ = render_if_exists 'projects/protected_branches/ee/code_owner_approval_form', f: f
.card-footer
= f.submit s_('ProtectedBranch|Protect'), class: 'btn-success btn', disabled: true, data: { qa_selector: 'protect_button' }
diff --git a/app/views/projects/protected_branches/shared/_index.html.haml b/app/views/projects/protected_branches/shared/_index.html.haml
index f27936703de..66173c4759b 100644
--- a/app/views/projects/protected_branches/shared/_index.html.haml
+++ b/app/views/projects/protected_branches/shared/_index.html.haml
@@ -7,16 +7,15 @@
%button.btn.js-settings-toggle.qa-expand-protected-branches{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
- Keep stable branches secure and force developers to use merge requests.
+ Keep stable branches secure, and force developers to use merge requests. #{link_to "What are protected branches?", help_page_path("user/project/protected_branches")}
.settings-content
%p
- By default, protected branches are designed to:
+ By default, protected branches protect your code and:
%ul
- %li prevent their creation, if not already created, from everybody except Maintainers
- %li prevent pushes from everybody except Maintainers
- %li prevent <strong>anyone</strong> from force pushing to the branch
- %li prevent <strong>anyone</strong> from deleting the branch
- %p Read more about #{link_to "protected branches", help_page_path("user/project/protected_branches")} and #{link_to "project permissions", help_page_path("user/permissions")}.
+ %li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create new protected branches.
+ %li Allow only users with Maintainer permissions to push code.
+ %li Prevent <strong>anyone</strong> from force-pushing to the branch.
+ %li Prevent <strong>anyone</strong> from deleting the branch.
- if can? current_user, :admin_project, @project
= content_for :create_protected_branch