Module: Bulkrax::ImportersHelper
- Defined in:
- app/helpers/bulkrax/importers_helper.rb
Instance Method Summary collapse
-
#available_admin_sets ⇒ Object
borrowed from batch-importer github.com/samvera-labs/hyrax-batch_ingest/blob/main/app/controllers/hyrax/batch_ingest/batches_controller.rb.
Instance Method Details
#available_admin_sets ⇒ Object
borrowed from batch-importer github.com/samvera-labs/hyrax-batch_ingest/blob/main/app/controllers/hyrax/batch_ingest/batches_controller.rb
6 7 8 9 10 11 |
# File 'app/helpers/bulkrax/importers_helper.rb', line 6 def available_admin_sets # Restrict available_admin_sets to only those current user can deposit to. @available_admin_sets ||= Hyrax::Collections::PermissionsService.source_ids_for_deposit(ability: current_ability, source_type: 'admin_set').map do |admin_set_id| [Bulkrax.object_factory.find_or_nil(admin_set_id)&.title&.first || admin_set_id, admin_set_id] end end |