Module: Decidim::Admin::ApplicationHelper

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

Methods included from SearchFormHelper

#search_form_for

Methods included from UserRolesHelper

#user_role_config

Methods included from LogRenderHelper

#render_log

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

#aria_selected_link_to

Methods included from HumanizeBooleansHelper

#humanize_boolean

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

#localized_locales

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, options = {}, &)
  options = { context: { view_context: self, current_user: } }.deep_merge(options)
  super
end

#participatory_space_active_link?(component) ⇒ Boolean

Returns:

  • (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