Class: Decidim::SearchResultsSectionCell
- Includes:
- CardHelper, CellsPaginateHelper, SearchesHelper
- Defined in:
- app/cells/decidim/search_results_section_cell.rb
Overview
This cell renders a section on the global search results page.
Instance Method Summary collapse
- #class_name ⇒ Object
- #last_section? ⇒ Boolean
- #paginated? ⇒ Boolean
- #results ⇒ Object
- #results_count ⇒ Object
- #show ⇒ Object
Methods included from CellsPaginateHelper
Methods included from PaginateHelper
Methods included from CardHelper
Methods included from SearchesHelper
#main_search_path, #search_path_by, #search_path_by_resource_type, #search_path_by_state_link, #searchable_resource_human_name
Methods inherited from ViewModel
Methods included from MarkupHelper
Methods included from ReplaceButtonsHelper
Methods included from ActionAuthorizationHelper
#action_authorized_button_to, #action_authorized_link_to, #logged_button_to, #logged_link_to
Methods included from ScopesHelper
#has_visible_scopes?, #scope_name_for_picker, #scopes_picker_field, #scopes_picker_filter, #scopes_picker_tag
Methods included from TranslatableAttributes
Methods included from DecidimFormHelper
#areas_for_select, #base_error_messages, #decidim_form_for, #decidim_form_slug_url, #editor_field_tag, #form_field_has_error?, #form_required_explanation, #name_with_locale, #scopes_picker_field_tag, #tab_element_class_for, #translated_field_tag
Methods included from ResourceHelper
#linked_classes_filter_values_for, #linked_classes_for, #linked_resources_for, #resource_locator, #resource_title
Instance Method Details
#class_name ⇒ Object
15 16 17 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 15 def class_name model.keys.first end |
#last_section? ⇒ Boolean
31 32 33 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 31 def last_section? [:is_last_section] end |
#paginated? ⇒ Boolean
27 28 29 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 27 def paginated? [:is_paginated] end |
#results ⇒ Object
23 24 25 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 23 def results @results ||= model.values.first[:results] end |
#results_count ⇒ Object
19 20 21 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 19 def results_count @results_count ||= model.values.first[:count] end |
#show ⇒ Object
11 12 13 |
# File 'app/cells/decidim/search_results_section_cell.rb', line 11 def show render :show end |