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.26.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.0.rc2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.26.0.rc1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.0.rc4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.0.rc3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.0.rc2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.25.0.rc1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.23.6 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.23.5 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.0.rc2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.23.4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.24.0.rc1 app/cells/decidim/search_results_section_cell.rb