diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-19 18:23:33 +0000 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-04-19 18:23:33 +0000 |
commit | c57e66bebb930b1a7be539a809f7f5a8188e9870 (patch) | |
tree | 6c84ba4400337d631ef7b1ded5546944b5569216 /app/views | |
parent | bb6dcf2d1ab01ecaec92e3144992b62302b007f4 (diff) | |
parent | 476fc19743291bb34a050d380c06a5aef5926cb0 (diff) | |
download | gitlab-ce-c57e66bebb930b1a7be539a809f7f5a8188e9870.tar.gz |
Merge branch 'branches-sort-toggle-empty' into 'master'
Fixed branches sort toggle being empty
Closes #30950
See merge request !10764
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/branches/index.html.haml | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/app/views/projects/branches/index.html.haml b/app/views/projects/branches/index.html.haml index bd1f2d96f56..91b86280e4c 100644 --- a/app/views/projects/branches/index.html.haml +++ b/app/views/projects/branches/index.html.haml @@ -15,16 +15,14 @@ .dropdown.inline> %button.dropdown-menu-toggle{ type: 'button', 'data-toggle' => 'dropdown' } %span.light - = projects_sort_options_hash[@sort] + = branches_sort_options_hash[@sort] = icon('chevron-down') - %ul.dropdown-menu.dropdown-menu-align-right - %li - = link_to filter_branches_path(sort: sort_value_name) do - = sort_title_name - = link_to filter_branches_path(sort: sort_value_recently_updated) do - = sort_title_recently_updated - = link_to filter_branches_path(sort: sort_value_oldest_updated) do - = sort_title_oldest_updated + %ul.dropdown-menu.dropdown-menu-align-right.dropdown-menu-selectable + %li.dropdown-header + Sort by + - branches_sort_options_hash.each do |value, title| + %li + = link_to title, filter_branches_path(sort: value), class: ("is-active" if @sort == value) - if can? current_user, :push_code, @project = link_to namespace_project_merged_branches_path(@project.namespace, @project), class: 'btn btn-inverted btn-remove has-tooltip', title: "Delete all branches that are merged into '#{@project.repository.root_ref}'", method: :delete, data: { confirm: "Deleting the merged branches cannot be undone. Are you sure?", container: 'body' } do |