diff --git a/app/assets/stylesheets/cards.css b/app/assets/stylesheets/cards.css index d16a96e56..40ae23455 100644 --- a/app/assets/stylesheets/cards.css +++ b/app/assets/stylesheets/cards.css @@ -456,17 +456,6 @@ } } - .card-count__selector { - inset: 0.5cqi 0.5cqi auto auto; - position: absolute; - text-align: start; - z-index: 1; - - .popup { - inset: 1em 1em auto auto; - } - } - .input.boost__input { --hover-size: 0; --input-border-radius: 0; diff --git a/app/controllers/cards_controller.rb b/app/controllers/cards_controller.rb index 1485ad33f..83debddca 100644 --- a/app/controllers/cards_controller.rb +++ b/app/controllers/cards_controller.rb @@ -5,10 +5,7 @@ class CardsController < ApplicationController before_action :set_filter, only: :index before_action :set_card, only: %i[ show edit update destroy ] - before_action :handle_display_count, only: :index - DISPLAY_COUNT_OPTIONS = [ 6, 12, 18, 24 ].freeze - DEFAULT_DISPLAY_COUNT = 6 RECENTLY_CLOSED_LIMIT = 100 def index @@ -55,17 +52,4 @@ class CardsController < ApplicationController def deleted_notice "Card deleted" unless @card.creating? end - - def handle_display_count - if params[:set_display_count].present? - cookies[:display_count] = params[:set_display_count] - redirect_to cards_path( - params.permit(*Filter::PERMITTED_PARAMS, :collection_ids).except(:set_display_count) - ) - end - end - - def display_count - (cookies[:display_count] || DEFAULT_DISPLAY_COUNT).to_i - end end diff --git a/app/helpers/cards_helper.rb b/app/helpers/cards_helper.rb index c340f2827..d52545b93 100644 --- a/app/helpers/cards_helper.rb +++ b/app/helpers/cards_helper.rb @@ -10,15 +10,4 @@ module CardsHelper "--card-rotate: #{value}deg;" end - - def display_count_options - CardsController::DISPLAY_COUNT_OPTIONS.map do |count| - { - value: count, - label: count, - selected: @display_count == count, - id: "display-count-#{count}" - } - end - end end diff --git a/app/models/concerns/filter/params.rb b/app/models/concerns/filter/params.rb index 7c500942a..26dc1f437 100644 --- a/app/models/concerns/filter/params.rb +++ b/app/models/concerns/filter/params.rb @@ -3,7 +3,7 @@ module Filter::Params PERMITTED_PARAMS = %i[ indexed_by assignment_status collection_ids creator_ids - assignee_ids stage_ids tag_ids terms display_count + assignee_ids stage_ids tag_ids terms ].freeze def as_params @@ -15,8 +15,7 @@ module Filter::Params assignee_ids: assignees.ids, stage_ids: stages.ids, tag_ids: tags.ids, - terms: terms, - display_count: display_count + terms: terms ) end end diff --git a/app/views/cards/_display_count_selector.html.erb b/app/views/cards/_display_count_selector.html.erb deleted file mode 100644 index 75c3ad3ae..000000000 --- a/app/views/cards/_display_count_selector.html.erb +++ /dev/null @@ -1,37 +0,0 @@ -
- - - - <% display_count_options.each do |option| %> - - <% end %> - -
\ No newline at end of file