diff options
Diffstat (limited to 'app/views/projects/protected_branches/shared')
-rw-r--r-- | app/views/projects/protected_branches/shared/_branches_list.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/protected_branches/shared/_protected_branch.html.haml | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/projects/protected_branches/shared/_branches_list.html.haml b/app/views/projects/protected_branches/shared/_branches_list.html.haml index b13117960dd..5964f2bfeda 100644 --- a/app/views/projects/protected_branches/shared/_branches_list.html.haml +++ b/app/views/projects/protected_branches/shared/_branches_list.html.haml @@ -1,7 +1,7 @@ .protected-branches-list.js-protected-branches-list.qa-protected-branches-list - if @protected_branches.empty? .card-header.bg-white - = s_("ProtectedBranch|Protected branch (%{protected_branches_count})") % { protected_branches_count: @protected_branches_count } + = s_("ProtectedBranch|Protected branch (%{protected_branches_count})") % { protected_branches_count: 0 } %p.settings-message.text-center = s_("ProtectedBranch|There are currently no protected branches, protect a branch with the form above.") - else diff --git a/app/views/projects/protected_branches/shared/_protected_branch.html.haml b/app/views/projects/protected_branches/shared/_protected_branch.html.haml index 02ec778b97c..f3bb2a66a4c 100644 --- a/app/views/projects/protected_branches/shared/_protected_branch.html.haml +++ b/app/views/projects/protected_branches/shared/_protected_branch.html.haml @@ -5,11 +5,11 @@ %span.ref-name= protected_branch.name - if @project.root_ref?(protected_branch.name) - %span.badge.gl-badge.badge-pill.badge-info.d-inline default + = gl_badge_tag s_('ProtectedBranch|default'), variant: :info %div - if protected_branch.wildcard? - - matching_branches = protected_branch.matching(repository.branches) + - matching_branches = protected_branch.matching(repository.branch_names) = link_to pluralize(matching_branches.count, "matching branch"), namespace_project_protected_branch_path(@project.namespace, @project, protected_branch) - elsif !protected_branch.commit %span.text-muted Branch was deleted. @@ -20,4 +20,4 @@ - if can_admin_project %td - = link_to 'Unprotect', [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn gl-button btn-warning" + = link_to s_('ProtectedBranch|Unprotect'), [@project, protected_branch, { update_section: 'js-protected-branches-settings' }], disabled: local_assigns[:disabled], data: { confirm: s_('ProtectedBranch|Branch will be writable for developers. Are you sure?') }, method: :delete, class: "btn gl-button btn-warning" |