Class: Decidim::VersionsListItemCell
Instance Method Summary
collapse
#_icon_classes, #application_path, #extended_navigation_bar, #external_icon, #favicon, #icon, #organization_colors, #role
#render_resource_editor, #render_resource_last_editor
#decidim_html_escape, #decidim_sanitize, #decidim_sanitize_newsletter, #decidim_url_escape, included
Methods inherited from ViewModel
#call, #current_user
#filter_link_params
#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_picker_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, #scopes_picker_field_tag, #tab_element_class_for, #translated_field_tag
#linked_classes_filter_values_for, #linked_classes_for, #linked_resources_for, #resource_locator, #resource_title
Instance Method Details
#default_i18n_scope ⇒ Object
47
48
49
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 47
def default_i18n_scope
"decidim.versions_list_item.show"
end
|
#i18n(string, params = {}) ⇒ Object
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 28
def i18n(string, params = {})
t(
string,
params.merge(
scope: i18n_scope,
default: t(
string,
params.merge(
scope: default_i18n_scope
)
)
)
)
end
|
#i18n_scope ⇒ Object
43
44
45
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 43
def i18n_scope
options[:i18n_scope]
end
|
#i18n_version_index ⇒ Object
24
25
26
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 24
def i18n_version_index
i18n("version_index", index: index)
end
|
#index ⇒ Object
16
17
18
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 16
def index
options[:index] + 1
end
|
#version ⇒ Object
8
9
10
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 8
def version
model
end
|
#version_path ⇒ Object
20
21
22
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 20
def version_path
options[:version_path].call(index)
end
|
#versioned_resource ⇒ Object
12
13
14
|
# File 'app/cells/decidim/versions_list_item_cell.rb', line 12
def versioned_resource
options[:versioned_resource]
end
|