Sha256: 96a4d8c249f4bbc8569dcf7657f0c33965f65364fe937855a4bc271521cc2594

Contents?: true

Size: 1.06 KB

Versions: 78

Compression:

Stored size: 1.06 KB

Contents

# frozen_string_literal: true

module Decidim
  module Proposals
    # Custom helpers, scoped to the proposals engine.
    #
    module CollaborativeDraftCellsHelper
      include Decidim::Proposals::ApplicationHelper
      include Decidim::Proposals::Engine.routes.url_helpers
      include Decidim::LayoutHelper
      include Decidim::ApplicationHelper
      include Decidim::TranslationsHelper
      include Decidim::ResourceReferenceHelper
      include Decidim::TranslatableAttributes
      include Decidim::CardHelper

      delegate :title, :state, to: :model

      def has_actions?
        false
      end

      def current_settings
        model.component.current_settings
      end

      def component_settings
        model.component.settings
      end

      def current_component
        model.component
      end

      def from_context
        @options[:from]
      end

      def badge_name
        humanize_collaborative_draft_state state
      end

      def state_classes
        [collaborative_draft_state_badge_css_class(state).to_s]
      end
    end
  end
end

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
decidim-proposals-0.29.1 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.4 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.27.9 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.29.0 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.3 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.27.8 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.29.0.rc4 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.29.0.rc3 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.29.0.rc2 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.29.0.rc1 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.2 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.27.7 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.1 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.27.6 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.26.10 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.26.9 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.0 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.27.5 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.0.rc5 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb
decidim-proposals-0.28.0.rc4 app/helpers/decidim/proposals/collaborative_draft_cells_helper.rb