diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 74042f0bae8..82bb2d1a805 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -171,7 +171,6 @@ module ApplicationHelper def page_filter_path(options = {}) without = options.delete(:without) - add_label = options.delete(:label) options = request.query_parameters.merge(options) @@ -181,11 +180,7 @@ module ApplicationHelper end end - params = options.compact - - params.delete(:label_name) unless add_label - - "#{request.path}?#{params.to_param}" + "#{request.path}?#{options.compact.to_param}" end def outdated_browser? diff --git a/app/helpers/sorting_helper.rb b/app/helpers/sorting_helper.rb index 67c808b167a..f51b96ba8ce 100644 --- a/app/helpers/sorting_helper.rb +++ b/app/helpers/sorting_helper.rb @@ -164,7 +164,7 @@ module SortingHelper reverse_sort = issuable_reverse_sort_order_hash[sort_value] if reverse_sort - reverse_url = page_filter_path(sort: reverse_sort, label: true) + reverse_url = page_filter_path(sort: reverse_sort) else reverse_url = '#' link_class += ' disabled' diff --git a/app/views/admin/runners/_sort_dropdown.html.haml b/app/views/admin/runners/_sort_dropdown.html.haml index 19c2a50ebd9..4f4f0a543e0 100644 --- a/app/views/admin/runners/_sort_dropdown.html.haml +++ b/app/views/admin/runners/_sort_dropdown.html.haml @@ -6,6 +6,6 @@ = icon('chevron-down') %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort %li - = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date, label: true), sorted_by) - = sortable_item(sort_title_contacted_date, page_filter_path(sort: sort_value_contacted_date, label: true), sorted_by) + = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date), sorted_by) + = sortable_item(sort_title_contacted_date, page_filter_path(sort: sort_value_contacted_date), sorted_by) diff --git a/app/views/shared/_milestones_sort_dropdown.html.haml b/app/views/shared/_milestones_sort_dropdown.html.haml index bd68a3e4c84..9a1db831ad3 100644 --- a/app/views/shared/_milestones_sort_dropdown.html.haml +++ b/app/views/shared/_milestones_sort_dropdown.html.haml @@ -8,15 +8,15 @@ = icon('chevron-down') %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-sort %li - = link_to page_filter_path(sort: sort_value_due_date_soon, label: true) do + = link_to page_filter_path(sort: sort_value_due_date_soon) do = sort_title_due_date_soon - = link_to page_filter_path(sort: sort_value_due_date_later, label: true) do + = link_to page_filter_path(sort: sort_value_due_date_later) do = sort_title_due_date_later - = link_to page_filter_path(sort: sort_value_start_date_soon, label: true) do + = link_to page_filter_path(sort: sort_value_start_date_soon) do = sort_title_start_date_soon - = link_to page_filter_path(sort: sort_value_start_date_later, label: true) do + = link_to page_filter_path(sort: sort_value_start_date_later) do = sort_title_start_date_later - = link_to page_filter_path(sort: sort_value_name, label: true) do + = link_to page_filter_path(sort: sort_value_name) do = sort_title_name_asc - = link_to page_filter_path(sort: sort_value_name_desc, label: true) do + = link_to page_filter_path(sort: sort_value_name_desc) do = sort_title_name_desc diff --git a/app/views/shared/issuable/_nav.html.haml b/app/views/shared/issuable/_nav.html.haml index 157637dbd11..71123740ee4 100644 --- a/app/views/shared/issuable/_nav.html.haml +++ b/app/views/shared/issuable/_nav.html.haml @@ -4,20 +4,20 @@ %ul.nav-links.issues-state-filters.mobile-separator.nav.nav-tabs %li{ class: active_when(params[:state] == 'opened') }> - = link_to page_filter_path(state: 'opened', label: true), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do + = link_to page_filter_path(state: 'opened'), id: 'state-opened', title: "Filter by #{page_context_word} that are currently opened.", data: { state: 'opened' } do #{issuables_state_counter_text(type, :opened, display_count)} - if type == :merge_requests %li{ class: active_when(params[:state] == 'merged') }> - = link_to page_filter_path(state: 'merged', label: true), id: 'state-merged', title: 'Filter by merge requests that are currently merged.', data: { state: 'merged' } do + = link_to page_filter_path(state: 'merged'), id: 'state-merged', title: 'Filter by merge requests that are currently merged.', data: { state: 'merged' } do #{issuables_state_counter_text(type, :merged, display_count)} %li{ class: active_when(params[:state] == 'closed') }> - = link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.', data: { state: 'closed' } do + = link_to page_filter_path(state: 'closed'), id: 'state-closed', title: 'Filter by merge requests that are currently closed and unmerged.', data: { state: 'closed' } do #{issuables_state_counter_text(type, :closed, display_count)} - else %li{ class: active_when(params[:state] == 'closed') }> - = link_to page_filter_path(state: 'closed', label: true), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do + = link_to page_filter_path(state: 'closed'), id: 'state-closed', title: 'Filter by issues that are currently closed.', data: { state: 'closed' } do #{issuables_state_counter_text(type, :closed, display_count)} = render 'shared/issuable/nav_links/all', page_context_word: page_context_word, counter: issuables_state_counter_text(type, :all, display_count) diff --git a/app/views/shared/issuable/_sort_dropdown.html.haml b/app/views/shared/issuable/_sort_dropdown.html.haml index c211b9fcaa2..092f57287ca 100644 --- a/app/views/shared/issuable/_sort_dropdown.html.haml +++ b/app/views/shared/issuable/_sort_dropdown.html.haml @@ -10,11 +10,11 @@ = icon('chevron-down') %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-selectable.dropdown-menu-sort %li - = sortable_item(sort_title_priority, page_filter_path(sort: sort_value_priority, label: true), sort_title) - = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date, label: true), sort_title) - = sortable_item(sort_title_recently_updated, page_filter_path(sort: sort_value_recently_updated, label: true), sort_title) - = sortable_item(sort_title_milestone, page_filter_path(sort: sort_value_milestone, label: true), sort_title) - = sortable_item(sort_title_due_date, page_filter_path(sort: sort_value_due_date, label: true), sort_title) if viewing_issues - = sortable_item(sort_title_popularity, page_filter_path(sort: sort_value_popularity, label: true), sort_title) - = sortable_item(sort_title_label_priority, page_filter_path(sort: sort_value_label_priority, label: true), sort_title) + = sortable_item(sort_title_priority, page_filter_path(sort: sort_value_priority), sort_title) + = sortable_item(sort_title_created_date, page_filter_path(sort: sort_value_created_date), sort_title) + = sortable_item(sort_title_recently_updated, page_filter_path(sort: sort_value_recently_updated), sort_title) + = sortable_item(sort_title_milestone, page_filter_path(sort: sort_value_milestone), sort_title) + = sortable_item(sort_title_due_date, page_filter_path(sort: sort_value_due_date), sort_title) if viewing_issues + = sortable_item(sort_title_popularity, page_filter_path(sort: sort_value_popularity), sort_title) + = sortable_item(sort_title_label_priority, page_filter_path(sort: sort_value_label_priority), sort_title) = issuable_sort_direction_button(sort_value) diff --git a/app/views/shared/issuable/nav_links/_all.html.haml b/app/views/shared/issuable/nav_links/_all.html.haml index d7ad7090a45..c92a50bcb70 100644 --- a/app/views/shared/issuable/nav_links/_all.html.haml +++ b/app/views/shared/issuable/nav_links/_all.html.haml @@ -2,5 +2,5 @@ - counter = local_assigns.fetch(:counter) %li{ class: active_when(params[:state] == 'all') }> - = link_to page_filter_path(state: 'all', label: true), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do + = link_to page_filter_path(state: 'all'), id: 'state-all', title: "Show all #{page_context_word}.", data: { state: 'all' } do #{counter} diff --git a/app/views/shared/labels/_sort_dropdown.html.haml b/app/views/shared/labels/_sort_dropdown.html.haml index d664ef1cc2f..07e96eea062 100644 --- a/app/views/shared/labels/_sort_dropdown.html.haml +++ b/app/views/shared/labels/_sort_dropdown.html.haml @@ -6,4 +6,4 @@ %ul.dropdown-menu.dropdown-menu-right.dropdown-menu-sort %li - label_sort_options_hash.each do |value, title| - = sortable_item(title, page_filter_path(sort: value, label: true, subscribed: params[:subscribed]), sort_title) + = sortable_item(title, page_filter_path(sort: value), sort_title)