ontologies_controller.rb revision 81a6387a4ab56a24194ecbabd6609c6bcca568b7
#
# Controller for ontologies
#
if in_repository?
else
end
end
end
end
end
end
if !params[:repository_id]
# redirect for legacy routing
return
end
respond_to do |format|
format.html do
if !resource.distributed?
else
end
end
format.json do
end
end
end
flash[:error] = "Can't delete #{Settings.OMS.with_indefinite_article}
that is imported by another one."
else
end
end
# retry a specific ontology
scope = scope.where(id: id)
end
redirect_to (id ? [parent, scope.first!, :ontology_versions] : [parent, :ontologies])
end
respond_to do |format|
format.json do
end
end
end
end
end
end
end
end
@a ||= []
vertex.children.each { |child| build_categories_tree(child) unless child.children.empty?; @a << child }
@a
end
def user_selected_categories
params[:category_ids].keys unless params[:category_ids].nil?
end
helper_method :repository
def repository
parent
end
private
def send_download
asset = version || resource
render text: asset.file_in_repository.content,
content_type: Mime::Type.lookup('application/force-download')
end
def version
finder = OntologyVersionFinder.new(params[:reference], resource)
@version ||= finder.find if params[:reference]
end
end