diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /app/helpers/sorting_helper.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'app/helpers/sorting_helper.rb')
-rw-r--r-- | app/helpers/sorting_helper.rb | 56 |
1 files changed, 6 insertions, 50 deletions
diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb index a711f36fe05..4a9596a1347 100644 --- a/app/helpers/sorting_helper.rb +++ b/app/helpers/sorting_helper.rb @@ -44,25 +44,18 @@ module SortingHelper # rubocop: enable Metrics/AbcSize def projects_sort_options_hash - use_old_sorting = Feature.disabled?(:project_list_filter_bar) || current_controller?('admin/projects') - options = { sort_value_latest_activity => sort_title_latest_activity, sort_value_recently_created => sort_title_created_date, sort_value_name => sort_title_name, sort_value_name_desc => sort_title_name_desc, - sort_value_stars_desc => sort_title_stars + sort_value_stars_desc => sort_title_stars, + sort_value_oldest_activity => sort_title_oldest_activity, + sort_value_oldest_created => sort_title_oldest_created, + sort_value_recently_created => sort_title_recently_created, + sort_value_stars_desc => sort_title_most_stars } - if use_old_sorting - options = options.merge({ - sort_value_oldest_activity => sort_title_oldest_activity, - sort_value_oldest_created => sort_title_oldest_created, - sort_value_recently_created => sort_title_recently_created, - sort_value_stars_desc => sort_title_most_stars - }) - end - if current_controller?('admin/projects') options[sort_value_largest_repo] = sort_title_largest_repo end @@ -79,29 +72,6 @@ module SortingHelper } end - def projects_sort_option_titles - # Only used for the project filter search bar - projects_sort_options_hash.merge({ - sort_value_oldest_activity => sort_title_latest_activity, - sort_value_oldest_created => sort_title_created_date, - sort_value_name_desc => sort_title_name, - sort_value_stars_asc => sort_title_stars - }) - end - - def projects_reverse_sort_options_hash - { - sort_value_latest_activity => sort_value_oldest_activity, - sort_value_recently_created => sort_value_oldest_created, - sort_value_name => sort_value_name_desc, - sort_value_stars_desc => sort_value_stars_asc, - sort_value_oldest_activity => sort_value_latest_activity, - sort_value_oldest_created => sort_value_recently_created, - sort_value_name_desc => sort_value_name, - sort_value_stars_asc => sort_value_stars_desc - } - end - def forks_reverse_sort_options_hash { sort_value_recently_created => sort_value_oldest_created, @@ -188,13 +158,6 @@ module SortingHelper } end - def runners_sort_options_hash - { - sort_value_created_date => sort_title_created_date, - sort_value_contacted_date => sort_title_contacted_date - } - end - def starrers_sort_options_hash { sort_value_name => sort_title_name, @@ -308,7 +271,7 @@ module SortingHelper end def sort_direction_button(reverse_url, reverse_sort, sort_value) - link_class = 'gl-button btn btn-default btn-icon has-tooltip reverse-sort-btn qa-reverse-sort rspec-reverse-sort' + link_class = 'gl-button btn btn-default btn-icon has-tooltip reverse-sort-btn rspec-reverse-sort' icon = sort_direction_icon(sort_value) url = reverse_url @@ -329,13 +292,6 @@ module SortingHelper sort_direction_button(url, reverse_sort, sort_value) end - def project_sort_direction_button(sort_value) - reverse_sort = projects_reverse_sort_options_hash[sort_value] - url = filter_projects_path(sort: reverse_sort) - - sort_direction_button(url, reverse_sort, sort_value) - end - def packages_sort_options_hash { sort_value_recently_created => sort_title_created_date, |