Class: Hyrax::Forms::BatchEditForm
- Defined in:
- app/forms/hyrax/forms/batch_edit_form.rb
Instance Attribute Summary collapse
-
#batch_document_ids ⇒ Object
readonly
Returns the value of attribute batch_document_ids.
-
#names ⇒ Object
Contains a list of titles of all the works in the batch.
Attributes inherited from WorkForm
Class Method Summary collapse
-
.build_permitted_params ⇒ Object
Returns a list of parameters we accept from the form rubocop:disable Metrics/MethodLength.
Instance Method Summary collapse
-
#initialize(model, current_ability, batch_document_ids) ⇒ BatchEditForm
constructor
A new instance of BatchEditForm.
Methods inherited from WorkForm
#[], #agreement_accepted?, #display_additional_fields?, #find_child_work, #member_of_collections, #member_of_collections_json, #primary_terms, sanitize_params, #secondary_terms, #select_files, #version, #work_members, #work_members_json
Constructor Details
#initialize(model, current_ability, batch_document_ids) ⇒ BatchEditForm
Returns a new instance of BatchEditForm.
19 20 21 22 23 24 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 19 def initialize(model, current_ability, batch_document_ids) @names = [] @batch_document_ids = batch_document_ids @combined_attributes = initialize_combined_fields super(model, current_ability, nil) end |
Instance Attribute Details
#batch_document_ids ⇒ Object (readonly)
Returns the value of attribute batch_document_ids.
26 27 28 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 26 def batch_document_ids @batch_document_ids end |
#names ⇒ Object
Contains a list of titles of all the works in the batch
14 15 16 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 14 def names @names end |
Class Method Details
.build_permitted_params ⇒ Object
Returns a list of parameters we accept from the form rubocop:disable Metrics/MethodLength
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'app/forms/hyrax/forms/batch_edit_form.rb', line 30 def self.build_permitted_params [{ creator: [] }, { contributor: [] }, { description: [] }, { keyword: [] }, { resource_type: [] }, { license: [] }, { publisher: [] }, { date_created: [] }, { subject: [] }, { language: [] }, { identifier: [] }, { based_near: [] }, { related_url: [] }, { permissions_attributes: [:type, :name, :access, :id, :_destroy] }, :on_behalf_of, :version, :add_works_to_collection, :visibility_during_embargo, :embargo_release_date, :visibility_after_embargo, :visibility_during_lease, :lease_expiration_date, :visibility_after_lease, :visibility, { based_near_attributes: [:id, :_destroy] }] end |