Class: Decidim::InitiativesVotes::VoteCell

Inherits:
ViewModel
  • Object
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

Methods included from FilterParamsHelper

#filter_link_params

Methods included from MarkupHelper

#element_id

Methods included from ReplaceButtonsHelper

#button_to, #submit_tag

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

#default_locale?

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

#date_of_birthObject


28
29
30
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 28

def date_of_birth
  [:date_of_birth]
end

#document_numberObject


24
25
26
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 24

def document_number
  [:document_number]
end

#initiative_idObject


12
13
14
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 12

def initiative_id
  model.initiative.reference
end

#initiative_titleObject


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_surnameObject


20
21
22
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 20

def name_and_surname
  [:name_and_surname]
end

#postal_codeObject


32
33
34
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 32

def postal_code
  [:postal_code]
end

#scopeObject


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

#showObject


8
9
10
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 8

def show
  render
end

#time_and_dateObject


36
37
38
# File 'decidim-initiatives/app/cells/decidim/initiatives_votes/vote_cell.rb', line 36

def time_and_date
  model.created_at
end