Sha256: 49a1c2d685ae4267444158d5380cedae28bfd795781d38bb3f6b87bf89d89690
Contents?: true
Size: 989 Bytes
Versions: 38
Compression:
Stored size: 989 Bytes
Contents
# frozen_string_literal: true module Decidim module Admin module ExportsHelper # Renders an export dropdown for the provided component, including an item # for each exportable artifact and format. # # component - The component to render the export dropdown for. Defaults to the # current component. # # Returns a rendered dropdown. def export_dropdown(component = current_component) render partial: "decidim/admin/exports/dropdown", locals: { component: component } end # Routes to the correct exporter for a component. # # component - The component to be routed. # options - Extra options that need to be passed to the route. # # Returns the path to the component exporter. def exports_path(component, options) EngineRouter.admin_proxy(component.participatory_space).component_exports_path(options.merge(component_id: component)) end end end end
Version data entries
38 entries across 38 versions & 1 rubygems