iqvoc_skosxl 2.9.1 → 2.11.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/Gemfile +8 -10
- data/Gemfile.lock +475 -296
- data/README.md +1 -1
- data/app/assets/javascripts/iqvoc_skosxl/duplicate_check.js +104 -0
- data/app/assets/javascripts/iqvoc_skosxl/manifest.js +4 -0
- data/app/assets/javascripts/iqvoc_skosxl/new_label_modal.js +19 -0
- data/app/assets/javascripts/manifest.js +3 -3
- data/app/assets/stylesheets/manifest.scss +4 -0
- data/app/controllers/labels/versions_controller.rb +30 -50
- data/app/controllers/labels_controller.rb +71 -25
- data/app/controllers/rdf_controller.rb +8 -7
- data/app/controllers/xl_dashboard_controller.rb +43 -0
- data/app/helpers/iqvoc_skosxl_helper.rb +4 -0
- data/app/helpers/labels_helper.rb +8 -6
- data/app/models/application_record.rb +3 -0
- data/app/models/collection/skosxl/extension.rb +8 -0
- data/app/models/concept/skosxl/extension.rb +4 -2
- data/app/models/label/relation/base.rb +2 -2
- data/app/models/label/skosxl/base.rb +166 -29
- data/app/models/label/skosxl/properties/literal_form.rb +1 -1
- data/app/models/labeling/skosxl/alt_label.rb +12 -0
- data/app/models/labeling/skosxl/base.rb +65 -10
- data/app/models/labeling/skosxl/hidden_label.rb +2 -2
- data/app/models/labeling/skosxl/pref_label.rb +4 -0
- data/app/views/concepts/_form.html.erb +115 -0
- data/app/views/labels/_form.html.erb +11 -3
- data/app/views/labels/_language.html.erb +4 -0
- data/app/views/labels/_sidebar.html.erb +13 -7
- data/app/views/labels/duplicate.html.erb +4 -0
- data/app/views/labels/new.html.erb +1 -0
- data/app/views/labels/new_from_concept.html.erb +28 -0
- data/app/views/labels/notifications/_referenced_labels.html.erb +0 -1
- data/app/views/{rdf/show_label.iqrdf → labels/show.iqrdf} +1 -1
- data/app/views/labels/show_published.html.erb +5 -3
- data/app/views/labels/show_unpublished.html.erb +19 -22
- data/app/views/layouts/_label_in_concept_modal.html.erb +2 -0
- data/app/views/layouts/application.html.erb +51 -0
- data/app/views/partials/_modal.html.erb +17 -0
- data/app/views/partials/label/skosxl/_inline_base.html.erb +1 -0
- data/app/views/partials/label/skosxl/_new_link_base.html.erb +1 -1
- data/app/views/partials/labeling/skosxl/_base.html.erb +20 -13
- data/app/views/partials/labeling/skosxl/_edit_base.html.erb +3 -2
- data/config/application.rb +26 -14
- data/config/boot.rb +3 -3
- data/config/cable.yml +10 -0
- data/config/database.yml +21 -15
- data/config/database.yml.postgresql +12 -9
- data/config/environment.rb +1 -1
- data/config/initializers/content_security_policy.rb +25 -0
- data/config/initializers/filter_parameter_logging.rb +6 -2
- data/config/initializers/inflections.rb +4 -4
- data/config/initializers/iqvoc.rb +2 -0
- data/config/initializers/permissions_policy.rb +11 -0
- data/config/initializers/wrap_parameters.rb +2 -2
- data/config/initializers/zeitwerk.rb +7 -0
- data/config/locales/activerecord.de.yml +5 -2
- data/config/locales/activerecord.en.yml +3 -0
- data/config/locales/de.yml +13 -0
- data/config/locales/en.yml +13 -0
- data/config/routes.rb +8 -12
- data/config/storage.yml +34 -0
- data/db/migrate/20110408121540_extend_label.rb +3 -3
- data/db/migrate/20110408123644_add_label_relations.rb +1 -1
- data/db/migrate/20150108154312_add_fk_contraints_iqvoc_skosxl.rb +1 -1
- data/db/migrate/20150414083600_remove_fk_constraints_iqvoc_skosxl.rb +1 -1
- data/db/migrate/20231012174634_remove_locked_by_for_label.rb +5 -0
- data/db/schema.rb +173 -182
- data/iqvoc_skosxl.gemspec +2 -2
- data/lib/iqvoc/skosxl/version.rb +1 -1
- data/lib/iqvoc_skosxl.rb +8 -1
- data/public/assets/fonts/FiraMono-Regular-0b6138c5b386dc9125473fd851926f29.ttf +0 -0
- data/public/assets/fonts/FiraMono-Regular-690950e8d89c92cba41eeeb13f1de93e.woff +0 -0
- data/public/assets/fonts/FiraMono-Regular-98f97ed2dbf9d94d4fa5df048434b88d.eot +0 -0
- data/public/assets/fonts/FiraMono-Regular.eot +0 -0
- data/public/assets/fonts/FiraMono-Regular.ttf +0 -0
- data/public/assets/fonts/FiraMono-Regular.woff +0 -0
- data/public/assets/fonts/FiraSans-Bold-0de5f536bd0dc370449c0c67a49a6fe7.eot +0 -0
- data/public/assets/fonts/FiraSans-Bold-25037ef8d155e38b5df0c242a4c6cf2d.ttf +0 -0
- data/public/assets/fonts/FiraSans-Bold-494219a9639084eb9528ff47f79fcda1.woff +0 -0
- data/public/assets/fonts/FiraSans-Bold.eot +0 -0
- data/public/assets/fonts/FiraSans-Bold.ttf +0 -0
- data/public/assets/fonts/FiraSans-Bold.woff +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic-5b3b812df9e1cb2b1f34baad65a2bdfb.ttf +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic-90b8087c48feff2e828f658c49de5399.eot +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic-b10e46158d50bf9b78968112acf87310.woff +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic.eot +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic.ttf +0 -0
- data/public/assets/fonts/FiraSans-BoldItalic.woff +0 -0
- data/public/assets/fonts/FiraSans-Book-659d252627051e785260ba445da8930f.woff +0 -0
- data/public/assets/fonts/FiraSans-Book-abc65ceb7bfaed729bff7a9d1367b7d4.eot +0 -0
- data/public/assets/fonts/FiraSans-Book-f0410501d5ecc5fe66bcdbc02b482c81.ttf +0 -0
- data/public/assets/fonts/FiraSans-Book.eot +0 -0
- data/public/assets/fonts/FiraSans-Book.ttf +0 -0
- data/public/assets/fonts/FiraSans-Book.woff +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight-140f15ee97cb2099ff01c2b57dcd1a24.woff +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight-28e5c2679df66406ebd117fbdded6753.eot +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight-c15de70ebceffce178cbd2e82aa2c373.ttf +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight.eot +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight.ttf +0 -0
- data/public/assets/fonts/FiraSans-ExtraLight.woff +0 -0
- data/public/assets/fonts/FiraSans-Italic-ac4cb18fe14a7c90f29cdd2ce499ba59.woff +0 -0
- data/public/assets/fonts/FiraSans-Italic-bdea00fee0da5ca9176061e00c26a0da.eot +0 -0
- data/public/assets/fonts/FiraSans-Italic-e7e76a0ee170fd29b5d8100753eff569.ttf +0 -0
- data/public/assets/fonts/FiraSans-Italic.eot +0 -0
- data/public/assets/fonts/FiraSans-Italic.ttf +0 -0
- data/public/assets/fonts/FiraSans-Italic.woff +0 -0
- data/public/assets/fonts/FiraSans-Light-20adaf630b690c3e3184daaeae585f22.woff +0 -0
- data/public/assets/fonts/FiraSans-Light-3689e18b38d335ec0c43823adb6a2984.eot +0 -0
- data/public/assets/fonts/FiraSans-Light-55b04531e7a9ecdf58090d70b94b68e2.ttf +0 -0
- data/public/assets/fonts/FiraSans-Light-SC-098407a72b7ad46f7c2480d7ac11baf2.eot +0 -0
- data/public/assets/fonts/FiraSans-Light-SC-82763fe2ce9e6b897556c6f3c2aceb29.woff2 +0 -0
- data/public/assets/fonts/FiraSans-Light-SC-c73985985f0501c1845a5185b180fe6b.woff +0 -0
- data/public/assets/fonts/FiraSans-Light-SC-c9563f48d9cccd91f07e46801c27130f.ttf +0 -0
- data/public/assets/fonts/FiraSans-Light-SC.eot +0 -0
- data/public/assets/fonts/FiraSans-Light-SC.ttf +0 -0
- data/public/assets/fonts/FiraSans-Light-SC.woff +0 -0
- data/public/assets/fonts/FiraSans-Light-SC.woff2 +0 -0
- data/public/assets/fonts/FiraSans-Light.eot +0 -0
- data/public/assets/fonts/FiraSans-Light.ttf +0 -0
- data/public/assets/fonts/FiraSans-Light.woff +0 -0
- data/public/assets/fonts/FiraSans-Medium-082fab59048189168006bf2e914ba8b7.woff +0 -0
- data/public/assets/fonts/FiraSans-Medium-11706edfe8651c355b413bd24b4b5e10.eot +0 -0
- data/public/assets/fonts/FiraSans-Medium-3a0dacdeaba1b4c054f2d6cb5061965d.ttf +0 -0
- data/public/assets/fonts/FiraSans-Medium.eot +0 -0
- data/public/assets/fonts/FiraSans-Medium.ttf +0 -0
- data/public/assets/fonts/FiraSans-Medium.woff +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic-6c8a2646d72641226527d574a8485b66.woff +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic-b81e92794a6878b6c578d97b3ad5e6d7.ttf +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic-eae7f4a3c4db9fe83025909ebfae5ad9.eot +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic.eot +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic.ttf +0 -0
- data/public/assets/fonts/FiraSans-MediumItalic.woff +0 -0
- data/public/assets/fonts/FiraSans-Regular-537188a19aeebdd74a92e114af7a02cb.ttf +0 -0
- data/public/assets/fonts/FiraSans-Regular-5d6a923de9be80ff5c2995cc03d93127.woff +0 -0
- data/public/assets/fonts/FiraSans-Regular-db689e5fea21ed4b7890811151968dc6.eot +0 -0
- data/public/assets/fonts/FiraSans-Regular.eot +0 -0
- data/public/assets/fonts/FiraSans-Regular.ttf +0 -0
- data/public/assets/fonts/FiraSans-Regular.woff +0 -0
- data/public/assets/fonts/FiraSans-UltraLight-3baefce4c224a0f0b26cdafe37dfa55d.eot +0 -0
- data/public/assets/fonts/FiraSans-UltraLight-e3909a352b87f853bb464836adfd602a.ttf +0 -0
- data/public/assets/fonts/FiraSans-UltraLight-f7289beeaa2353caf487553ee8b8ef03.woff +0 -0
- data/public/assets/fonts/FiraSans-UltraLight.eot +0 -0
- data/public/assets/fonts/FiraSans-UltraLight.ttf +0 -0
- data/public/assets/fonts/FiraSans-UltraLight.woff +0 -0
- data/public/assets/fonts/FontAwesome.otf +0 -0
- data/public/assets/fonts/fontawesome-webfont.eot +0 -0
- data/public/assets/fonts/fontawesome-webfont.svg +2671 -0
- data/public/assets/fonts/fontawesome-webfont.ttf +0 -0
- data/public/assets/fonts/fontawesome-webfont.woff +0 -0
- data/public/assets/fonts/fontawesome-webfont.woff2 +0 -0
- data/public/assets/images/ajax-loader-30d8e72bfdae694b1938658e1b087df0.gif +0 -0
- data/public/assets/images/ajax-loader.gif +0 -0
- data/public/assets/images/iqvoc_logo-165f17a46cf0a1bf9464db9d136fb843.svg +41 -0
- data/public/assets/images/iqvoc_logo.svg +41 -0
- data/public/assets/images/treeview-default-line-5e3c0e0c48f48c23c45aef7b72c739c0.gif +0 -0
- data/public/assets/images/treeview-default-line.gif +0 -0
- data/public/assets/javascripts/bootstrap.bundle.min-3e959f3b878396c38e4ca7787278131b.js +6 -0
- data/public/assets/javascripts/bootstrap.bundle.min-68b3c2f1c1f636f947fff1229d3ffbf5.js +7 -0
- data/public/assets/javascripts/bootstrap.bundle.min.js +31 -0
- data/public/assets/javascripts/jquery-d52dc3a9171f1fc89dd0f8e35e42c9d2.js +26 -0
- data/public/assets/javascripts/jquery.js +10701 -0
- data/public/assets/javascripts/manifest-d95423d4873e576e7ae0b6a57cf18ec5.js +5486 -0
- data/public/assets/javascripts/manifest.js +6981 -0
- data/public/assets/manifest.json +1 -0
- data/public/assets/stylesheets/manifest-bbb2857850990f13f777f3dec120a018.css +13 -0
- data/public/assets/stylesheets/manifest-c82b7dfb6cbb9f6284de38abacbf7d49.css +13 -0
- data/public/assets/stylesheets/manifest.css +13620 -0
- data/public/favicon.ico +0 -0
- data/test/controllers/rdf_rendering_test.rb +19 -0
- data/test/controllers/routing_test.rb +5 -1
- data/test/integration/concept_label_language_test.rb +1 -3
- data/test/integration/dashboard_test.rb +1 -1
- data/test/integration/duplicate_label_test.rb +52 -0
- data/test/integration/edit_labels_test.rb +2 -2
- data/test/integration/label_creation_test.rb +8 -0
- data/test/integration/label_relation_test.rb +2 -2
- data/test/integration/labels_order_test.rb +6 -6
- data/test/integration/search_test.rb +117 -0
- data/test/integration_test_helper.rb +2 -2
- data/test/models/concept_test.rb +12 -0
- data/test/models/skos_importer_test.rb +1 -1
- data/test/models/zeitwerk_compliance_test.rb +7 -0
- metadata +139 -26
- data/app/assets/stylesheets/manifest.css.scss +0 -4
- data/app/views/labels/_value_and_language.html.erb +0 -9
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/cookies_serializer.rb +0 -3
- data/config/initializers/mime_types.rb +0 -4
- data/public/export/iqvoc_dump-2017-06-07_13-08.ttl +0 -70
@@ -2,13 +2,15 @@
|
|
2
2
|
<%= render 'sidebar', :label => @label %>
|
3
3
|
|
4
4
|
<% if can?(:read, @new_label_version) || can?(:branch, @label) %>
|
5
|
-
<div class="editing_versioning_toolbar
|
5
|
+
<div class="editing_versioning_toolbar">
|
6
6
|
<% if @new_label_version.blank? && can?(:branch, @label) %>
|
7
7
|
<%= button_to t("txt.views.versioning.versioning_mode"),
|
8
|
-
label_versions_branch_path(:origin => @label.origin), :class => 'btn btn-
|
8
|
+
label_versions_branch_path(:origin => @label.origin), :class => 'btn btn-outline-secondary' %>
|
9
|
+
<%= link_to t("txt.views.versioning.duplicate"),
|
10
|
+
label_duplicate_path(origin: @label.origin), :class => 'btn btn-outline-secondary' %>
|
9
11
|
<% elsif can?(:read, @new_label_version) %>
|
10
12
|
<%= link_to t("txt.views.versioning.preview_new_version"),
|
11
|
-
label_path(:published => 0, :id => @new_label_version), :class => 'btn btn-
|
13
|
+
label_path(:published => 0, :id => @new_label_version), :class => 'btn btn-outline-secondary' %>
|
12
14
|
<% end %>
|
13
15
|
</div>
|
14
16
|
<% end %>
|
@@ -3,41 +3,38 @@
|
|
3
3
|
|
4
4
|
<%= alert :info, :header => t('txt.common.unpublished_version') + "." do %>
|
5
5
|
<%= t("txt.views.versioning.current_revision", :rev => @label.rev) %>
|
6
|
-
<% if @label.locked? %>
|
7
|
-
<%= t("txt.views.versioning.in_ongoing_editing_by", :user => @label.locking_user.name) %>
|
8
|
-
<% end %>
|
9
6
|
<% end %>
|
10
7
|
|
11
|
-
<div class="editing_versioning_toolbar
|
12
|
-
<% if (
|
8
|
+
<div class="editing_versioning_toolbar">
|
9
|
+
<% if can?(:merge, @label) %>
|
13
10
|
<%= button_to t("txt.views.versioning.publishing"),
|
14
|
-
|
11
|
+
label_versions_merge_path(:origin => @label.origin), :class => 'btn btn-primary' %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<% if can?(:check_consistency, @label) %>
|
15
|
+
<%= button_to t("txt.views.versioning.consistency_check"),
|
16
|
+
label_versions_consistency_check_path(:origin => @label.origin),
|
17
|
+
:method => :get, :class => 'btn btn-outline-secondary' %>
|
15
18
|
<% end %>
|
16
|
-
<%= button_to t("txt.views.versioning.consistency_check"),
|
17
|
-
label_versions_consistency_check_path(:origin => @label.origin),
|
18
|
-
:method => :get, :class => 'btn btn-default' %>
|
19
19
|
|
20
|
-
<% if (
|
20
|
+
<% if can?(:send_to_review, @label) %>
|
21
21
|
<%= button_to t("txt.common.to_review"),
|
22
22
|
label_versions_to_review_path(:origin => @label.origin),
|
23
|
-
:class => 'btn btn-
|
23
|
+
:class => 'btn btn-outline-secondary' %>
|
24
24
|
<% end %>
|
25
25
|
|
26
|
-
<%
|
27
|
-
<%=
|
28
|
-
|
29
|
-
|
26
|
+
<% if can?(:update, @label) %>
|
27
|
+
<%= link_to t("txt.views.versioning.edit_mode"),
|
28
|
+
edit_label_path(:published => 0, :id => @label.origin),
|
29
|
+
:class => 'btn btn-outline-secondary' %>
|
30
|
+
<% end %>
|
31
|
+
|
32
|
+
<% if can?(:destroy, @label) %>
|
33
|
+
<%= button_to delete_button_text(@label),
|
30
34
|
label_path(:published => 0, :id => @label.origin),
|
31
35
|
:method => :delete,
|
32
36
|
:confirm => I18n.t("txt.views.versioning.delete_confirm"),
|
33
37
|
:class => 'btn btn-danger' %>
|
34
|
-
<% else %>
|
35
|
-
<%= button_to t("txt.views.versioning.unlock"),
|
36
|
-
label_versions_unlock_path(:origin => @label.origin),
|
37
|
-
:class => 'btn btn-default' if can?(:unlock, @label) %>
|
38
|
-
<%= link_to t("txt.views.versioning.edit_mode"),
|
39
|
-
edit_label_path(:published => 0, :id => @label.origin),
|
40
|
-
:class => 'btn btn-default' if can?(:update, @label) %>
|
41
38
|
<% end %>
|
42
39
|
</div>
|
43
40
|
|
@@ -0,0 +1,51 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="<%= I18n.locale %>">
|
3
|
+
<head>
|
4
|
+
<title><%= page_title %></title>
|
5
|
+
<%= csrf_meta_tag %>
|
6
|
+
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
8
|
+
<meta charset="utf-8">
|
9
|
+
|
10
|
+
<%= stylesheet_link_tag "manifest" %>
|
11
|
+
<%= yield :head %>
|
12
|
+
</head>
|
13
|
+
|
14
|
+
<% if @datasets %> <%# XXX: special-casing matches federation %>
|
15
|
+
<body data-datasets="<%= @datasets %>" data-remote-label-path="<%= remote_label_path(lang: nil, format: :json) %>">
|
16
|
+
<% else %>
|
17
|
+
<body>
|
18
|
+
<% end %>
|
19
|
+
|
20
|
+
<%= render 'layouts/modals' %>
|
21
|
+
<%= render 'layouts/label_in_concept_modal' %>
|
22
|
+
<%= render 'layouts/navigation' %>
|
23
|
+
|
24
|
+
<main class="container">
|
25
|
+
<div class="row">
|
26
|
+
<div class="<%= content_for?(:sidebar) ? "col-md-9" : "col-md-12" %>" id="content">
|
27
|
+
<%= yield :page_header %>
|
28
|
+
<% flash.each do |type, messages| %>
|
29
|
+
<% Array.wrap(messages).each do |msg| %>
|
30
|
+
<%= alert(type) { msg } %>
|
31
|
+
<% end %>
|
32
|
+
<% end %>
|
33
|
+
<%= yield %>
|
34
|
+
</div>
|
35
|
+
<% if content_for?(:sidebar) %>
|
36
|
+
<div class="col-md-3">
|
37
|
+
<div id="sidebar">
|
38
|
+
<%= yield :sidebar %>
|
39
|
+
</div>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
</div>
|
43
|
+
</main>
|
44
|
+
|
45
|
+
<%= javascript_include_tag "jquery.js" %>
|
46
|
+
<%= javascript_include_tag "bootstrap.bundle.min.js" %>
|
47
|
+
<%= javascript_include_tag "manifest.js" %>
|
48
|
+
<%= yield :scripts %>
|
49
|
+
|
50
|
+
</body>
|
51
|
+
</html>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<div class="modal fade" tabindex="-1" role="dialog">
|
2
|
+
<div class="modal-dialog" role="document">
|
3
|
+
<div class="modal-content">
|
4
|
+
<div class="modal-header">
|
5
|
+
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
6
|
+
<h4 class="modal-title">Modal title</h4>
|
7
|
+
</div>
|
8
|
+
<div class="modal-body">
|
9
|
+
<p>One fine body…</p>
|
10
|
+
</div>
|
11
|
+
<div class="modal-footer">
|
12
|
+
<button type="button" class="btn btn-outline-secondary" data-dismiss="modal">Close</button>
|
13
|
+
<button type="button" class="btn btn-primary">Save changes</button>
|
14
|
+
</div>
|
15
|
+
</div><!-- /.modal-content -->
|
16
|
+
</div><!-- /.modal-dialog -->
|
17
|
+
</div><!-- /.modal -->
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= link_to(label.value, label_path(:id => label, :published => ((!label.published? && !label.published_version_id) ? 0 : nil)), :class => label.published? ? '' : 'unpublished') %>
|
@@ -1 +1 @@
|
|
1
|
-
<%= sidebar_item :icon => 'edit', :text => t('txt.views.labels.new'), :path => new_label_path(published: 0) %>
|
1
|
+
<%= sidebar_item :icon => 'edit', :text => t('txt.views.labels.new'), :path => new_label_path(published: 0), :perms => [:create, Iqvoc::XLLabel.base_class] %>
|
@@ -1,15 +1,22 @@
|
|
1
|
-
<%= content_tag :div, :class => "relation translation panel"
|
1
|
+
<%= content_tag :div, :class => "relation translation panel" do %>
|
2
2
|
<% if defined?(concept) %>
|
3
|
-
<h2><%= klass.model_name.human(:count => 2)
|
3
|
+
<h2><%= klass.model_name.human(:count => 2) %></h2>
|
4
4
|
<div class="relation-body">
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
5
|
+
<% available_languages.each do |lang| %>
|
6
|
+
<div class="translation" lang="<%= lang %>">
|
7
|
+
<span class="language_flap"><%= lang %></span>
|
8
|
+
<div class="note_content">
|
9
|
+
<%-
|
10
|
+
items = concept.labels_for_labeling_class_and_language(klass, lang.to_s, false)
|
11
|
+
items = items.select { |item| can?(:read, item) }
|
12
|
+
-%>
|
13
|
+
<%= item_listing(items) do |label|
|
14
|
+
render(label.class.inline_partial_name, label: label)
|
15
|
+
end %>
|
16
|
+
</div>
|
17
|
+
</div>
|
18
|
+
<% end %>
|
19
|
+
|
13
20
|
</div>
|
14
21
|
<% elsif defined?(label) %>
|
15
22
|
<h2><%= klass.model_name.human %> <%= t("txt.common.of") %></h2>
|
@@ -18,10 +25,10 @@
|
|
18
25
|
items = label.concepts_for_labeling_class(klass)
|
19
26
|
items = items.select { |item| can?(:read, item) }
|
20
27
|
-%>
|
21
|
-
<%= item_listing(items) do |
|
22
|
-
|
28
|
+
<%= item_listing(items) do |concept|
|
29
|
+
render(concept.class.inline_partial_name, concept: concept)
|
23
30
|
end
|
24
31
|
%>
|
25
32
|
</div>
|
26
33
|
<% end %>
|
27
|
-
<% end %>
|
34
|
+
<% end %>
|
@@ -14,7 +14,8 @@
|
|
14
14
|
:"data-entities" => Iqvoc::XLLabel.base_class.editor_selectable.
|
15
15
|
by_language(language).by_origin(concept.labelings_by_id(
|
16
16
|
klass.name.to_relation_name, language).
|
17
|
-
split(InlineDataHelper::SPLITTER)).
|
18
|
-
map { |l| label_widget_data(l) }.to_json %>
|
17
|
+
split(InlineDataHelper::SPLITTER)).sort_by(&:value)
|
18
|
+
.map { |l| label_widget_data(l) }.to_json %>
|
19
|
+
|
19
20
|
<% end %>
|
20
21
|
<% end %>
|
data/config/application.rb
CHANGED
@@ -1,6 +1,18 @@
|
|
1
|
-
|
1
|
+
require_relative "boot"
|
2
2
|
|
3
|
-
|
3
|
+
# Pick the frameworks you want:
|
4
|
+
require "active_model/railtie"
|
5
|
+
require "active_job/railtie"
|
6
|
+
require "active_record/railtie"
|
7
|
+
require "active_storage/engine"
|
8
|
+
require "action_controller/railtie"
|
9
|
+
require "action_mailer/railtie"
|
10
|
+
require "action_mailbox/engine"
|
11
|
+
require "action_text/engine"
|
12
|
+
require "action_view/railtie"
|
13
|
+
require "action_cable/engine"
|
14
|
+
# require "sprockets/railtie"
|
15
|
+
require "rails/test_unit/railtie"
|
4
16
|
|
5
17
|
# Require the gems listed in Gemfile, including any gems
|
6
18
|
# you've limited to :test, :development, or :production.
|
@@ -8,19 +20,19 @@ Bundler.require(*Rails.groups)
|
|
8
20
|
|
9
21
|
module Iqvoc::SKOSXL
|
10
22
|
class Application < Rails::Application
|
11
|
-
#
|
12
|
-
|
13
|
-
|
14
|
-
# Settings in config/environments/* take precedence over those specified here.
|
15
|
-
# Application configuration should go into files in config/initializers
|
16
|
-
# -- all .rb files in that directory are automatically loaded.
|
23
|
+
# Initialize configuration defaults for originally generated Rails version.
|
24
|
+
config.load_defaults 7.0
|
17
25
|
|
18
|
-
#
|
19
|
-
#
|
20
|
-
#
|
26
|
+
# Configuration for the application, engines, and railties goes here.
|
27
|
+
#
|
28
|
+
# These settings can be overridden in specific environments using the files
|
29
|
+
# in config/environments, which are processed later.
|
30
|
+
#
|
31
|
+
# config.time_zone = "Central Time (US & Canada)"
|
32
|
+
# config.eager_load_paths << Rails.root.join("extras")
|
33
|
+
#
|
21
34
|
|
22
|
-
#
|
23
|
-
|
24
|
-
# config.i18n.default_locale = :de
|
35
|
+
# This has to be here because iqvoc_skosxl.rb needs to know if it runs as app or as engine
|
36
|
+
require 'iqvoc_skosxl'
|
25
37
|
end
|
26
38
|
end
|
data/config/boot.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
|
2
|
-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
|
1
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
3
2
|
|
4
|
-
require
|
3
|
+
require "bundler/setup" # Set up gems listed in the Gemfile.
|
4
|
+
require "bootsnap/setup" # Speed up boot time by caching expensive operations.
|
data/config/cable.yml
ADDED
data/config/database.yml
CHANGED
@@ -1,20 +1,26 @@
|
|
1
1
|
development:
|
2
|
-
adapter:
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
2
|
+
adapter: postgresql
|
3
|
+
host: localhost
|
4
|
+
encoding: unicode
|
5
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_development' %>
|
6
|
+
pool: 5
|
7
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
8
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
7
9
|
|
8
10
|
test:
|
9
|
-
adapter:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
adapter: postgresql
|
12
|
+
host: localhost
|
13
|
+
encoding: unicode
|
14
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_test' %>
|
15
|
+
pool: 5
|
16
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
17
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
14
18
|
|
15
19
|
production:
|
16
|
-
adapter:
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
20
|
+
adapter: postgresql
|
21
|
+
host: localhost
|
22
|
+
encoding: unicode
|
23
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_production' %>
|
24
|
+
pool: 5
|
25
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
26
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
@@ -1,23 +1,26 @@
|
|
1
1
|
development:
|
2
2
|
adapter: postgresql
|
3
|
+
host: localhost
|
3
4
|
encoding: unicode
|
4
|
-
database: iqvoc_skosxl_development
|
5
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_development' %>
|
5
6
|
pool: 5
|
6
|
-
username: postgres
|
7
|
-
password:
|
7
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
8
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
8
9
|
|
9
10
|
test:
|
10
11
|
adapter: postgresql
|
12
|
+
host: localhost
|
11
13
|
encoding: unicode
|
12
|
-
database: iqvoc_skosxl_test
|
14
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_test' %>
|
13
15
|
pool: 5
|
14
|
-
username: postgres
|
15
|
-
password:
|
16
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
17
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
16
18
|
|
17
19
|
production:
|
18
20
|
adapter: postgresql
|
21
|
+
host: localhost
|
19
22
|
encoding: unicode
|
20
|
-
database: iqvoc_skosxl_production
|
23
|
+
database: <%= ENV["POSTGRES_DB"] || 'iqvoc_skosxl_production' %>
|
21
24
|
pool: 5
|
22
|
-
username: postgres
|
23
|
-
password:
|
25
|
+
username: <%= ENV["POSTGRES_USER"] || 'postgres' %>
|
26
|
+
password: <%= ENV["POSTGRES_PASSWORD"] || 'postgres' %>
|
data/config/environment.rb
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
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
|
+
|
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
|
25
|
+
# end
|
@@ -1,4 +1,8 @@
|
|
1
1
|
# Be sure to restart your server when you modify this file.
|
2
2
|
|
3
|
-
# Configure
|
4
|
-
|
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.
|
6
|
+
Rails.application.config.filter_parameters += [
|
7
|
+
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
|
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,
|
8
|
-
# inflect.singular /^(ox)en/i,
|
9
|
-
# inflect.irregular
|
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
|
15
|
+
# inflect.acronym "RESTful"
|
16
16
|
# end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# Define an application-wide HTTP permissions policy. For further
|
2
|
+
# information see https://developers.google.com/web/updates/2018/06/feature-policy
|
3
|
+
#
|
4
|
+
# Rails.application.config.permissions_policy do |f|
|
5
|
+
# f.camera :none
|
6
|
+
# f.gyroscope :none
|
7
|
+
# f.microphone :none
|
8
|
+
# f.usb :none
|
9
|
+
# f.fullscreen :self
|
10
|
+
# f.payment :self, "https://secure.example.com"
|
11
|
+
# end
|
@@ -5,10 +5,10 @@
|
|
5
5
|
|
6
6
|
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
7
|
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
8
|
+
wrap_parameters format: [:json]
|
9
9
|
end
|
10
10
|
|
11
11
|
# To enable root element in JSON for ActiveRecord objects.
|
12
12
|
# ActiveSupport.on_load(:active_record) do
|
13
|
-
#
|
13
|
+
# self.include_root_in_json = true
|
14
14
|
# end
|
@@ -5,8 +5,8 @@ de:
|
|
5
5
|
one: XL-Label
|
6
6
|
other: XL-Labels
|
7
7
|
label/relation/skosxl/base:
|
8
|
-
one:
|
9
|
-
other:
|
8
|
+
one: Beziehung
|
9
|
+
other: Beziehungen
|
10
10
|
labeling/skosxl/base:
|
11
11
|
one: Label
|
12
12
|
other: Labels
|
@@ -16,6 +16,9 @@ de:
|
|
16
16
|
labeling/skosxl/alt_label:
|
17
17
|
one: Alternatives Label
|
18
18
|
other: Alternative Labels
|
19
|
+
labeling/skosxl/hidden_label:
|
20
|
+
one: "Verstecktes Label"
|
21
|
+
other: "Versteckte Labels"
|
19
22
|
|
20
23
|
attributes:
|
21
24
|
label/skosxl/base:
|
data/config/locales/de.yml
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
de:
|
2
2
|
txt:
|
3
|
+
controllers:
|
4
|
+
label:
|
5
|
+
duplicate_error: Zum Duplizieren darf es keine unveröffentlichte Revision geben.
|
3
6
|
views:
|
7
|
+
versioning:
|
8
|
+
duplicate: Duplizieren
|
4
9
|
layouts:
|
5
10
|
sections:
|
6
11
|
concepts: Konzepte
|
7
12
|
instance_configuration:
|
8
13
|
settings:
|
9
14
|
languages_further_labelings_Labeling::SKOSXL::AltLabel: Sprachen für alternative Labels
|
15
|
+
languages_further_labelings_Labeling::SKOSXL::HiddenLabel: Sprache für versteckte Labels
|
16
|
+
label_duplicate_check_mode: Label-Duplikatsprüfung Modus
|
10
17
|
models:
|
11
18
|
label:
|
19
|
+
copy: Kopie
|
12
20
|
uri: Label-URI
|
13
21
|
origin_invalid: enthält ungültige Zeichen.
|
14
22
|
pref_label_language: "Es muss ein bevorzugtes Label in der Hauptsprache des Thesaurus vorliegen."
|
15
23
|
referenced_concepts_invalid: Referenzierte Konzepte werden durch diese Änderung invalide. Bitte Labelzuordnung am Konzept aufheben.
|
24
|
+
concept:
|
25
|
+
no_pref_label_error: "Es muss mindestens ein veröffentlichtes, bevorzugtes Label angegeben werden."
|
26
|
+
common:
|
27
|
+
referenced_labels: "Einige referenzierte Labels befinden sich momentan in Bearbeitung."
|
28
|
+
duplicate_labels: "Es existieren bereits Label mit einer ähnlichen Vorlageform: "
|
data/config/locales/en.yml
CHANGED
@@ -1,15 +1,28 @@
|
|
1
1
|
en:
|
2
2
|
txt:
|
3
|
+
controllers:
|
4
|
+
label:
|
5
|
+
duplicate_error: There must not be any unpublished version for duplication.
|
3
6
|
views:
|
7
|
+
versioning:
|
8
|
+
duplicate: Duplicate
|
4
9
|
layouts:
|
5
10
|
sections:
|
6
11
|
concepts: Concepts
|
7
12
|
instance_configuration:
|
8
13
|
settings:
|
9
14
|
languages_further_labelings_Labeling::SKOSXL::AltLabel: Languages for alternative labels
|
15
|
+
languages_further_labelings_Labeling::SKOSXL::HiddenLabel: Languages for hidden labels
|
16
|
+
label_duplicate_check_mode: Label duplicate check mode
|
10
17
|
models:
|
11
18
|
label:
|
19
|
+
copy: Copy
|
12
20
|
uri: Label URI
|
13
21
|
origin_invalid: Origin contains invalid characters.
|
14
22
|
pref_label_language: There must be a prefered label in thesaurus main language.
|
15
23
|
referenced_concepts_invalid: Some referenced concepts become invalid. Please remove label from referenced concepts first.
|
24
|
+
concept:
|
25
|
+
no_pref_label_error: "At least one published preferred label must be specified."
|
26
|
+
common:
|
27
|
+
referenced_labels: "Some referenced labels are currently being edited."
|
28
|
+
duplicate_labels: "There are labels with a similar value: "
|
data/config/routes.rb
CHANGED
@@ -2,17 +2,13 @@ Rails.application.routes.draw do
|
|
2
2
|
scope ':lang', constraints: Iqvoc.routing_constraint do
|
3
3
|
resources :labels
|
4
4
|
|
5
|
-
post 'labels/versions/:origin/branch' => 'labels/versions#branch',
|
6
|
-
|
7
|
-
post 'labels/versions/:origin/
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
post 'labels/versions/:origin/to_review' => 'labels/versions#to_review',
|
14
|
-
:as => 'label_versions_to_review'
|
15
|
-
get 'labels/versions/:origin/consistency_check' => 'labels/versions#consistency_check',
|
16
|
-
:as => 'label_versions_consistency_check'
|
5
|
+
post 'labels/versions/:origin/branch' => 'labels/versions#branch', :as => 'label_versions_branch'
|
6
|
+
post 'labels/versions/:origin/merge' => 'labels/versions#merge', :as => 'label_versions_merge'
|
7
|
+
post 'labels/versions/:origin/to_review' => 'labels/versions#to_review', :as => 'label_versions_to_review'
|
8
|
+
get 'labels/versions/:origin/consistency_check' => 'labels/versions#consistency_check', :as => 'label_versions_consistency_check'
|
9
|
+
get 'labels/:origin/duplicate' => 'labels#duplicate', :as => 'label_duplicate'
|
10
|
+
get 'label_dashboard' => 'xl_dashboard#label_index', as: 'label_dashboard'
|
11
|
+
get 'concept_new_label' => 'labels#new_from_concept', as: 'concept_new_label'
|
12
|
+
post 'concept_create_label' => 'labels#create_from_concept', as: 'concept_create_label'
|
17
13
|
end
|
18
14
|
end
|