Class: Curate::CollectionsController

Inherits:
ApplicationController
  • Object
show all
Includes:
Blacklight::Catalog, FieldsForAddToCollection, Hydra::AccessControlsEnforcement, Hydra::CollectionsControllerBehavior
Defined in:
app/controllers/curate/collections_controller.rb

Instance Method Summary collapse

Instance Method Details

#add_memberObject



52
53
54
55
56
57
58
59
# File 'app/controllers/curate/collections_controller.rb', line 52

def add_member
  if @collection && @collection.add_member(@collectible)
    flash[:notice] = "\"#{@collectible}\" has been added to \"#{@collection}\""
  else
    flash[:error] = 'Unable to add item to collection.'
  end
  redirect_to catalog_index_path
end

#add_member_formObject



46
47
48
49
50
# File 'app/controllers/curate/collections_controller.rb', line 46

def add_member_form
  collection_options
  profile_collection_options
  render 'add_member_form'
end

#newObject



41
42
43
44
# File 'app/controllers/curate/collections_controller.rb', line 41

def new
  @add_to_profile = params.delete(:add_to_profile)
  super
end