lib/iqvoc/configuration/core.rb in iqvoc-4.2.0 vs lib/iqvoc/configuration/core.rb in iqvoc-4.3.0
- old
+ new
@@ -26,10 +26,18 @@
bootstrap/bootstrap.css
bootstrap/bootstrap-responsive.css
iqvoc/ie_fixes.css
bootstrap/bootstrap.js
html5.js
+ *.png
+ *.jpg
+ *.jpeg
+ *.gif
+ *.svg
+ *.ttf
+ *.woff
+ *.eof
)
self.navigation_items = [{
:text => "Dashboard",
:href => proc { dashboard_path },
@@ -82,44 +90,56 @@
:text => proc { t("txt.views.navigation.about") },
:href => "http://iqvoc.net/"
}]
}]
- self.searchable_class_names = [
- "Labeling::SKOS::Base",
- "Labeling::SKOS::PrefLabel",
- "Note::Base"
- ]
+ self.searchable_class_names = {
+ "Labeling::SKOS::Base" => "labels",
+ "Labeling::SKOS::PrefLabel" => "pref_labels",
+ "Note::Base" => "notes"
+ }
+
self.unlimited_search_results = false
self.default_rdf_namespace_helper_methods = [:iqvoc_default_rdf_namespaces]
self.rdf_namespaces = {
:rdf => "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
:rdfs => "http://www.w3.org/2000/01/rdf-schema#",
:owl => "http://www.w3.org/2002/07/owl#",
:skos => "http://www.w3.org/2004/02/skos/core#",
:dct => "http://purl.org/dc/terms/",
- :foaf => "http://xmlns.com/foaf/spec/"
+ :foaf => "http://xmlns.com/foaf/spec/",
+ :void => "http://rdfs.org/ns/void#",
+ :iqvoc => "http://try.iqvoc.net/schema#"
}
# The class to use for automatic generation of change notes on every save
self.change_note_class_name = "Note::SKOS::ChangeNote"
self.first_level_class_configuration_modules = [] # Will be set in the modules
self.ability_class_name = "Iqvoc::Ability"
- self.search_sections = ["klass", "mode", "terms", "type", "collection", "languages"]
+ self.search_sections = [
+ "klass",
+ "mode",
+ "terms",
+ "type",
+ "collection",
+ "languages",
+ "datasets"
+ ]
# initialize
self.config.register_settings({
"title" => "iQvoc",
"languages.pref_labeling" => ["en", "de"],
"languages.further_labelings.Labeling::SKOS::AltLabel" => ["en", "de"],
"languages.notes" => ["en", "de"],
- "performance.unbounded_hierarchy" => false
+ "performance.unbounded_hierarchy" => false,
+ "sources.iqvoc" => [""]
})
end
module ClassMethods
def generate_secret_token
@@ -155,11 +175,11 @@
def change_note_class
change_note_class_name.constantize
end
def searchable_classes
- searchable_class_names.map(&:constantize)
+ searchable_class_names.keys.map(&:constantize)
end
def first_level_classes
self.first_level_class_configuration_modules.map { |mod| mod.send(:base_class) }
end
@@ -187,9 +207,16 @@
def title=(value)
ActiveSupport::Deprecation.warn "title has been moved into instance configuration", caller
self.config.register_setting("title", value)
end
+ def root
+ if Iqvoc.const_defined?(:Engine)
+ Iqvoc::Engine.root
+ else
+ Rails.root
+ end
+ end
end
end
end
end