Sha256: 3dae3979d6b99a7674a4f571bac56f86239d09aed5534f471d85ef429c8ed4b2

Contents?: true

Size: 1.11 KB

Versions: 31

Compression:

Stored size: 1.11 KB

Contents

# frozen_string_literal: true

module Decidim
  module Elections
    # This is the engine that runs on the public interface for trustees of `decidim-elections`.
    # It mostly handles rendering the trustees frontend zone.
    class TrusteeZoneEngine < ::Rails::Engine
      isolate_namespace Decidim::Elections::TrusteeZone

      paths["db/migrate"] = nil
      paths["lib/tasks"] = nil

      routes do
        resource :trustee, path: "/", only: [:show, :update] do
          resources :election, only: [] do
            resource :elections, only: [:show, :update]
          end
        end
      end

      def load_seed
        nil
      end

      initializer "decidim_elections.trustee_zone.menu" do
        Decidim.menu :user_menu do |menu|
          menu.add_item :decidim_elections_trustee_zone,
                        I18n.t("menu.trustee_zone", scope: "decidim.elections.trustee_zone"),
                        decidim.decidim_elections_trustee_zone_path,
                        active: :inclusive,
                        if: Decidim::Elections::Trustee.trustee?(current_user)
        end
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
decidim-elections-0.27.9 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.8 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.7 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.6 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.10 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.9 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.5 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.8 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.4 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.3 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.7 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.5 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.2 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.1 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.4 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.0 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.3 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.0.rc2 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.27.0.rc1 lib/decidim/elections/trustee_zone_engine.rb
decidim-elections-0.26.2 lib/decidim/elections/trustee_zone_engine.rb