lib/iqvoc/configuration/core.rb in iqvoc-4.0.8 vs lib/iqvoc/configuration/core.rb in iqvoc-4.0.9
- old
+ new
@@ -12,12 +12,15 @@
:rdf_namespaces,
:change_note_class_name,
:first_level_class_configuration_modules,
:ability_class_name,
:navigation_items,
+ :localized_routes,
:core_assets
+ self.localized_routes = [] # routing extensibility hook
+
self.navigation_items = [
{
:content => proc { link_to "Dashboard", dashboard_path },
:controller => "dashboard",
:authorized? => proc { can? :use, :dashboard }
@@ -56,11 +59,10 @@
manifest.css
manifest.js
bootstrap/bootstrap.css
bootstrap/bootstrap-responsive.css
iqvoc/ie_fixes.css
- json2.js
bootstrap/bootstrap.js
html5.js
)
self.searchable_class_names = [
@@ -88,13 +90,13 @@
self.ability_class_name = 'Iqvoc::Ability'
# initialize
self.config.register_settings({
"title" => "iQvoc",
- "available_languages" => ["en", "de"],
"languages.pref_labeling" => ["en", "de"],
- "languages.further_labelings.Labeling::SKOS::AltLabel" => ["en", "de"]
+ "languages.further_labelings.Labeling::SKOS::AltLabel" => ["en", "de"],
+ "note_languages" => ["en", "de"]
})
self.config.initialize_cache
end
module ClassMethods
@@ -146,24 +148,23 @@
def title
return config["title"]
end
- def available_languages
- return config["available_languages"]
+ def note_languages
+ return config["note_languages"]
end
+ def all_languages
+ (Iqvoc::Concept.pref_labeling_languages + Iqvoc::Concept.further_labeling_class_names.values.flatten + note_languages).compact.map(&:to_s).uniq
+ end
+
# @deprecated
def title=(value)
ActiveSupport::Deprecation.warn "title has been moved into instance configuration", caller
self.config.register_setting("title", value)
end
- # @deprecated
- def available_languages=(value)
- ActiveSupport::Deprecation.warn "available_languages has been moved into instance configuration", caller
- self.config.register_setting("available_languages", value)
- end
end
end
end
end