From 0d4e929952c99b2f58cdbfdf28a6189172065d66 Mon Sep 17 00:00:00 2001 From: Annabel Dunstone Gray Date: Tue, 1 Aug 2023 11:03:38 -0600 Subject: [PATCH] Move branch rules into card Changelog: changed --- .../settings/repository/branch_rules/app.vue | 70 ++++++++++++------- .../branch_rules/components/branch_rule.vue | 50 +++++++------ .../projects/branch_rules/_show.html.haml | 2 +- locale/gitlab.pot | 9 ++- 4 files changed, 81 insertions(+), 50 deletions(-) diff --git a/app/assets/javascripts/projects/settings/repository/branch_rules/app.vue b/app/assets/javascripts/projects/settings/repository/branch_rules/app.vue index a4069ee5f3e329..7753b850744c2b 100644 --- a/app/assets/javascripts/projects/settings/repository/branch_rules/app.vue +++ b/app/assets/javascripts/projects/settings/repository/branch_rules/app.vue @@ -1,5 +1,5 @@ diff --git a/app/assets/javascripts/projects/settings/repository/branch_rules/components/branch_rule.vue b/app/assets/javascripts/projects/settings/repository/branch_rules/components/branch_rule.vue index a5ff478a826448..f45a5b12db680c 100644 --- a/app/assets/javascripts/projects/settings/repository/branch_rules/components/branch_rule.vue +++ b/app/assets/javascripts/projects/settings/repository/branch_rules/components/branch_rule.vue @@ -6,7 +6,7 @@ import { getAccessLevels } from '../../../utils'; export const i18n = { defaultLabel: s__('BranchRules|default'), protectedLabel: s__('BranchRules|protected'), - detailsButtonLabel: s__('BranchRules|Details'), + detailsButtonLabel: s__('BranchRules|View details'), allowForcePush: s__('BranchRules|Allowed to force push'), codeOwnerApprovalRequired: s__('BranchRules|Requires CODEOWNERS approval'), statusChecks: s__('BranchRules|%{total} status %{subject}'), @@ -153,28 +153,36 @@ export default { diff --git a/app/views/projects/branch_rules/_show.html.haml b/app/views/projects/branch_rules/_show.html.haml index 605715e2899aa4..ed7561122c07f4 100644 --- a/app/views/projects/branch_rules/_show.html.haml +++ b/app/views/projects/branch_rules/_show.html.haml @@ -12,5 +12,5 @@ = _('Define rules for who can push, merge, and the required approvals for each branch.') = link_to(_('Leave feedback.'), 'https://gitlab.com/gitlab-org/gitlab/-/issues/388149', target: '_blank', rel: 'noopener noreferrer') - .settings-content.gl-pr-0 + .settings-content #js-branch-rules{ data: { project_path: @project.full_path, branch_rules_path: project_settings_repository_branch_rules_path(@project), show_code_owners: show_code_owners.to_s, show_status_checks: show_status_checks.to_s, show_approvers: show_approvers.to_s } } diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 80ff5f27fabf41..0297a09eb8b434 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -8133,6 +8133,9 @@ msgstr "" msgid "Branch %{branch_name} was created. To set up auto deploy, choose a GitLab CI Yaml template and commit your changes. %{link_to_autodeploy_doc}" msgstr "" +msgid "Branch Rules" +msgstr "" + msgid "Branch already exists" msgstr "" @@ -8238,9 +8241,6 @@ msgstr "" msgid "BranchRules|Create wildcard: %{searchTerm}" msgstr "" -msgid "BranchRules|Details" -msgstr "" - msgid "BranchRules|Does not allow force push" msgstr "" @@ -8310,6 +8310,9 @@ msgstr "" msgid "BranchRules|Users" msgstr "" +msgid "BranchRules|View details" +msgstr "" + msgid "BranchRules|default" msgstr "" -- GitLab