iqvoc 4.2.0 → 4.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile +15 -12
- data/Gemfile.lock +124 -90
- data/README.md +17 -1
- data/app/assets/images/iqvoc_logo.svg +41 -0
- data/app/assets/javascripts/framework.js +1 -1
- data/app/assets/javascripts/iqvoc/concept_mapper.js +62 -0
- data/app/assets/javascripts/iqvoc/concept_mapping_manager.js +137 -0
- data/app/assets/javascripts/iqvoc/entityselect.js.erb +51 -19
- data/app/assets/javascripts/iqvoc/federated_concept_mapper.js +75 -0
- data/app/assets/javascripts/iqvoc/iqvoc.js +16 -4
- data/app/assets/javascripts/iqvoc/label_resolver.js +23 -0
- data/app/assets/javascripts/iqvoc/manifest.js +4 -0
- data/app/assets/javascripts/iqvoc/onebox.js.erb +4 -4
- data/app/assets/javascripts/iqvoc/quicksearch.js +1 -1
- data/app/assets/stylesheets/framework.css.scss +2 -1
- data/app/assets/stylesheets/iqvoc/_settings.css.scss +12 -0
- data/app/assets/stylesheets/iqvoc/components/_components.css.scss +237 -0
- data/app/assets/stylesheets/iqvoc/{entity_select.css.scss → components/_entity_select.css.scss} +0 -2
- data/app/assets/stylesheets/iqvoc/{forms.css.scss → components/_forms.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/{note.css.scss → components/_notes.css.scss} +2 -10
- data/app/assets/stylesheets/iqvoc/{panel.css.scss → components/_panels.css.scss} +3 -5
- data/app/assets/stylesheets/iqvoc/{sidebar.css.scss → components/_sidebars.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/{visualization.css.scss → components/_visualization.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/{bootstrap_extensions.css.scss → hacks/_bootstrap_extensions.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/{hacks.css.scss → hacks/_hacks.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/{jquery-ui_extensions.css.scss → hacks/_jquery-ui_extensions.css.scss} +0 -0
- data/app/assets/stylesheets/iqvoc/manifest.css.scss +10 -10
- data/app/controllers/concepts/alphabetical_controller.rb +23 -9
- data/app/controllers/concepts/scheme_controller.rb +19 -0
- data/app/controllers/concepts_controller.rb +13 -1
- data/app/controllers/concerns/dataset_initialization.rb +18 -0
- data/app/controllers/dashboard_controller.rb +17 -0
- data/app/controllers/hierarchy_controller.rb +65 -6
- data/app/controllers/{import_controller.rb → imports_controller.rb} +14 -11
- data/app/controllers/rdf_controller.rb +6 -0
- data/app/controllers/remote_labels_controller.rb +31 -0
- data/app/controllers/search_results_controller.rb +95 -14
- data/app/helpers/application_helper.rb +6 -4
- data/app/helpers/dashboard_helper.rb +3 -3
- data/app/helpers/link_helper.rb +14 -0
- data/app/helpers/search_results_helper.rb +5 -1
- data/app/jobs/import_job.rb +19 -0
- data/app/models/concept/base.rb +2 -2
- data/app/models/dataset/adaptors/iqvoc/alphabetical_search_adaptor.rb +38 -0
- data/app/models/dataset/adaptors/iqvoc/http_adaptor.rb +39 -0
- data/app/models/dataset/adaptors/iqvoc/label_adaptor.rb +15 -0
- data/app/models/dataset/adaptors/iqvoc/search_adaptor.rb +60 -0
- data/app/models/dataset/iqvoc_dataset.rb +39 -0
- data/app/models/import.rb +16 -0
- data/app/models/labeling/skos/base.rb +2 -1
- data/app/models/note/base.rb +2 -2
- data/app/models/note/skos/change_note.rb +3 -2
- data/app/presenters/alphabetical_search_result.rb +33 -0
- data/app/presenters/alphabetical_search_result_remote.rb +37 -0
- data/app/presenters/search_result.rb +33 -0
- data/app/presenters/search_result_collection.rb +8 -0
- data/app/presenters/search_result_remote.rb +52 -0
- data/app/views/collections/_sidebar.html.erb +3 -3
- data/app/views/concepts/_form.html.erb +1 -1
- data/app/views/concepts/alphabetical/_search_result.html.erb +16 -0
- data/app/views/concepts/alphabetical/_search_result_remote.html.erb +14 -0
- data/app/views/concepts/alphabetical/index.html.erb +5 -3
- data/app/views/concepts/expired/index.html.erb +5 -2
- data/app/views/concepts/scheme/_sidebar.html.erb +3 -3
- data/app/views/concepts/sidebars/_singular.html.erb +4 -4
- data/app/views/dashboard/_sidebar.html.erb +7 -4
- data/app/views/dashboard/index.html.erb +1 -1
- data/app/views/dashboard/reset.html.erb +6 -0
- data/app/views/imports/index.html.erb +44 -0
- data/app/views/imports/show.html.erb +7 -0
- data/app/views/layouts/application.html.erb +7 -1
- data/app/views/partials/labeling/skos/_search_result.html.erb +12 -16
- data/app/views/partials/match/_edit_base.html.erb +1 -1
- data/app/views/partials/note/_search_result.html.erb +8 -5
- data/app/views/partials/note/skos/change_note/_search_result.html.erb +7 -10
- data/app/views/partials/note/skos/definition/_search_result.html.erb +5 -5
- data/app/views/rdf/dataset.iqrdf +9 -0
- data/app/views/search_results/_search_result_remote.html.erb +13 -0
- data/app/views/search_results/_sidebar.html.erb +3 -3
- data/app/views/search_results/index.html.erb +4 -4
- data/app/views/search_results/index.iqrdf +7 -7
- data/app/views/search_results/sections/_datasets.html.erb +17 -0
- data/app/views/search_results/sections/_klass.html.erb +2 -2
- data/app/views/search_results/sections/_languages.html.erb +3 -3
- data/app/views/users/_sidebar.html.erb +1 -1
- data/config/application.rb +0 -2
- data/config/engine.rb +5 -0
- data/config/environments/heroku.rb +62 -16
- data/config/initializers/apipie.rb +17 -0
- data/config/initializers/secret_token.rb +25 -9
- data/config/locales/activerecord.de.yml +5 -0
- data/config/locales/activerecord.en.yml +5 -0
- data/config/locales/de.yml +14 -0
- data/config/locales/en.yml +14 -0
- data/config/locales/pt.yml +1 -0
- data/config/routes.rb +7 -4
- data/db/migrate/20131220134356_create_delayed_jobs.rb +22 -0
- data/db/migrate/20131220144601_create_imports.rb +11 -0
- data/db/schema.rb +26 -1
- data/iqvoc.gemspec +12 -3
- data/lib/iqvoc/ability.rb +2 -0
- data/lib/iqvoc/configuration/core.rb +36 -9
- data/lib/iqvoc/controller_extensions.rb +4 -0
- data/lib/iqvoc/environments/production.rb +1 -1
- data/lib/iqvoc/skos_importer.rb +31 -19
- data/lib/iqvoc/version.rb +1 -1
- data/lib/tasks/importer.rake +10 -2
- data/lib/tasks/release.rake +1 -1
- data/public/404.html +43 -11
- data/public/422.html +43 -11
- data/public/500.html +43 -12
- data/test/functional/{rdf_test.rb → rdf_rendering_test.rb} +1 -1
- data/test/integration/alphabetical_test.rb +5 -5
- data/test/integration/search_test.rb +16 -16
- data/test/unit/skos_import_test.rb +9 -9
- data/vendor/assets/images/animated-overlay.gif +0 -0
- data/vendor/assets/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/vendor/assets/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/vendor/assets/images/ui-bg_glass_75_d0e5f5_1x400.png +0 -0
- data/vendor/assets/images/ui-bg_glass_85_dfeffc_1x400.png +0 -0
- data/vendor/assets/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/vendor/assets/images/ui-bg_gloss-wave_55_5c9ccc_500x100.png +0 -0
- data/vendor/assets/images/ui-bg_inset-hard_100_f5f8f9_1x100.png +0 -0
- data/vendor/assets/images/ui-bg_inset-hard_100_fcfdfd_1x100.png +0 -0
- data/vendor/assets/images/ui-icons_217bc0_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_2e83ff_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_469bdd_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_6da8d5_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_d8e7f3_256x240.png +0 -0
- data/vendor/assets/images/ui-icons_f9bd01_256x240.png +0 -0
- data/vendor/assets/javascripts/jquery-ui.custom.js +4538 -0
- data/vendor/assets/stylesheets/jquery-ui-1.10.3.custom.css.scss +724 -0
- metadata +214 -64
- data/app/assets/images/arrow_down.gif +0 -0
- data/app/assets/images/arrow_up.gif +0 -0
- data/app/assets/images/iqvoc_logo.png +0 -0
- data/app/assets/images/spinner_16x16.gif +0 -0
- data/app/assets/images/spinner_24x24.gif +0 -0
- data/app/assets/stylesheets/iqvoc/components.css.scss +0 -155
- data/app/assets/stylesheets/iqvoc/layout.css.scss +0 -0
- data/app/views/concepts/alphabetical/_pref_labeling.html.erb +0 -19
- data/app/views/import/import.html.erb +0 -7
- data/app/views/import/index.html.erb +0 -17
- data/vendor/assets/javascripts/jquery-ui-1.8.23.custom.js +0 -3399
- data/vendor/assets/stylesheets/jquery-ui-1.8.23.custom.css.scss +0 -405
@@ -3,26 +3,26 @@ Iqvoc.default_rdf_namespace_helper_methods.each do |meth|
|
|
3
3
|
end
|
4
4
|
|
5
5
|
document.namespaces(
|
6
|
-
:search => url_for(request.query_parameters.merge(:page => @results && @results.current_page, :only_path => false, :anchor => "")),
|
6
|
+
:search => url_for(request.query_parameters.merge(:page => @results && @results.current_page, :lang => nil, :only_path => false, :anchor => "")),
|
7
7
|
:sdc => "http://sindice.com/vocab/search#"
|
8
8
|
)
|
9
9
|
|
10
|
-
document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => nil, :only_path => false))), IqRdf::Sdc::build_uri('Query')) do |query|
|
10
|
+
document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => nil, :lang => nil, :only_path => false))), IqRdf::Sdc::build_uri('Query')) do |query|
|
11
11
|
query.Sdc::totalResults(@results.total_count)
|
12
12
|
query.Sdc::itemsPerPage(@results.limit_value)
|
13
13
|
query.Sdc::searchTerms(params[:query])
|
14
|
-
query.Sdc::first(URI.parse(url_for(request.query_parameters.merge(:page => 1, :only_path => false))))
|
15
|
-
query.Sdc::last(URI.parse(url_for(request.query_parameters.merge(:page => @results.num_pages, :only_path => false))))
|
14
|
+
query.Sdc::first(URI.parse(url_for(request.query_parameters.merge(:page => 1, :lang => nil, :only_path => false))))
|
15
|
+
query.Sdc::last(URI.parse(url_for(request.query_parameters.merge(:page => @results.num_pages, :lang => nil, :only_path => false))))
|
16
16
|
i = 0
|
17
17
|
@results.each do
|
18
18
|
query.Sdc::result(IqRdf::Search::build_uri("result#{i+=1}"))
|
19
19
|
end
|
20
20
|
end
|
21
21
|
|
22
|
-
document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page, :only_path => false))), IqRdf::Sdc::build_uri('Page')) do |page|
|
22
|
+
document << IqRdf.build_full_uri_subject(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page, :lang => nil, :only_path => false))), IqRdf::Sdc::build_uri('Page')) do |page|
|
23
23
|
page.Sdc::startIndex((@results.current_page - 1) * @results.limit_value + 1)
|
24
|
-
page.Sdc::previous(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page - 1, :only_path => false)))) if @results.current_page > 1
|
25
|
-
page.Sdc::next(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page + 1, :only_path => false)))) if @results.current_page < @results.num_pages
|
24
|
+
page.Sdc::previous(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page - 1, :lang => nil, :only_path => false)))) if @results.current_page > 1
|
25
|
+
page.Sdc::next(URI.parse(url_for(request.query_parameters.merge(:page => @results.current_page + 1, :lang => nil, :only_path => false)))) if @results.current_page < @results.num_pages
|
26
26
|
end
|
27
27
|
|
28
28
|
i = 0
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<% if @datasets.any? %>
|
2
|
+
<%= input_block :label => t('txt.views.search_results.datasets') do %>
|
3
|
+
<% @datasets.each do |dataset| %>
|
4
|
+
<label class="checkbox inline">
|
5
|
+
<%= check_box_tag "ds[]", dataset.name, search_dataset_selected?(dataset.name) %><%= dataset.name %>
|
6
|
+
</label>
|
7
|
+
<% end %>
|
8
|
+
<div class="btn-group">
|
9
|
+
<button type="button" class="btn btn-mini checkbox-select-all">
|
10
|
+
<%= t('txt.views.search_results.all') %>
|
11
|
+
</button>
|
12
|
+
<button type="button" class="btn btn-mini checkbox-select-none">
|
13
|
+
<%= t('txt.views.search_results.none') %>
|
14
|
+
</button>
|
15
|
+
</div>
|
16
|
+
<% end %>
|
17
|
+
<% end %>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<%= input_block :label => t('txt.views.search_results.for'), :id => 't' do %>
|
2
2
|
<select name="t" id="t" class="search_type">
|
3
|
-
<%= options_for_select(Iqvoc.
|
4
|
-
[
|
3
|
+
<%= options_for_select(Iqvoc.searchable_class_names.map { |klass, identifier|
|
4
|
+
[klass.constantize.model_name.human(:count => 2), identifier]
|
5
5
|
}, params[:t]) %>
|
6
6
|
</select>
|
7
7
|
<% end %>
|
@@ -1,14 +1,14 @@
|
|
1
1
|
<%= input_block :label => t('txt.views.search_results.search_languages') do %>
|
2
2
|
<% @available_languages.sort.each do |lang_tag, label| %>
|
3
3
|
<label for="languages_<%= lang_tag %>" class="checkbox inline">
|
4
|
-
<%= check_box_tag "l[]", lang_tag,
|
4
|
+
<%= check_box_tag "l[]", lang_tag, search_language_selected?(lang_tag) %><%= lang_tag %>
|
5
5
|
</label>
|
6
6
|
<% end %>
|
7
7
|
<div class="btn-group">
|
8
|
-
<button type="button"
|
8
|
+
<button type="button" class="btn btn-mini checkbox-select-all">
|
9
9
|
<%= t('txt.views.search_results.all') %>
|
10
10
|
</button>
|
11
|
-
<button type="button"
|
11
|
+
<button type="button" class="btn btn-mini checkbox-select-none">
|
12
12
|
<%= t('txt.views.search_results.none') %>
|
13
13
|
</button>
|
14
14
|
</div>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%= sidebar do %>
|
2
2
|
<%= sidebar_header 'Links' %>
|
3
|
-
<%= sidebar_item :icon => :
|
3
|
+
<%= sidebar_item :icon => :users, :text => User.model_name.human(:count => 5), :path => users_path, :active => params[:action] == 'index' %>
|
4
4
|
<%= sidebar_item :icon => :user, :text => t('txt.views.users.new_link'), :path => new_user_path, :active => params[:action] == 'new' %>
|
5
5
|
<% end %>
|
data/config/application.rb
CHANGED
data/config/engine.rb
CHANGED
@@ -13,6 +13,11 @@ require 'sass'
|
|
13
13
|
require 'sass-rails'
|
14
14
|
require 'bootstrap-sass'
|
15
15
|
require 'protected_attributes'
|
16
|
+
require 'font-awesome-rails'
|
17
|
+
require 'uglifier'
|
18
|
+
require 'apipie-rails'
|
19
|
+
require 'database_cleaner'
|
20
|
+
require 'delayed_job_active_record'
|
16
21
|
|
17
22
|
require 'iqvoc/controller_extensions'
|
18
23
|
|
@@ -16,39 +16,85 @@
|
|
16
16
|
|
17
17
|
if Iqvoc.const_defined?(:Application)
|
18
18
|
Iqvoc::Application.configure do
|
19
|
-
# Settings specified here will take precedence over those in config/
|
19
|
+
# Settings specified here will take precedence over those in config/application.rb.
|
20
20
|
|
21
|
-
#
|
22
|
-
# Code is not reloaded between requests
|
21
|
+
# Code is not reloaded between requests.
|
23
22
|
config.cache_classes = true
|
24
23
|
|
25
|
-
#
|
24
|
+
# Eager load code on boot. This eager loads most of Rails and
|
25
|
+
# your application in memory, allowing both thread web servers
|
26
|
+
# and those relying on copy on write to perform better.
|
27
|
+
# Rake tasks automatically ignore this option for performance.
|
28
|
+
config.eager_load = true
|
29
|
+
|
30
|
+
# Full error reports are disabled and caching is turned on.
|
26
31
|
config.consider_all_requests_local = false
|
27
32
|
config.action_controller.perform_caching = true
|
28
33
|
|
29
|
-
#
|
30
|
-
#
|
34
|
+
# Enable Rack::Cache to put a simple HTTP cache in front of your application
|
35
|
+
# Add `rack-cache` to your Gemfile before enabling this.
|
36
|
+
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
|
37
|
+
# config.action_dispatch.rack_cache = true
|
31
38
|
|
32
|
-
# Disable Rails's static asset server
|
33
|
-
# In production, Apache or nginx will already do this
|
39
|
+
# Disable Rails's static asset server (Apache or nginx will already do this).
|
34
40
|
config.serve_static_assets = true
|
35
41
|
|
36
|
-
# Compress JavaScripts and CSS
|
37
|
-
config.assets.
|
42
|
+
# Compress JavaScripts and CSS.
|
43
|
+
config.assets.js_compressor = :uglifier
|
44
|
+
# config.assets.css_compressor = :sass
|
45
|
+
|
46
|
+
# Do not fallback to assets pipeline if a precompiled asset is missed.
|
47
|
+
config.assets.compile = false
|
48
|
+
|
49
|
+
# Generate digests for assets URLs.
|
50
|
+
config.assets.digest = true
|
51
|
+
|
52
|
+
# Version of your assets, change this if you want to expire all your assets.
|
53
|
+
config.assets.version = '1.0'
|
54
|
+
|
55
|
+
# Specifies the header that your server uses for sending files.
|
56
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
57
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
58
|
+
|
59
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
60
|
+
# config.force_ssl = true
|
61
|
+
|
62
|
+
# Set to :debug to see everything in the log.
|
63
|
+
config.log_level = :info
|
38
64
|
|
39
|
-
#
|
40
|
-
config.
|
65
|
+
# Prepend all log lines with the following tags.
|
66
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
41
67
|
|
42
|
-
#
|
43
|
-
config.
|
68
|
+
# Use a different logger for distributed setups.
|
69
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
70
|
+
|
71
|
+
# Use a different cache store in production.
|
72
|
+
# config.cache_store = :mem_cache_store
|
73
|
+
|
74
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
|
75
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
76
|
+
|
77
|
+
# Precompile additional assets.
|
78
|
+
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
|
79
|
+
# config.assets.precompile += %w( search.js )
|
80
|
+
|
81
|
+
# Ignore bad email addresses and do not raise email delivery errors.
|
82
|
+
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
83
|
+
# config.action_mailer.raise_delivery_errors = false
|
44
84
|
|
45
85
|
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
46
|
-
# the I18n.default_locale when a translation can not be found)
|
86
|
+
# the I18n.default_locale when a translation can not be found).
|
47
87
|
config.i18n.fallbacks = true
|
48
88
|
|
49
|
-
# Send deprecation notices to registered listeners
|
89
|
+
# Send deprecation notices to registered listeners.
|
50
90
|
config.active_support.deprecation = :notify
|
51
91
|
|
92
|
+
# Disable automatic flushing of the log to improve performance.
|
93
|
+
# config.autoflush_log = false
|
94
|
+
|
95
|
+
# Use default logging formatter so that PID and timestamp are not suppressed.
|
96
|
+
config.log_formatter = ::Logger::Formatter.new
|
97
|
+
|
52
98
|
# Enforce whitelist mode for mass assignment.
|
53
99
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
54
100
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "iqvoc/version"
|
2
|
+
|
3
|
+
Apipie.configure do |config|
|
4
|
+
config.default_version = Iqvoc::VERSION
|
5
|
+
config.app_name = "iQvoc"
|
6
|
+
config.api_base_url = "/"
|
7
|
+
config.doc_base_url = "/apidoc"
|
8
|
+
config.api_controllers_matcher = ["#{Iqvoc.root}/app/controllers/*.rb",
|
9
|
+
"#{Iqvoc.root}/app/controllers/concepts/*.rb"]
|
10
|
+
config.markup = Apipie::Markup::Markdown.new
|
11
|
+
config.validate = false
|
12
|
+
config.validate_value = false
|
13
|
+
config.validate_presence = false
|
14
|
+
config.app_info = <<-EOF
|
15
|
+
iQvoc is a Vocabulary Management System for the Semantic Web.
|
16
|
+
EOF
|
17
|
+
end
|
@@ -1,12 +1,28 @@
|
|
1
|
-
#
|
1
|
+
# encoding: UTF-8
|
2
|
+
|
3
|
+
# Copyright 2011-2013 innoQ Deutschland GmbH
|
4
|
+
#
|
5
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
# you may not use this file except in compliance with the License.
|
7
|
+
# You may obtain a copy of the License at
|
8
|
+
#
|
9
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
10
|
+
#
|
11
|
+
# Unless required by applicable law or agreed to in writing, software
|
12
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
# See the License for the specific language governing permissions and
|
15
|
+
# limitations under the License.
|
2
16
|
|
3
|
-
#
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
17
|
+
# Be sure to restart your server when you modify this file.
|
5
18
|
|
6
|
-
|
7
|
-
#
|
8
|
-
#
|
19
|
+
if Iqvoc.const_defined?(:Application)
|
20
|
+
# Your secret key for verifying the integrity of signed cookies.
|
21
|
+
# If you change this key, all old signed cookies will become invalid!
|
22
|
+
# Make sure the secret is at least 30 characters and all random,
|
23
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
9
24
|
|
10
|
-
#
|
11
|
-
#
|
12
|
-
Iqvoc::Application.config.secret_key_base = '
|
25
|
+
# Run `rake secret` and uncomment the following line
|
26
|
+
# Replace the secret-placeholder with your generated token
|
27
|
+
Iqvoc::Application.config.secret_key_base = 'cc2b43de90958fd527e34b43ed9649ba062a2b6dae4a5226cd23410c7480c5d0e68a7e5e93e8cbda459ce7011bab0412b7649981ed0fb9232b49f5cf6ed99b58'
|
28
|
+
end
|
data/config/locales/de.yml
CHANGED
@@ -75,6 +75,7 @@ de:
|
|
75
75
|
hint_csv_input: "Mehrere Werte können kommagetrennt eingeben werden."
|
76
76
|
form_errors: "Fehler"
|
77
77
|
representations: "Repräsentationen"
|
78
|
+
other: "Sonstige"
|
78
79
|
|
79
80
|
views:
|
80
81
|
layouts:
|
@@ -96,6 +97,7 @@ de:
|
|
96
97
|
languages: Sprachen
|
97
98
|
performance: Performance
|
98
99
|
triplestore: Triplestore
|
100
|
+
sources: Verteilte Suche
|
99
101
|
settings:
|
100
102
|
title: Titel
|
101
103
|
languages_notes: Sprachen für Notes
|
@@ -106,6 +108,7 @@ de:
|
|
106
108
|
triplestore_username: Benutzername für Triplestore
|
107
109
|
triplestore_password: Passwort für Triplestore
|
108
110
|
triplestore_autosync: automatische Synchronisation mit Triplestore
|
111
|
+
sources_iqvoc: Quellen (iQvoc)
|
109
112
|
alphabetical_concepts:
|
110
113
|
untranslated_concepts:
|
111
114
|
caption: "Fehlende Übersetzungen"
|
@@ -182,6 +185,7 @@ de:
|
|
182
185
|
no_results: "Keine Ergebnisse"
|
183
186
|
search_languages: "Sprachen"
|
184
187
|
search_results: "Suchergebnisse"
|
188
|
+
search_results_on: "Suchergebnisse auf %{dataset}"
|
185
189
|
results_found:
|
186
190
|
one: "Ihre Suche nach <strong>%{query}</strong> lieferte %{count} Ergebnis."
|
187
191
|
other: "Ihre Suche nach <strong>%{query}</strong> lieferte %{count} Ergebnisse."
|
@@ -194,6 +198,7 @@ de:
|
|
194
198
|
none: "keine"
|
195
199
|
for: "Nach"
|
196
200
|
mode: "Modus"
|
201
|
+
datasets: "Externe Quellen"
|
197
202
|
user_sessions:
|
198
203
|
header: "Anmelden"
|
199
204
|
login: "Anmelden"
|
@@ -260,11 +265,19 @@ de:
|
|
260
265
|
state: "Status"
|
261
266
|
full_rdf_export: Vollständiger RDF Export
|
262
267
|
import: Import
|
268
|
+
reset: Thesaurus löschen
|
269
|
+
reset_warning: "Alle Konzepte, Kollektionen und Labels im Thesaurus werden gelöscht."
|
270
|
+
reset_success: "Der Thesaurus wurde gelöscht."
|
263
271
|
collections:
|
264
272
|
new: "Neue Kollektion"
|
265
273
|
triplestore_sync:
|
266
274
|
caption: "Sync mit Triplestore"
|
267
275
|
start: "Synchronisierung starten"
|
276
|
+
import:
|
277
|
+
title: "Import"
|
278
|
+
file: "NTriples-Datei"
|
279
|
+
namespace: "Standard Namespace"
|
280
|
+
success: "Import-Job wurde erstellt. Seite neu laden, um Status zu aktualisieren."
|
268
281
|
|
269
282
|
partials:
|
270
283
|
note:
|
@@ -288,6 +301,7 @@ de:
|
|
288
301
|
invalid_value: "fehlerhafter Wert: %{key} (%{error_message})"
|
289
302
|
search_results:
|
290
303
|
insufficient_data: "Bitte geben Sie mehr Suchkriterien an."
|
304
|
+
remote_source_error: "Externe Quelle '%{source}' konnte nicht durchsucht werden."
|
291
305
|
users:
|
292
306
|
successfully_created: "Benutzer wurde erfolgreich erstellt."
|
293
307
|
successfully_updated: "Der Benutzer wurde erfolgreich geändert."
|
data/config/locales/en.yml
CHANGED
@@ -75,6 +75,7 @@ en:
|
|
75
75
|
hint_csv_input: "Multiple values can be entered comma-separated."
|
76
76
|
form_errors: "Errors"
|
77
77
|
representations: "Representations"
|
78
|
+
other: "Other"
|
78
79
|
|
79
80
|
views:
|
80
81
|
layouts:
|
@@ -96,6 +97,7 @@ en:
|
|
96
97
|
languages: languages
|
97
98
|
performance: Performance
|
98
99
|
triplestore: triplestore
|
100
|
+
sources: Distributed search
|
99
101
|
settings:
|
100
102
|
title: site title
|
101
103
|
languages_notes: languages for notes
|
@@ -106,6 +108,7 @@ en:
|
|
106
108
|
triplestore_username: username for triplestore
|
107
109
|
triplestore_password: password for triplestore
|
108
110
|
triplestore_autosync: automatic triplestore synchronization
|
111
|
+
sources_iqvoc: Sources (iQvoc)
|
109
112
|
alphabetical_concepts:
|
110
113
|
untranslated_concepts:
|
111
114
|
caption: "Missing Translations"
|
@@ -190,6 +193,7 @@ en:
|
|
190
193
|
no_results: "No results"
|
191
194
|
search_languages: "Languages"
|
192
195
|
search_results: "Search results"
|
196
|
+
search_results_on: "Search results on %{dataset}"
|
193
197
|
results_found:
|
194
198
|
one: "Your search for <strong>%{query}</strong> yielded the following %{count} result."
|
195
199
|
other: "Your search for <strong>%{query}</strong> yielded the following %{count} results."
|
@@ -202,6 +206,7 @@ en:
|
|
202
206
|
none: "none"
|
203
207
|
for: "For"
|
204
208
|
mode: "Mode"
|
209
|
+
datasets: "External sources"
|
205
210
|
user_sessions:
|
206
211
|
header: "Login"
|
207
212
|
login: "Login"
|
@@ -267,11 +272,19 @@ en:
|
|
267
272
|
state: "State"
|
268
273
|
full_rdf_export: Complete RDF export
|
269
274
|
import: Import
|
275
|
+
reset: Reset Thesaurus
|
276
|
+
reset_warning: "All concepts, collections and labels in the thesaurus will be deleted."
|
277
|
+
reset_success: "Thesaurus has been reset."
|
270
278
|
collections:
|
271
279
|
new: "New collection"
|
272
280
|
triplestore_sync:
|
273
281
|
caption: "Sync with Triplestore"
|
274
282
|
start: "Start synchronization"
|
283
|
+
import:
|
284
|
+
title: "Import"
|
285
|
+
file: "NTriples file"
|
286
|
+
namespace: "Default namespace"
|
287
|
+
success: "Import job was created. Reload page to see current processing status."
|
275
288
|
|
276
289
|
partials:
|
277
290
|
note:
|
@@ -295,6 +308,7 @@ en:
|
|
295
308
|
invalid_value: "unsupported value: %{key} (%{error_message})"
|
296
309
|
search_results:
|
297
310
|
insufficient_data: "You gave insufficient search data."
|
311
|
+
remote_source_error: "Remote source '%{source}' could not be queried."
|
298
312
|
users:
|
299
313
|
successfully_created: "User has been successfully created."
|
300
314
|
successfully_updated: "User has been successfully updated."
|
data/config/locales/pt.yml
CHANGED
data/config/routes.rb
CHANGED
@@ -15,6 +15,7 @@
|
|
15
15
|
# limitations under the License.
|
16
16
|
|
17
17
|
Rails.application.routes.draw do
|
18
|
+
apipie
|
18
19
|
scope ':lang', :constraints => lambda { |params, req|
|
19
20
|
langs = Iqvoc::Concept.pref_labeling_languages.join('|').presence || 'en'
|
20
21
|
return params[:lang].to_s =~ /^#{langs}$/
|
@@ -26,6 +27,7 @@ Rails.application.routes.draw do
|
|
26
27
|
resources :users, :except => [:show]
|
27
28
|
resources :concepts
|
28
29
|
resources :collections
|
30
|
+
resources :imports, :only => [:index, :show, :create]
|
29
31
|
|
30
32
|
get 'scheme' => 'concepts/scheme#show', :as => 'scheme'
|
31
33
|
get 'scheme/edit' => 'concepts/scheme#edit', :as => 'edit_scheme'
|
@@ -50,13 +52,11 @@ Rails.application.routes.draw do
|
|
50
52
|
get 'expired_concepts' => 'concepts/expired#index', :as => 'expired_concepts'
|
51
53
|
|
52
54
|
get 'dashboard' => 'dashboard#index', :as => 'dashboard'
|
55
|
+
match 'dashboard/reset' => 'dashboard#reset', :as => 'reset', :via => [:get, :post]
|
53
56
|
|
54
57
|
get 'config' => 'instance_configuration#index', :as => 'instance_configuration'
|
55
58
|
patch 'config' => 'instance_configuration#update'
|
56
59
|
|
57
|
-
get 'import' => 'import#index', :as => 'import'
|
58
|
-
post 'import' => 'import#import'
|
59
|
-
|
60
60
|
get 'search' => 'search_results#index', :as => 'search'
|
61
61
|
|
62
62
|
get 'help' => 'pages#help', :as => 'help'
|
@@ -65,10 +65,13 @@ Rails.application.routes.draw do
|
|
65
65
|
# root :to => 'frontpage#index', :format => nil
|
66
66
|
end
|
67
67
|
|
68
|
+
get 'remote_labels' => 'remote_labels#show', :as => 'remote_label'
|
68
69
|
get 'schema' => redirect('/'), :as => 'schema'
|
69
|
-
|
70
|
+
get 'dataset' => 'rdf#dataset', :as => 'rdf_dataset'
|
70
71
|
get 'scheme' => 'concepts/scheme#show', :as => 'rdf_scheme'
|
71
72
|
get 'search' => 'search_results#index', :as => 'rdf_search'
|
73
|
+
get 'hierarchy' => 'hierarchy#index'
|
74
|
+
get 'hierarchy/:root' => 'hierarchy#show'
|
72
75
|
|
73
76
|
get ':id' => 'rdf#show', :as => 'rdf'
|
74
77
|
|