Sha256: 404a5f6e552f3df94174d00164a646f18c29134725da630566954a7c855279f1

Contents?: true

Size: 707 Bytes

Versions: 58

Compression:

Stored size: 707 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # This cell renders a section on the global search results page.
  class SearchResultsSectionCell < Decidim::ViewModel
    include Decidim::SearchesHelper
    include Decidim::CardHelper
    include Decidim::CellsPaginateHelper
    include Decidim::Core::Engine.routes.url_helpers

    def show
      render :show
    end

    def class_name
      model.keys.first
    end

    def results_count
      @results_count ||= model.values.first[:count]
    end

    def results
      @results ||= model.values.first[:results]
    end

    def paginated?
      options[:is_paginated]
    end

    def last_section?
      options[:is_last_section]
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
decidim-core-0.27.9 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.8 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.7 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.6 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.10 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.9 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.5 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.8 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.7 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.5 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.0.rc2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.27.0.rc1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.2 app/cells/decidim/search_results_section_cell.rb