Sha256: d90e20d5b8f274bc80c7f73eb37070a328f73ebaafd1165af286168b40f62860

Contents?: true

Size: 443 Bytes

Versions: 18

Compression:

Stored size: 443 Bytes

Contents

# frozen_string_literal: true

module Decidim
  # A Helper to render scopes, including a global scope, for forms.
  module ScopesHelper
    Option = Struct.new(:id, :name)

    # Check whether the resource has a visible scope or not.
    #
    # Returns boolean.
    def has_visible_scopes?(resource)
      current_participatory_space.scopes_enabled? && !current_participatory_space.scope.present? && resource.scope.present?
    end
  end
end

Version data entries

18 entries across 18 versions & 2 rubygems

Version Path
decidim-core-0.6.8 app/helpers/decidim/scopes_helper.rb
decidim-0.6.8 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.7 app/helpers/decidim/scopes_helper.rb
decidim-0.6.7 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.6 app/helpers/decidim/scopes_helper.rb
decidim-0.6.6 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.5 app/helpers/decidim/scopes_helper.rb
decidim-0.6.5 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.4 app/helpers/decidim/scopes_helper.rb
decidim-0.6.4 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.3 app/helpers/decidim/scopes_helper.rb
decidim-0.6.3 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.2 app/helpers/decidim/scopes_helper.rb
decidim-0.6.2 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.1 app/helpers/decidim/scopes_helper.rb
decidim-0.6.1 decidim-core/app/helpers/decidim/scopes_helper.rb
decidim-core-0.6.0 app/helpers/decidim/scopes_helper.rb
decidim-0.6.0 decidim-core/app/helpers/decidim/scopes_helper.rb