iqvoc 4.13.2 → 4.14.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (104) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -8
  3. data/Gemfile.lock +381 -331
  4. data/app/aides/inline_data_helper.rb +3 -3
  5. data/app/aides/skos_exporter.rb +1 -1
  6. data/app/assets/javascripts/iqvoc/iqvoc.js +0 -20
  7. data/app/assets/stylesheets/iqvoc/_manifest.scss +1 -0
  8. data/app/assets/stylesheets/iqvoc/_search_results.scss +14 -0
  9. data/app/controllers/collections/versions_controller.rb +12 -47
  10. data/app/controllers/collections_controller.rb +15 -8
  11. data/app/controllers/concepts/alphabetical_controller.rb +1 -1
  12. data/app/controllers/concepts/hierarchical_controller.rb +9 -13
  13. data/app/controllers/concepts/versions_controller.rb +13 -48
  14. data/app/controllers/concepts_controller.rb +19 -15
  15. data/app/controllers/concepts_movement_controller.rb +1 -1
  16. data/app/controllers/dashboard_controller.rb +5 -5
  17. data/app/controllers/imports_controller.rb +9 -6
  18. data/app/controllers/reverse_matches_controller.rb +2 -4
  19. data/app/controllers/search_results_controller.rb +13 -19
  20. data/app/helpers/application_helper.rb +0 -8
  21. data/app/helpers/link_helper.rb +13 -9
  22. data/app/helpers/rdf_helper.rb +9 -5
  23. data/app/jobs/reverse_match_job.rb +8 -4
  24. data/app/models/ability.rb +7 -7
  25. data/app/models/collection/base.rb +17 -8
  26. data/app/models/concept/base.rb +17 -7
  27. data/app/models/concept/relation/base.rb +1 -1
  28. data/app/models/concept/relation/reverse_relation_extension.rb +9 -5
  29. data/app/models/concerns/search_extension.rb +0 -17
  30. data/app/models/concerns/versioning.rb +1 -31
  31. data/app/models/dataset/adaptors/iqvoc/alphabetical_search_adaptor.rb +2 -2
  32. data/app/models/dataset/adaptors/iqvoc/http_adaptor.rb +2 -2
  33. data/app/models/dataset/adaptors/iqvoc/search_adaptor.rb +2 -2
  34. data/app/models/export.rb +1 -1
  35. data/app/models/label/base.rb +5 -5
  36. data/app/models/note/base.rb +1 -1
  37. data/app/models/user.rb +2 -0
  38. data/app/uploaders/rdf_uploader.rb +1 -1
  39. data/app/views/collections/_data.html.erb +2 -2
  40. data/app/views/collections/show_unpublished.html.erb +3 -11
  41. data/app/views/concepts/notifications/_referenced_concepts.html.erb +0 -1
  42. data/app/views/concepts/show_published.html.erb +2 -0
  43. data/app/views/concepts/show_unpublished.html.erb +5 -11
  44. data/app/views/dashboard/_table.html.erb +0 -8
  45. data/app/views/pages/version.html.erb +1 -1
  46. data/app/views/partials/concept/_edit_link_base.html.erb +2 -2
  47. data/app/views/partials/concept/relation/_edit_base.html.erb +13 -10
  48. data/app/views/search_results/_detailed_search.html.erb +27 -0
  49. data/app/views/search_results/_form.html.erb +21 -9
  50. data/app/views/search_results/index.html.erb +4 -4
  51. data/app/views/search_results/sections/_change_note.html.erb +28 -25
  52. data/app/views/search_results/sections/_collection.html.erb +5 -5
  53. data/app/views/search_results/sections/_datasets.html.erb +8 -20
  54. data/app/views/search_results/sections/_klass.html.erb +7 -9
  55. data/app/views/search_results/sections/_languages.html.erb +4 -14
  56. data/app/views/search_results/sections/_mode.html.erb +8 -10
  57. data/app/views/search_results/sections/_options.html.erb +6 -8
  58. data/app/views/search_results/sections/_terms.html.erb +13 -10
  59. data/app/views/search_results/sections/_type.html.erb +13 -13
  60. data/config/application.rb +1 -1
  61. data/config/boot.rb +1 -1
  62. data/config/database.yml +21 -15
  63. data/config/database.yml.postgresql +1 -1
  64. data/config/engine.rb +1 -0
  65. data/config/initializers/active_record.rb +2 -0
  66. data/config/initializers/content_security_policy.rb +21 -26
  67. data/config/initializers/filter_parameter_logging.rb +4 -2
  68. data/config/initializers/inflections.rb +4 -4
  69. data/config/initializers/iqvoc.rb +1 -0
  70. data/config/locales/de.yml +13 -18
  71. data/config/locales/en.yml +13 -18
  72. data/config/locales/pt.yml +0 -7
  73. data/config/routes.rb +0 -4
  74. data/db/migrate/20231012135837_remove_locked_by.rb +6 -0
  75. data/db/schema.rb +31 -34
  76. data/iqvoc.gemspec +7 -5
  77. data/lib/iqvoc/configuration/concept.rb +2 -0
  78. data/lib/iqvoc/configuration/core.rb +4 -0
  79. data/lib/iqvoc/configuration/instance_configuration.rb +2 -2
  80. data/lib/iqvoc/environments/development.rb +5 -2
  81. data/lib/iqvoc/environments/production.rb +7 -28
  82. data/lib/iqvoc/environments/test.rb +1 -1
  83. data/lib/iqvoc/version.rb +1 -1
  84. data/test/controllers/concepts_movement_controller_test.rb +0 -2
  85. data/test/controllers/reverse_match_test.rb +1 -1
  86. data/test/integration/collection_browsing_test.rb +45 -0
  87. data/test/integration/collection_circularity_test.rb +3 -3
  88. data/test/integration/concept_collection_assignment_test.rb +1 -1
  89. data/test/integration/create_concept_test.rb +15 -0
  90. data/test/integration/reverse_match_job_test.rb +39 -7
  91. data/test/integration/search_test.rb +9 -9
  92. data/test/integration/version_page_test.rb +26 -0
  93. data/test/models/concept_test.rb +37 -0
  94. data/test/models/deep_cloning_test.rb +9 -7
  95. data/test/test_helper.rb +3 -0
  96. metadata +81 -67
  97. data/app/views/search_results/sections/_note.html.erb +0 -6
  98. data/bin/bundle +0 -3
  99. data/bin/delayed_job +0 -5
  100. data/bin/rails +0 -4
  101. data/bin/rake +0 -4
  102. data/bin/setup +0 -36
  103. data/bin/update +0 -31
  104. data/bin/yarn +0 -17
@@ -1,10 +1,22 @@
1
- <%= form_tag(search_path, method: :get, id:'search', role: 'form', class: 'mb-4') do |f| %>
2
- <% Iqvoc.search_sections.each do |section| %>
3
- <%= render "search_results/sections/#{section}" %>
4
- <% end %>
5
-
6
- <hr />
7
-
8
- <%= submit_tag t('txt.views.search_results.submit'), :class => 'btn btn-primary' %>
9
-
1
+ <%= form_tag(search_path, method: :get, id: 'search', role: 'form', class: 'mt-3 mb-4') do |f| %>
2
+ <div class="row">
3
+ <div class="col">
4
+ <%= render "search_results/sections/terms" %>
5
+ </div>
6
+ </div>
7
+ <div class="row justify-content-between">
8
+ <div class="col">
9
+ <%= render "search_results/sections/languages" %>
10
+ </div>
11
+ <div class="col-auto">
12
+ <button class="btn btn-outline-secondary collapse-toggle" data-toggle="collapse" data-target="#detailedSearch" type="button" aria-expanded="false" aria-controls="detailedSearch">
13
+ <span class="mr-2"><%= t('txt.views.search_results.detailed_search') %></span>
14
+ <i class="hide-if-expanded fa fa-chevron-down"></i>
15
+ <i class="hide-if-collapsed fa fa-chevron-up"></i>
16
+ </button>
17
+ </div>
18
+ </div>
19
+ <div id="detailedSearch" class="collapse <%= current_user ? 'show' : ''%>">
20
+ <%= render 'detailed_search' %>
21
+ </div>
10
22
  <% end %>
@@ -4,9 +4,9 @@
4
4
  <%= render 'form' %>
5
5
 
6
6
  <% if @results %>
7
- <div class="panel">
8
- <%= results_header @results %>
7
+ <div class="panel">
8
+ <%= results_header @results %>
9
9
  <%= render 'result_list' %>
10
- <%= paginate @results %>
11
- </div>
10
+ <%= paginate @results %>
11
+ </div>
12
12
  <% end %>
@@ -1,28 +1,31 @@
1
- <div class="form-group row">
2
- <label class="col-sm-2 col-form-label">
3
- <%= t('txt.views.search_results.change_note.date') %>
4
- </label>
5
-
6
- <div class="col-sm-10">
7
- <div class="form-inline">
8
- <label for="change_note_type" class="sr-only"><%= t('txt.views.search_results.change_note.type') %></label>
9
- <%= select_tag :change_note_type, options_for_select([[t('txt.views.search_results.change_note.created'), :created], [t('txt.views.search_results.change_note.modified'), :modified]], params[:change_note_type]), :prompt => t('txt.views.search_results.all'), class: 'form-control col-sm-3' %>
10
-
11
- <div class="input-group date datepicker">
12
- <label for="change_note_date_from" class="sr-only"><%= t('txt.views.search_results.change_note.date_from') %></label>
13
- <%= text_field_tag :change_note_date_from, params[:change_note_date_from], placeholder: 'z.B.: 2010-05-14', class: 'form-control', style: 'border-radius: 4px 0px 0px 4px;' %>
14
- <div class="input-group-append">
15
- <span class="input-group-text"><i class="fa fa-calendar" aria-hidden="true"></i></span>
16
- </div>
17
- </div>
18
-
19
- <div class="input-group date datepicker">
20
- <label for="change_note_date_to" class="sr-only"><%= t('txt.views.search_results.change_note.date_to') %></label>
21
- <%= text_field_tag :change_note_date_to, params[:change_note_date_to], placeholder: 'z.B.: 2010-05-14', class: 'form-control', style: 'border-radius: 4px 0px 0px 4px;' %>
22
- <div class="input-group-append">
23
- <span class="input-group-text"><i class="fa fa-calendar" aria-hidden="true"></i></span>
24
- </div>
25
- </div>
1
+ <div class="form-group col-md-6">
2
+ <%= label_tag :change_note_type, t('txt.views.search_results.change_note.date') %>
3
+ <%= select_tag :change_note_type,
4
+ options_for_select([[t('txt.views.search_results.change_note.created'), :created], [t('txt.views.search_results.change_note.modified'), :modified]], params[:change_note_type]),
5
+ :prompt => t('txt.views.search_results.change_note.all'),
6
+ class: 'form-control' %>
7
+ </div>
8
+ <div class="col-md-3">
9
+ <%= label_tag :change_note_date_from, t('txt.views.search_results.change_note.date_from') %>
10
+ <div class="input-group date datepicker">
11
+ <%= text_field_tag :change_note_date_from, params[:change_note_date_from],
12
+ placeholder: 'z.B.: 2010-05-14',
13
+ class: 'form-control',
14
+ style: 'border-radius: 4px 0px 0px 4px;' %>
15
+ <div class="input-group-append">
16
+ <span class="input-group-text"><i class="fa fa-calendar" aria-hidden="true"></i></span>
17
+ </div>
18
+ </div>
19
+ </div>
20
+ <div class="col-md-3">
21
+ <%= label_tag :change_note_date_to, t('txt.views.search_results.change_note.date_to') %>
22
+ <div class="input-group date datepicker">
23
+ <%= text_field_tag :change_note_date_to, params[:change_note_date_to],
24
+ placeholder: 'z.B.: 2010-05-14',
25
+ class: 'form-control',
26
+ style: 'border-radius: 4px 0px 0px 4px;' %>
27
+ <div class="input-group-append">
28
+ <span class="input-group-text"><i class="fa fa-calendar" aria-hidden="true"></i></span>
26
29
  </div>
27
30
  </div>
28
31
  </div>
@@ -1,6 +1,6 @@
1
- <div class="form-group row result_type_filter">
2
- <%= label_tag 'c', Iqvoc::Collection.base_class.model_name.human, :class => 'col-sm-2 col-form-label' %>
3
- <div class="col-sm-4">
4
- <%= select_tag 'c', options_from_collection_for_select(@collections, 'origin', 'status', params[:c]), :class => 'form-control', :prompt => t('txt.views.search_results.all') %>
5
- </div>
1
+ <div class="form-group result_type_filter">
2
+ <%= label_tag 'c', Iqvoc::Collection.base_class.model_name.human %>
3
+ <%= select_tag 'c', options_from_collection_for_select(@collections, 'origin', 'status', params[:c]),
4
+ :class => 'form-control',
5
+ :prompt => t('txt.views.search_results.all') %>
6
6
  </div>
@@ -1,23 +1,11 @@
1
1
  <% if @datasets.any? %>
2
- <div class="form-group row">
3
- <%= label_tag 'ds', t('txt.views.search_results.datasets'), :class => 'col-sm-2 col-form-label' %>
4
- <div class="checkbox-controls col-sm-6">
5
- <% @datasets.each do |dataset| %>
6
- <div class="form-check form-check-inline">
7
- <label class="checkbox-inline">
8
- <%= check_box_tag "ds[]", dataset.name, search_dataset_selected?(dataset.name), class: 'form-check-input' %>
9
- <%= dataset.name %>
10
- </label>
2
+ <div class="form-group">
3
+ <%= label_tag 'ds', t('txt.views.search_results.datasets') %>
4
+ <% @datasets.each_with_index do |dataset, idx| %>
5
+ <div class="form-check">
6
+ <%= check_box_tag "ds[]", dataset.name, search_dataset_selected?(dataset.name), class: 'form-check-input', id: "datasets_#{idx}" %>
7
+ <%= label_tag "datasets_#{idx}", dataset.name, class: 'form-check-label' %>
11
8
  </div>
12
- <% end %>
13
- <div class="btn-group btn-group-sm">
14
- <button type="button" class="btn btn-outline-secondary checkbox-select-all">
15
- <%= t('txt.views.search_results.all') %>
16
- </button>
17
- <button type="button" class="btn btn-outline-secondary checkbox-select-none">
18
- <%= t('txt.views.search_results.none') %>
19
- </button>
20
- </div>
21
- </div>
9
+ <% end %>
22
10
  </div>
23
- <% end %>
11
+ <% end %>
@@ -1,10 +1,8 @@
1
- <div class="form-group row">
2
- <%= label_tag 't', t('txt.views.search_results.for'), :class => 'col-sm-2 col-form-label' %>
3
- <div class="col-sm-3">
4
- <select name="t" id="t" class="search_type form-control">
5
- <%= options_for_select(Iqvoc.searchable_class_names.map { |klass, identifier|
6
- [klass.constantize.model_name.human(:count => 2), identifier]
7
- }, params[:t]) %>
8
- </select>
9
- </div>
1
+ <div class="form-group">
2
+ <%= label_tag 't', t('txt.views.search_results.for') %>
3
+ <select name="t" id="t" class="form-control">
4
+ <%= options_for_select(Iqvoc.searchable_class_names.map { |klass, identifier|
5
+ [klass.constantize.model_name.human(:count => 2), identifier]
6
+ }, params[:t]) %>
7
+ </select>
10
8
  </div>
@@ -1,21 +1,11 @@
1
1
  <div class="form-group row">
2
- <%= label_tag 'ds', t('txt.views.search_results.language'), :class => 'col-sm-2 col-form-label' %>
3
- <div class="checkbox-controls col-sm-4">
2
+ <%= label_tag 'ds', t('txt.views.search_results.language'), class: 'col-auto' %>
3
+ <div class="checkbox-controls col">
4
4
  <% @available_languages.sort.each do |lang_tag, label| %>
5
5
  <div class="form-check form-check-inline">
6
- <label for="languages_<%= lang_tag %>" class="form-check-label">
7
- <%= check_box_tag "l[]", lang_tag, search_language_selected?(lang_tag), class: 'form-check-input', id: "languages_#{lang_tag}" %>
8
- <%= lang_tag %>
9
- </label>
6
+ <%= check_box_tag "l[]", lang_tag, search_language_selected?(lang_tag), class: 'form-check-input', id: "languages_#{lang_tag}" %>
7
+ <%= label_tag "languages_#{lang_tag}", lang_tag, class: 'form-check-label' %>
10
8
  </div>
11
9
  <% end %>
12
- <div class="btn-group btn-group-sm">
13
- <button type="button" class="btn btn-outline-secondary checkbox-select-all">
14
- <%= t('txt.views.search_results.all') %>
15
- </button>
16
- <button type="button" class="btn btn-outline-secondary checkbox-select-none">
17
- <%= t('txt.views.search_results.none') %>
18
- </button>
19
- </div>
20
10
  </div>
21
11
  </div>
@@ -1,11 +1,9 @@
1
- <div class="form-group row">
2
- <%= label_tag 'qt', t('txt.views.search_results.mode'), :class => 'col-sm-2 col-form-label' %>
3
- <div class="col-sm-3">
4
- <%= select_tag :qt, options_for_select([
5
- [t('txt.views.search_results.contains'), 'contains'],
6
- [t('txt.views.search_results.exact'), 'exact'],
7
- [t('txt.views.search_results.ends_with'), 'ends_with'],
8
- [t('txt.views.search_results.begins_with'), 'begins_with']
9
- ], params[:qt]), :class => 'form-control' %>
10
- </div>
1
+ <div class="form-group">
2
+ <%= label_tag :qt, t('txt.views.search_results.mode') %>
3
+ <%= select_tag :qt, options_for_select([
4
+ [t('txt.views.search_results.contains'), 'contains'],
5
+ [t('txt.views.search_results.exact'), 'exact'],
6
+ [t('txt.views.search_results.ends_with'), 'ends_with'],
7
+ [t('txt.views.search_results.begins_with'), 'begins_with']
8
+ ], params[:qt]), :class => 'form-control' %>
11
9
  </div>
@@ -1,10 +1,8 @@
1
- <div class="form-group row result_type_filter">
2
- <div class="col-sm-8 offset-sm-2">
3
- <div class="form-check form-check-inline">
4
- <label for="include_expired" class="form-check-label">
5
- <%= check_box_tag :include_expired, true, params[:include_expired] == true, class: 'form-check-input' %>
6
- <%= t('txt.views.search_results.expired') %>
7
- </label>
8
- </div>
1
+ <div class="form-group result_type_filter">
2
+ <div class="form-check form-check-inline">
3
+ <label for="include_expired" class="form-check-label">
4
+ <%= check_box_tag :include_expired, true, params[:include_expired] == true, class: 'form-check-input' %>
5
+ <%= t('txt.views.search_results.expired') %>
6
+ </label>
9
7
  </div>
10
8
  </div>
@@ -1,12 +1,15 @@
1
- <div class="form-group has-feedback row">
2
- <%= label_tag 'q', t('txt.views.search_results.search_term'), :class => 'col-sm-2 col-form-label' %>
3
- <div class="col-sm-6">
4
- <div class="input-group">
5
- <% if Iqvoc.searchable_class_names.key(params[:t]).constantize.supports_multi_query? %>
6
- <%= text_area_tag :q, params[:query], :class => 'form-control', autofocus: true %>
7
- <% else %>
8
- <%= text_field_tag :q, params[:query], :class => 'form-control', autofocus: true, autocomplete: 'off' %>
9
- <% end %>
10
- </div>
1
+ <div class="form-group row no-gutters align-items-center bg-white search-input">
2
+ <div class="col-auto">
3
+ <i class="fa fa-search fa-lg"></i>
4
+ </div>
5
+ <div class="col">
6
+ <%= search_field_tag :q, params[:query],
7
+ class: 'form-control form-control-lg form-control-borderless border-0',
8
+ placeholder: t('txt.views.search_results.search_term'),
9
+ autofocus: true,
10
+ autocomplete: 'off' %>
11
+ </div>
12
+ <div class="col-auto">
13
+ <%= submit_tag t('txt.views.search_results.submit'), class: 'btn btn-block btn-lg btn-primary p-2' %>
11
14
  </div>
12
15
  </div>
@@ -1,25 +1,25 @@
1
- <div class="form-group result_type_filter row">
2
- <%= label_tag nil, t('txt.views.search_results.in'), :class => 'col-sm-2 col-form-label' %>
3
- <div class="col-sm-4">
4
- <div class="form-check">
1
+ <div class="form-group row">
2
+ <div class="col-12">
3
+ <%= label_tag nil, t('txt.views.search_results.in') %>
4
+ </div>
5
+ <div class="col-12">
6
+ <div class="form-check form-check-inline">
7
+ <%= radio_button_tag 'for', 'all', !%w(concept collection).include?(params[:for]), class: 'form-check-input' %>
8
+ <label for="for_all" class="form-check-label">
9
+ <%= t("txt.views.search_results.all") %>
10
+ </label>
11
+ </div>
12
+ <div class="form-check form-check-inline">
5
13
  <%= radio_button_tag 'for', 'concept', params[:for] == "concept", class: 'form-check-input' %>
6
14
  <label for="for_concept" class="form-check-label">
7
15
  <%= Iqvoc::Concept.base_class.model_name.human(:count => 2) %>
8
16
  </label>
9
17
  </div>
10
-
11
- <div class="form-check">
18
+ <div class="form-check form-check-inline">
12
19
  <%= radio_button_tag 'for', 'collection', params[:for] == "collection", class: 'form-check-input' %>
13
20
  <label for="for_collection" class="form-check-label">
14
21
  <%= Iqvoc::Collection.base_class.model_name.human(:count => 2) %>
15
22
  </label>
16
23
  </div>
17
-
18
- <div class="form-check">
19
- <%= radio_button_tag 'for', 'all', !%w(concept collection).include?(params[:for]), class: 'form-check-input' %>
20
- <label for="for_all" class="form-check-label">
21
- <%= t("txt.views.search_results.all") %>
22
- </label>
23
- </div>
24
24
  </div>
25
25
  </div>
@@ -21,7 +21,7 @@ Bundler.require(*Rails.groups)
21
21
  module Iqvoc
22
22
  class Application < Rails::Application
23
23
  # Initialize configuration defaults for originally generated Rails version.
24
- config.load_defaults 6.1
24
+ config.load_defaults 7.0
25
25
 
26
26
  # Configuration for the application, engines, and railties goes here.
27
27
  #
data/config/boot.rb CHANGED
@@ -1,4 +1,4 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
1
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
2
2
 
3
3
  require "bundler/setup" # Set up gems listed in the Gemfile.
4
4
  require "bootsnap/setup" # Speed up boot time by caching expensive operations.
data/config/database.yml CHANGED
@@ -1,20 +1,26 @@
1
- default: &default
2
- adapter: postgresql
3
- encoding: utf8
4
- host: <%= ENV['DB_HOST'] || 'localhost' %>
5
- username: <%= ENV['DB_USERNAME'] || 'mjansing' %>
6
- password: <%= ENV['DB_PASSWORD'] || '' %>
7
- port: 5432
8
- pool: <%= ENV["DB_POOL"] || ENV['RAILS_MAX_THREADS'] || 5 %>
9
-
10
1
  development:
11
- <<: *default
12
- database: <%= ENV['DB_NAME'].presence || 'iqvoc_development' %>
2
+ adapter: postgresql
3
+ host: localhost
4
+ encoding: unicode
5
+ database: <%= ENV["POSTGRES_DB"] || 'iqvoc_development' %>
6
+ pool: 5
7
+ username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
8
+ password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
13
9
 
14
10
  test:
15
- <<: *default
16
- database: <%= ENV['DB_NAME'].presence || 'iqvoc_test' %>
11
+ adapter: postgresql
12
+ host: localhost
13
+ encoding: unicode
14
+ database: <%= ENV["POSTGRES_DB"] || 'iqvoc_test' %>
15
+ pool: 5
16
+ username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
17
+ password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
17
18
 
18
19
  production:
19
- <<: *default
20
- database: <%= ENV['DB_NAME'].presence || 'iqvoc_development' %>
20
+ adapter: postgresql
21
+ host: <%= ENV["POSTGRES_HOST"] || 'localhost' %>
22
+ encoding: unicode
23
+ database: <%= ENV["POSTGRES_DB"] || 'iqvoc_production' %>
24
+ pool: 5
25
+ username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
26
+ password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
@@ -18,7 +18,7 @@ test:
18
18
 
19
19
  production:
20
20
  adapter: postgresql
21
- host: localhost
21
+ host: <%= ENV["POSTGRES_HOST"] || 'localhost' %>
22
22
  encoding: unicode
23
23
  database: <%= ENV["POSTGRES_DB"] || 'iqvoc_production' %>
24
24
  pool: 5
data/config/engine.rb CHANGED
@@ -15,6 +15,7 @@ require 'apipie-rails'
15
15
  require 'database_cleaner'
16
16
  require 'delayed_job_active_record'
17
17
  require 'carrierwave'
18
+ require 'carrierwave-i18n'
18
19
  require 'faraday'
19
20
  require 'faraday_middleware'
20
21
  require 'rack-mini-profiler'
@@ -14,5 +14,7 @@
14
14
  # See the License for the specific language governing permissions and
15
15
  # limitations under the License.
16
16
 
17
+ require 'search_extension'
18
+
17
19
  ActiveRecord::Base.store_full_sti_class = true
18
20
  ActiveRecord::Base.send :include, SearchExtension
@@ -1,30 +1,25 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Define an application-wide content security policy
4
- # For further information see the following documentation
5
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
3
+ # Define an application-wide content security policy.
4
+ # See the Securing Rails Applications Guide for more information:
5
+ # https://guides.rubyonrails.org/security.html#content-security-policy-header
6
6
 
7
- # Rails.application.config.content_security_policy do |policy|
8
- # policy.default_src :self, :https
9
- # policy.font_src :self, :https, :data
10
- # policy.img_src :self, :https, :data
11
- # policy.object_src :none
12
- # policy.script_src :self, :https
13
- # policy.style_src :self, :https
14
- # # If you are using webpack-dev-server then specify webpack-dev-server host
15
- # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
16
-
17
- # # Specify URI for violation reports
18
- # # policy.report_uri "/csp-violation-report-endpoint"
7
+ # Rails.application.configure do
8
+ # config.content_security_policy do |policy|
9
+ # policy.default_src :self, :https
10
+ # policy.font_src :self, :https, :data
11
+ # policy.img_src :self, :https, :data
12
+ # policy.object_src :none
13
+ # policy.script_src :self, :https
14
+ # policy.style_src :self, :https
15
+ # # Specify URI for violation reports
16
+ # # policy.report_uri "/csp-violation-report-endpoint"
17
+ # end
18
+ #
19
+ # # Generate session nonces for permitted importmap and inline scripts
20
+ # config.content_security_policy_nonce_generator = ->(request) { request.session.id.to_s }
21
+ # config.content_security_policy_nonce_directives = %w(script-src)
22
+ #
23
+ # # Report violations without enforcing the policy.
24
+ # # config.content_security_policy_report_only = true
19
25
  # end
20
-
21
- # If you are using UJS then enable automatic nonce generation
22
- # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
23
-
24
- # Set the nonce only to specific directives
25
- # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
26
-
27
- # Report CSP violations to a specified URI
28
- # For further information see the following documentation:
29
- # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
30
- # Rails.application.config.content_security_policy_report_only = true
@@ -1,6 +1,8 @@
1
1
  # Be sure to restart your server when you modify this file.
2
2
 
3
- # Configure sensitive parameters which will be filtered from the log file.
3
+ # Configure parameters to be filtered from the log file. Use this to limit dissemination of
4
+ # sensitive information. See the ActiveSupport::ParameterFilter documentation for supported
5
+ # notations and behaviors.
4
6
  Rails.application.config.filter_parameters += [
5
- :password, :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
7
+ :passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
6
8
  ]
@@ -4,13 +4,13 @@
4
4
  # are locale specific, and you may define rules for as many different
5
5
  # locales as you wish. All of these examples are active by default:
6
6
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
7
- # inflect.plural /^(ox)$/i, '\1en'
8
- # inflect.singular /^(ox)en/i, '\1'
9
- # inflect.irregular 'person', 'people'
7
+ # inflect.plural /^(ox)$/i, "\\1en"
8
+ # inflect.singular /^(ox)en/i, "\\1"
9
+ # inflect.irregular "person", "people"
10
10
  # inflect.uncountable %w( fish sheep )
11
11
  # end
12
12
 
13
13
  # These inflection rules are supported but not enabled by default:
14
14
  # ActiveSupport::Inflector.inflections(:en) do |inflect|
15
- # inflect.acronym 'RESTful'
15
+ # inflect.acronym "RESTful"
16
16
  # end
@@ -16,6 +16,7 @@
16
16
 
17
17
  require 'iqvoc'
18
18
  require 'iqvoc/version'
19
+ require 'iqvoc_module_helper'
19
20
 
20
21
  ##### INSTANCE SETTINGS #####
21
22
 
@@ -75,7 +75,6 @@ de:
75
75
  of: von
76
76
  ops: Ups!
77
77
  pending: "Lade…"
78
- translation_missing_for: "keine Übersetzung für"
79
78
  type_to_search: "Tippen um zu suchen"
80
79
  hint_csv_input: "Mehrere Werte können kommagetrennt eingeben werden."
81
80
  form_errors: "Fehler"
@@ -211,10 +210,10 @@ de:
211
210
  search_results:
212
211
  header: "Suche"
213
212
  inflectionals: "Schreibweisen"
214
- contains: "enthält"
215
- ends_with: "endet mit"
216
- begins_with: "beginnt mit"
217
- exact: "exakte Übereinstimmung"
213
+ contains: "enthalten Suchbegriff"
214
+ ends_with: "enden mit Suchbegriff"
215
+ begins_with: "starten mit Suchbegriff"
216
+ exact: "stimmen exakt mit Suchbegriff überein"
218
217
  regexp: "regulärer Ausdruck (fortgeschritten)"
219
218
  search_term: "Suchbegriff"
220
219
  note: mit Anmerkung
@@ -227,24 +226,26 @@ de:
227
226
  one: "Ihre Suche nach <strong>%{query}</strong> lieferte %{count} Ergebnis."
228
227
  other: "Ihre Suche nach <strong>%{query}</strong> lieferte %{count} Ergebnisse."
229
228
  no_results_found: "Ihre Suche lieferte keine Ergebnisse."
230
- submit: "Suche"
229
+ submit: "Suchen"
230
+ detailed_search: "Detailsuche"
231
231
  type: "Typ"
232
232
  used_as: "benutzt als"
233
233
  expired: "stillgelegte einbeziehen?"
234
234
  language: "Sprache"
235
235
  all: "alle"
236
236
  none: "keine"
237
- in: "In"
238
- for: "Nach"
239
- mode: "Modus"
237
+ in: "Suche umfasst"
238
+ for: "Suchen in"
239
+ mode: "Suchtreffer"
240
240
  datasets: "Externe Quellen"
241
241
  change_note:
242
+ all: "Erstellungs- oder Änderungsdatum"
242
243
  type: "Typ"
243
244
  created: 'Erstellungsdatum'
244
245
  modified: 'Änderungsdatum'
245
246
  date: "Datumsbereich"
246
- date_from: 'von'
247
- date_to: 'bis'
247
+ date_from: 'Von'
248
+ date_to: 'Bis'
248
249
  user_sessions:
249
250
  header: "Anmelden"
250
251
  login: "Anmelden"
@@ -290,7 +291,6 @@ de:
290
291
  delete_copy: "Kopie löschen"
291
292
  delete_confirm: "Kopie wirklich löschen?"
292
293
  versioning_mode: "Neue Version erstellen"
293
- unlock: "Entsperren"
294
294
  preview_new_version: "Vorschau der Version in Bearbeitung"
295
295
  consistency_check: "Konsistenz prüfen"
296
296
  current_revision: "Aktuelle Revision %{rev}"
@@ -308,7 +308,6 @@ de:
308
308
  dashboard:
309
309
  type: "Typ"
310
310
  value: "Name"
311
- locking_user: "Gesperrt"
312
311
  follow_up: "Wiedervorlage"
313
312
  updated_at: "Geändert am"
314
313
  to_review: "Vorlage zur Freigabe"
@@ -378,11 +377,7 @@ de:
378
377
  published_with_warning: "Instanz wurde erfolgreich veröffentlicht, hat aber keine Relationen zu anderen Instanzen."
379
378
  merged_delete_error: "Das alte Label konnte nicht gelöscht werden."
380
379
  merged_publishing_error: "Instanz konnte nicht veröffentlicht werden - bitte führen Sie eine Konsistenzprüfung durch."
381
- branched: "Instanzkopie wurde erfolgreich angelegt und für andere Benutzer gesperrt."
382
- locked: "Instanz wurde für andere User gesperrt."
383
- lock_error: "Instanz ist bereits gesperrt."
384
- unlocked: "Instanz wurde für andere User entsperrt."
385
- unlock_error: "Instanz ist bereits entsperrt."
380
+ branched: "Instanzkopie wurde erfolgreich angelegt."
386
381
  new_version_blank_error: "Es existiert noch keine neue Version."
387
382
  delete: "Instanz löschen."
388
383
  consistency_check_success: "Instanz ist konsistent."