Module: Decidim::Admin::ExportsHelper

Defined in:
decidim-admin/app/helpers/decidim/admin/exports_helper.rb

Instance Method Summary collapse

Instance Method Details

#export_dropdown(feature = current_feature) ⇒ Object

Renders an export dropdown for the provided feature, including an item for each exportable artifact and format.

feature - The feature to render the export dropdown for. Defaults to the

current feature.

Returns a rendered dropdown.



13
14
15
# File 'decidim-admin/app/helpers/decidim/admin/exports_helper.rb', line 13

def export_dropdown(feature = current_feature)
  render partial: "decidim/admin/exports/dropdown", locals: { feature: feature }
end

#exports_path(feature, options) ⇒ Object

Routes to the correct exporter for a feature.

feature - The feature to be routed. options - Extra options that need to be passed to the route.

Returns the path to the feature exporter.



23
24
25
# File 'decidim-admin/app/helpers/decidim/admin/exports_helper.rb', line 23

def exports_path(feature, options)
  EngineRouter.admin_proxy(feature.participatory_space).feature_exports_path(options.merge(feature_id: feature))
end