Sha256: 1d443c16c8702c03388d5bb7a63b306c5ed4bf63ea94ef18272cabbd46a9376f

Contents?: true

Size: 793 Bytes

Versions: 15

Compression:

Stored size: 793 Bytes

Contents

# frozen_string_literal: true
module Hyrax
  module Forms
    module Widgets
      class AdminSetVisibility
        # Visibility options for permission templates
        def options
          i18n_prefix = "hyrax.admin.admin_sets.form_visibility.visibility"
          # NOTE: Visibility 'varies' = '' implies no constraints
          [[Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PUBLIC, I18n.t('.everyone', scope: i18n_prefix)],
           ['', I18n.t('.varies', scope: i18n_prefix)],
           [Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_AUTHENTICATED, I18n.t('.institution', scope: i18n_prefix)],
           [Hydra::AccessControls::AccessRight::VISIBILITY_TEXT_VALUE_PRIVATE, I18n.t('.restricted', scope: i18n_prefix)]]
        end
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
hyrax-5.0.2 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-5.0.1 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-5.0.0 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-5.0.0.rc3 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-5.0.0.rc2 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-5.0.0.rc1 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-3.6.0 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0.rc3 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0.rc2 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0.rc1 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-3.5.0 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0.beta2 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-3.4.2 app/forms/hyrax/forms/widgets/admin_set_visibility.rb
hyrax-4.0.0.beta1 app/forms/hyrax/forms/widgets/admin_set_visibility.rb