Module: Curate::CollectionsHelper
- Included in:
- Worthwhile::MainAppHelpers
- Defined in:
- app/helpers/curate/collections_helper.rb
Overview
View Helpers for Hydra Collections functionality
Instance Method Summary collapse
- #available_collections(item = nil) ⇒ Object
- #button_for_remove_item_from_collection(document, collection, label = 'Remove From Collection') ⇒ Object
Instance Method Details
#available_collections(item = nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/helpers/curate/collections_helper.rb', line 10 def available_collections(item = nil) if item.present? .reject {|n| n == item} else end end |
#button_for_remove_item_from_collection(document, collection, label = 'Remove From Collection') ⇒ Object
4 5 6 7 8 |
# File 'app/helpers/curate/collections_helper.rb', line 4 def (document, collection, label = 'Remove From Collection') render partial: '/curate/collections/button_remove_from_collection', locals: { collection: collection, label: label, document: document } end |