diff options
Diffstat (limited to 'app/views/projects/branches/index.html.haml')
-rw-r--r-- | app/views/projects/branches/index.html.haml | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index 8992753c676..c03de6646cf 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -1,8 +1,6 @@ - add_page_specific_style 'page_bundles/branches' - page_title _('Branches') - add_to_breadcrumbs(_('Repository'), project_tree_path(@project)) -- can_access_branch_rules = can?(current_user, :maintainer_access, @project) -- can_push_code = (can? current_user, :push_code, @project) -# Possible values for variables passed down from the projects/branches_controller.rb -# @@ -24,21 +22,21 @@ sorted_by: @sort } } - - if can_access_branch_rules - = link_to project_settings_repository_path(@project, anchor: 'js-branch-rules'), class: 'gl-button btn btn-default' do + - if can_view_branch_rules? + = link_button_to project_settings_repository_path(@project, anchor: 'js-branch-rules') do = s_('Branches|View branch rules') - - if can_push_code - = link_to new_project_branch_path(@project), class: 'gl-button btn btn-confirm' do + - if can_push_code? + = link_button_to new_project_branch_path(@project), variant: :confirm do = s_('Branches|New branch') - .js-delete-merged-branches{ data: { + .js-delete-merged-branches.gl-w-7{ data: { default_branch: @project.repository.root_ref, form_path: project_merged_branches_path(@project) } } = render_if_exists 'projects/commits/mirror_status' -- if can_access_branch_rules +- if can_view_branch_rules? = 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 } } |