diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 15:14:54 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-17 15:14:54 +0000 |
commit | 46d07ca5c2b729d6396723290a875a317b2845ee (patch) | |
tree | cb4c7572244aa2ed873c848b4794ddb1dcfa45a5 /app/views/projects/branches/index.html.haml | |
parent | db30b31f056d0de120d9238a7786e19cafbce69f (diff) | |
download | gitlab-ce-46d07ca5c2b729d6396723290a875a317b2845ee.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/branches/index.html.haml')
-rw-r--r-- | app/views/projects/branches/index.html.haml | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index f43d19e2542..518292effd8 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -1,6 +1,8 @@ - add_page_specific_style 'page_bundles/branches' - page_title _('Branches') - add_to_breadcrumbs(_('Repository'), project_tree_path(@project)) +- is_branch_rules_available = (can? current_user, :maintainer_access, @project) && Feature.enabled?(:branch_rules, @project) +- can_push_code = (can? current_user, :push_code, @project) -# Possible values for variables passed down from the projects/branches_controller.rb -# @@ -22,16 +24,24 @@ sorted_by: @sort } } - - if can? current_user, :push_code, @project + - if can_push_code .js-delete-merged-branches{ data: { default_branch: @project.repository.root_ref, form_path: project_merged_branches_path(@project) } } + - if is_branch_rules_available + = link_to project_settings_repository_path(@project, anchor: 'js-branch-rules'), class: 'gl-button btn btn-default' do + = s_('Branches|View branch rules') + + - if can_push_code = link_to new_project_branch_path(@project), class: 'gl-button btn btn-confirm' do = s_('Branches|New branch') = render_if_exists 'projects/commits/mirror_status' +- if is_branch_rules_available + = render 'branch_rules_info' + .js-branch-list{ data: { diverging_counts_endpoint: diverging_commit_counts_namespace_project_branches_path(@project.namespace, @project, format: :json), default_branch: @project.default_branch } } - if @gitaly_unavailable |