Class: Hyrax::Forms::Admin::CollectionTypeForm

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Model
Defined in:
app/forms/hyrax/forms/admin/collection_type_form.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#collection_typeObject

Returns the value of attribute collection_type.



7
8
9
# File 'app/forms/hyrax/forms/admin/collection_type_form.rb', line 7

def collection_type
  @collection_type
end

Instance Method Details

#all_settings_disabled?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/forms/hyrax/forms/admin/collection_type_form.rb', line 17

def all_settings_disabled?
  collections? || admin_set? || user_collection?
end

#collections?Boolean

Returns:

  • (Boolean)


29
30
31
# File 'app/forms/hyrax/forms/admin/collection_type_form.rb', line 29

def collections?
  collection_type.collections.any?
end

#share_options_disabled?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'app/forms/hyrax/forms/admin/collection_type_form.rb', line 23

def share_options_disabled?
  all_settings_disabled? || !sharable
end