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

Version Path
decidim-admin-0.23.6 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.5 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.4 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.3 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.2 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.1.rc1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.23.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.22.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.21.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.20.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.20.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.19.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.18.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.19.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.17.2 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.18.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.17.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.16.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.17.0 app/helpers/decidim/admin/exports_helper.rb