iqvoc_skosxl 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/stylesheets/iqvoc_skosxl/entity_select.css +3 -0
- data/app/assets/stylesheets/iqvoc_skosxl/manifest.css +3 -0
- data/app/helpers/iqvoc_skosxl_helper.rb +7 -0
- data/app/models/label/skosxl/base.rb +3 -12
- data/app/views/partials/labeling/skosxl/_edit_base.html.erb +19 -15
- data/app/views/partials/labeling/skosxl/_search_result.html.erb +5 -5
- data/config/locales/en.yml +1 -1
- data/lib/iqvoc/skosxl/version.rb +1 -1
- metadata +7 -6
@@ -130,15 +130,6 @@ class Label::SKOSXL::Base < Label::Base
|
|
130
130
|
"partials/label/skosxl/edit_link_base"
|
131
131
|
end
|
132
132
|
|
133
|
-
def self.from_rdf(str)
|
134
|
-
h = Iqvoc::RdfHelper.split_literal(str)
|
135
|
-
self.new(:value => h[:value], :language => h[:language])
|
136
|
-
end
|
137
|
-
|
138
|
-
def self.from_rdf!(str)
|
139
|
-
self.from_rdf(str).save!
|
140
|
-
end
|
141
|
-
|
142
133
|
def build_rdf_subject(document, controller, &block)
|
143
134
|
ns = IqRdf::Namespace.find_namespace_class(self.rdf_namespace.to_sym)
|
144
135
|
raise "Namespace '#{rdf_namespace}' is not defined in IqRdf document." unless ns
|
@@ -161,9 +152,9 @@ class Label::SKOSXL::Base < Label::Base
|
|
161
152
|
end
|
162
153
|
|
163
154
|
def from_rdf(str)
|
164
|
-
|
165
|
-
self.value
|
166
|
-
self.language =
|
155
|
+
raise "invalid rdf literal" unless str =~ /^"(.+)"(@(.+))$/
|
156
|
+
self.value = $1
|
157
|
+
self.language = $3
|
167
158
|
self
|
168
159
|
end
|
169
160
|
|
@@ -1,15 +1,19 @@
|
|
1
|
-
<%= content_tag
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
1
|
+
<%= content_tag :div, :class => "translation", :lang => language || nil do %>
|
2
|
+
<%- fieldname = "concept[labelings_by_id][#{klass.name.to_relation_name}][#{language}]" -%>
|
3
|
+
<%- label = klass.model_name.human(:count => 2) -%>
|
4
|
+
|
5
|
+
<%= f.label label %>
|
6
|
+
<%= f.input fieldname, :wrapper => :prepend, :label => false do %>
|
7
|
+
<span class="add-on"><%= language %></span><%= text_field_tag "concept[labelings_by_id][#{klass.name.to_relation_name}][#{language}]",
|
8
|
+
concept.labelings_by_id(klass.name.to_relation_name, language),
|
9
|
+
:id => "#{klass.name.to_relation_name}_#{language}",
|
10
|
+
:class => "entity_select",
|
11
|
+
:"data-query-url" => labels_path(:format => :json, :language => language),
|
12
|
+
:"data-entity-uri" => label_path("{id}"),
|
13
|
+
:"data-entities" => Iqvoc::XLLabel.base_class.editor_selectable.
|
14
|
+
by_language(language).by_origin(concept.labelings_by_id(
|
15
|
+
klass.name.to_relation_name, language).
|
16
|
+
split(Iqvoc::InlineDataHelper::Splitter)).
|
17
|
+
map { |l| label_widget_data(l) }.to_json %>
|
18
|
+
<% end %>
|
19
|
+
<% end %>
|
@@ -1,9 +1,9 @@
|
|
1
|
-
|
1
|
+
<% if concept = result.owner %>
|
2
2
|
<dt>
|
3
|
-
<%= link_to highlight_query(result.target.value, params[:query]), concept_path(:id => concept) %>
|
3
|
+
<%= link_to search_result_label(highlight_query(result.target.value, params[:query]), concept), concept_path(:id => concept) %>
|
4
4
|
</dt>
|
5
5
|
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
6
|
-
|
6
|
+
<% if result.target.language %>
|
7
7
|
<dd><%= t('txt.views.search_results.language') %>: <%= result.target.language %></dd>
|
8
|
-
|
9
|
-
|
8
|
+
<% end %>
|
9
|
+
<% end %>
|
data/config/locales/en.yml
CHANGED
data/lib/iqvoc/skosxl/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iqvoc_skosxl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -11,11 +11,11 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2012-
|
14
|
+
date: 2012-11-02 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: iqvoc
|
18
|
-
requirement: &
|
18
|
+
requirement: &70188584862520 !ruby/object:Gem::Requirement
|
19
19
|
none: false
|
20
20
|
requirements:
|
21
21
|
- - ~>
|
@@ -23,10 +23,10 @@ dependencies:
|
|
23
23
|
version: 4.0.0
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
|
-
version_requirements: *
|
26
|
+
version_requirements: *70188584862520
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
|
-
requirement: &
|
29
|
+
requirement: &70188584878460 !ruby/object:Gem::Requirement
|
30
30
|
none: false
|
31
31
|
requirements:
|
32
32
|
- - ! '>='
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
version: '0'
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
|
-
version_requirements: *
|
37
|
+
version_requirements: *70188584878460
|
38
38
|
description: ''
|
39
39
|
email:
|
40
40
|
- till.schulte-coerne@innoq.com
|
@@ -49,6 +49,7 @@ files:
|
|
49
49
|
- iqvoc_skosxl.gemspec
|
50
50
|
- app/assets/javascripts/iqvoc_skosxl/manifest.js
|
51
51
|
- app/assets/javascripts/manifest.js
|
52
|
+
- app/assets/stylesheets/iqvoc_skosxl/entity_select.css
|
52
53
|
- app/assets/stylesheets/iqvoc_skosxl/manifest.css
|
53
54
|
- app/assets/stylesheets/manifest.css
|
54
55
|
- app/controllers/labels/versions_controller.rb
|