Class: Decidim::LikersListCell
- Inherits:
-
ViewModel
- Object
- ViewModel
- Decidim::LikersListCell
- Includes:
- ApplicationHelper
- Defined in:
- app/cells/decidim/likers_list_cell.rb
Overview
This cell renders the list of likes.
Example:
cell("decidim/likers_list", my_component)
Constant Summary collapse
- MAX_ITEMS_STACKED =
8
Constants included from AmendmentsHelper
Instance Method Summary collapse
Methods included from ApplicationHelper
#add_body_classes, #cell, #edit_link, #extra_admin_link, #html_truncate, #layout_item_classes, #present, #prevent_timeout_seconds, #resolve_presenter_class, #text_initials
Methods included from CacheHelper
Methods included from AmendmentsHelper
#accept_and_reject_buttons_for, #action_button_card_for, #allowed_to_accept_and_reject?, #allowed_to_promote?, #amendments_enabled?, #amendments_form_field_for, #amendments_form_fields_label, #amendments_form_fields_value, #can_participate_in_restricted_space?, #can_react_to_emendation?, #current_step, #emendation_actions_for, #emendation_announcement_for, #promote_button_for, #render_emendation_body, #total_steps, #wizard_aside_back_url, #wizard_header_title
Methods included from RichTextEditorHelper
Methods included from ContextualHelpHelper
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, #tab_element_class_for, #translated_field_tag
Methods included from OmniauthHelper
#normalize_provider_name, #oauth_icon, #provider_name
Instance Method Details
#likers_count ⇒ Object
23 24 25 |
# File 'app/cells/decidim/likers_list_cell.rb', line 23 def likers_count base_relation.count end |
#show ⇒ Object
16 17 18 19 20 21 |
# File 'app/cells/decidim/likers_list_cell.rb', line 16 def show return render :empty if visible_likers.count.zero? return render :full if full_list? render end |