diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-03 00:07:46 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-02-03 00:07:46 +0300 |
commit | 9579eee8954e0405c2dadb19c2a73c9597ce37ea (patch) | |
tree | d90223b7e449d8d25eef60ad16084ce0d2ca2b1b /app/views/projects/branches | |
parent | 0a9b6b99a9bdcacea434501320f1a8d131a33827 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/views/projects/branches')
-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 475bc9e1c20..f43d19e2542 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -2,6 +2,11 @@ - page_title _('Branches') - add_to_breadcrumbs(_('Repository'), project_tree_path(@project)) +-# Possible values for variables passed down from the projects/branches_controller.rb +-# +-# @mode - overview|active|stale|all (default:overview) +-# @sort - name_asc|updated_asc|updated_desc + .top-area.gl-border-0 = gl_tabs_nav({ class: 'gl-flex-grow-1 gl-border-b-0' }) do = gl_tab_link_to s_('Branches|Overview'), project_branches_path(@project), { item_active: @mode == 'overview', title: s_('Branches|Show overview of the branches') } @@ -10,7 +15,12 @@ = gl_tab_link_to s_('Branches|All'), project_branches_filtered_path(@project, state: 'all'), { item_active: %w[overview active stale].exclude?(@mode), title: s_('Branches|Show all branches') } .nav-controls - #js-branches-sort-dropdown{ data: { project_branches_filtered_path: project_branches_path(@project, state: 'all'), sort_options: branches_sort_options_hash.to_json, mode: @mode } } + #js-branches-sort-dropdown{ data: { + project_branches_filtered_path: project_branches_path(@project, state: 'all'), + sort_options: branches_sort_options_hash.to_json, + show_dropdown: @mode == 'overview' ? 'false' : 'true', + sorted_by: @sort } + } - if can? current_user, :push_code, @project .js-delete-merged-branches{ data: { |