Module: Decidim::Admin::ApplicationHelper
- Includes:
- LogRenderHelper, SearchFormHelper, UserRolesHelper, Decidim::AriaSelectedLinkToHelper, HumanizeBooleansHelper, LocalizedLocalesHelper, MapHelper, MetaTagsHelper, TranslationsHelper
- Defined in:
- decidim-admin/app/helpers/decidim/admin/application_helper.rb
Overview
Custom helpers, scoped to the admin panel.
Instance Attribute Summary
Attributes included from MetaTagsHelper
#decidim_meta_description, #decidim_meta_image_url, #decidim_meta_twitter_handler, #decidim_meta_url
Instance Method Summary collapse
-
#cell(name, model, options = {}) ⇒ Object
Public: Overwrites the ‘cell` helper method to automatically set some common context.
- #participatory_space_active_link?(component) ⇒ Boolean
Methods included from SearchFormHelper
Methods included from UserRolesHelper
Methods included from LogRenderHelper
Methods included from MapHelper
#dynamic_map_for, #static_map_link
Methods included from MetaTagsHelper
#add_base_url_to, #add_decidim_meta_description, #add_decidim_meta_image_url, #add_decidim_meta_tags, #add_decidim_meta_twitter_handler, #add_decidim_meta_url, #add_decidim_page_title, #decidim_page_title, #resolve_base_url, #resolve_meta_image_url
Methods included from Decidim::AriaSelectedLinkToHelper
Methods included from HumanizeBooleansHelper
Methods included from TranslationsHelper
empty_translatable, ensure_translatable, multi_translation, translated_in_current_locale?
Methods included from TranslatableAttributes
#attachment?, #default_locale?
Methods included from LocalizedLocalesHelper
Instance Method Details
#cell(name, model, options = {}) ⇒ Object
Public: Overwrites the ‘cell` helper method to automatically set some common context.
name - the name of the cell to render model - the cell model options - a Hash with options
Renders the cell contents.
26 27 28 29 |
# File 'decidim-admin/app/helpers/decidim/admin/application_helper.rb', line 26 def cell(name, model, = {}, &) = { context: { view_context: self, current_user: } }.deep_merge() super end |
#participatory_space_active_link?(component) ⇒ Boolean
31 32 33 34 |
# File 'decidim-admin/app/helpers/decidim/admin/application_helper.rb', line 31 def participatory_space_active_link?(component) endpoints = component.manifest.admin_engine.try(:participatory_space_endpoints) endpoints && is_active_link?(decidim_admin_participatory_processes.components_path(current_participatory_space), %r{/\d+/manage/(#{endpoints.join("|")})\b}) end |