Sha256: 9924a75a2f8feb840266f8e06981bebf0eed21b61994b2f0c19b7214775a7644

Contents?: true

Size: 644 Bytes

Versions: 13

Compression:

Stored size: 644 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
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
decidim-core-0.29.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.29.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.29.0.rc4 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.29.0.rc3 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.29.0.rc2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.29.0.rc1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.2 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.1 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.0 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.0.rc5 app/cells/decidim/search_results_section_cell.rb
decidim-core-0.28.0.rc4 app/cells/decidim/search_results_section_cell.rb