Sha256: 5744ade3977ac0da1b4547cd116fe3b4354caf229e63f7de9c4797256219922e

Contents?: true

Size: 955 Bytes

Versions: 34

Compression:

Stored size: 955 Bytes

Contents

# frozen_string_literal: true

module Decidim
  module Admin
    module ExportsHelper
      # 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.
      def export_dropdown(feature = current_feature)
        render partial: "decidim/admin/exports/dropdown", locals: { feature: feature }
      end

      # 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.
      def exports_path(feature, options)
        EngineRouter.admin_proxy(feature.participatory_space).feature_exports_path(options.merge(feature_id: feature))
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
decidim-admin-0.10.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.10.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.9.3 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.9.2 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.9.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.9.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.8.4 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.8.3 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.8.2 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.8.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.8.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.7.4 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.7.3 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.7.2 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.7.1 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.7.0 app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.6.8 app/helpers/decidim/admin/exports_helper.rb
decidim-0.6.8 decidim-admin/app/helpers/decidim/admin/exports_helper.rb
decidim-admin-0.6.7 app/helpers/decidim/admin/exports_helper.rb
decidim-0.6.7 decidim-admin/app/helpers/decidim/admin/exports_helper.rb