Class: Decidim::InitiativesVotes::VoteCell
- Inherits:
-
ViewModel
- Object
- Cell::ViewModel
- ViewModel
- Decidim::InitiativesVotes::VoteCell
show all
- Defined in:
- decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb
Instance Method Summary
collapse
Methods inherited from ViewModel
#call, #current_user, #view_context
#_icon_classes, #apple_favicon, #application_path, #current_user_unread_data, #extended_navigation_bar, #external_icon, #favicon, #icon, #legacy_favicon, #organization_colors, #role
#with_tooltip
#decidim_modal
#element_id
#button_to, #submit_tag
#action_authorized_button_to, #action_authorized_link_to, #logged_button_to, #logged_link_to
#has_visible_scopes?, #scope_name_for_picker, #scopes_picker_field, #scopes_picker_filter, #scopes_select_field, #scopes_select_tag
#default_locale?
#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, #ordered_scopes_descendants, #ordered_scopes_descendants_for_select, #scopes_picker_field_tag, #tab_element_class_for, #translated_field_tag
#linked_classes_filter_values_for, #linked_classes_for, #resource_locator, #resource_title
Instance Method Details
#date_of_birth ⇒ Object
28
29
30
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 28
def date_of_birth
metadata[:date_of_birth]
end
|
#document_number ⇒ Object
24
25
26
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 24
def document_number
metadata[:document_number]
end
|
#initiative_id ⇒ Object
12
13
14
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 12
def initiative_id
model.initiative.reference
end
|
#initiative_title ⇒ Object
16
17
18
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 16
def initiative_title
translated_attribute(model.initiative.title)
end
|
#name_and_surname ⇒ Object
20
21
22
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 20
def name_and_surname
metadata[:name_and_surname]
end
|
#postal_code ⇒ Object
32
33
34
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 32
def postal_code
metadata[:postal_code]
end
|
#scope ⇒ Object
40
41
42
43
44
45
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 40
def scope
return I18n.t("decidim.scopes.global") if model.decidim_scope_id.nil?
return I18n.t("decidim.initiatives.unavailable_scope") if model.scope.blank?
translated_attribute(model.scope.name)
end
|
#show ⇒ Object
8
9
10
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 8
def show
render
end
|
#time_and_date ⇒ Object
36
37
38
|
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 36
def time_and_date
model.created_at
end
|