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
@@ -0,0 +1,52 @@
|
|
1
|
+
class SearchResultRemote
|
2
|
+
class MetaInformation
|
3
|
+
attr_reader :key, :value
|
4
|
+
|
5
|
+
def initialize(key, value)
|
6
|
+
@key = key
|
7
|
+
@value = value
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
attr_reader :label, :host, :path, :meta
|
12
|
+
attr_accessor :body, :rdf_namespace, :rdf_predicate, :language
|
13
|
+
|
14
|
+
def initialize(host, path, label)
|
15
|
+
@host = host
|
16
|
+
@path = path
|
17
|
+
@label = label.to_s.squish
|
18
|
+
@meta = []
|
19
|
+
end
|
20
|
+
|
21
|
+
def add_meta_information(key, value)
|
22
|
+
@meta << MetaInformation.new(key, value)
|
23
|
+
end
|
24
|
+
|
25
|
+
def url
|
26
|
+
host + path
|
27
|
+
end
|
28
|
+
|
29
|
+
def search_result_partial_name
|
30
|
+
'search_results/search_result_remote'
|
31
|
+
end
|
32
|
+
|
33
|
+
def rdf_predicate_uri
|
34
|
+
rdf_namespace.try(:+, rdf_predicate)
|
35
|
+
end
|
36
|
+
|
37
|
+
def build_rdf(document, subject)
|
38
|
+
predicate = URI.parse(rdf_predicate_uri)
|
39
|
+
value = body || label
|
40
|
+
|
41
|
+
subject.build_full_uri_predicate(predicate, value, :lang => language)
|
42
|
+
end
|
43
|
+
|
44
|
+
def build_search_result_rdf(document, result)
|
45
|
+
result.Sdc::link(url)
|
46
|
+
build_rdf(document, result)
|
47
|
+
end
|
48
|
+
|
49
|
+
def to_s
|
50
|
+
@label
|
51
|
+
end
|
52
|
+
end
|
@@ -4,8 +4,8 @@
|
|
4
4
|
:perms => [:create, Iqvoc::Collection.base_class], :active => params[:action] == 'new' %>
|
5
5
|
<% if defined?(collection) %>
|
6
6
|
<%= sidebar_header t('txt.common.representations') %>
|
7
|
-
<%= sidebar_item :icon => '
|
8
|
-
<%= sidebar_item :icon => '
|
9
|
-
<%= sidebar_item :icon => '
|
7
|
+
<%= sidebar_item :icon => 'link', :text => 'HTML', :path => collection_url(collection.origin, :format => :html) %>
|
8
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_url(collection.origin, :format => :rdf, :lang => nil), :id => 'rdf_link_xml' %>
|
9
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_url(collection.origin, :format => :ttl, :lang => nil), :id => 'rdf_link_ttl' %>
|
10
10
|
<% end %>
|
11
11
|
<% end %>
|
@@ -58,7 +58,7 @@
|
|
58
58
|
<!-- / Concept relations -->
|
59
59
|
|
60
60
|
<!-- Matches -->
|
61
|
-
<fieldset>
|
61
|
+
<fieldset class="matches" data-datasets="<%= @datasets %>" data-remote-proxy-url="<%= alphabetical_concepts_path %>" data-translation-other="<%= t('txt.common.other') %>">
|
62
62
|
<legend><%= Match::Base.model_name.human(:count => 2) %></legend>
|
63
63
|
<% Iqvoc::Concept.match_classes.each do |match_class| %>
|
64
64
|
<%= render match_class.edit_partial_name(concept), :owner_klass => concept, :assoc_klass => match_class, :f => f %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<li class="concept-item">
|
2
|
+
<p>
|
3
|
+
<%= link_to result.label.to_s, result.path,
|
4
|
+
:alt => result.concept.origin, :data => { 'resource-path' => result.path }, :class => 'concept-item-link' %>
|
5
|
+
<% if result.concept.additional_info.present? %>
|
6
|
+
(<%= result.concept.additional_info %>)
|
7
|
+
<% end %>
|
8
|
+
</p>
|
9
|
+
|
10
|
+
<p class="concept-item-uri"><%= rdf_url(:id => result.concept.origin, :lang => nil, :format => nil) %></p>
|
11
|
+
<% if result.definition? %>
|
12
|
+
<p class="concept-item-definition" lang="<%= result.definition.language %>">
|
13
|
+
<%= result.definition.value %>
|
14
|
+
</p>
|
15
|
+
<% end %>
|
16
|
+
</li>
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<li class="concept-item">
|
2
|
+
<p>
|
3
|
+
<%= link_to result.label, result.path,
|
4
|
+
:data => { 'resource-url' => result.url },
|
5
|
+
:class => 'concept-item-link' %>
|
6
|
+
</p>
|
7
|
+
|
8
|
+
<p class="concept-item-uri"><%= result.url %></p>
|
9
|
+
<% if result.definition? %>
|
10
|
+
<p class="concept-item-definition" lang="<%= result.definition_language %>">
|
11
|
+
<%= result.definition %>
|
12
|
+
</p>
|
13
|
+
<% end %>
|
14
|
+
</li>
|
@@ -8,9 +8,11 @@
|
|
8
8
|
<% alphabetical_concepts_path(:prefix => letter.to_s.downcase) %>
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
|
-
<ol class="
|
12
|
-
|
11
|
+
<ol class="concept-items unstyled">
|
12
|
+
<% @search_results.each do |result| %>
|
13
|
+
<%= render :partial => result.partial_name, :locals => { :result => result } %>
|
14
|
+
<% end %>
|
13
15
|
</ol>
|
14
16
|
</div>
|
15
17
|
|
16
|
-
<%= paginate @
|
18
|
+
<%= paginate @search_results %>
|
@@ -9,8 +9,11 @@
|
|
9
9
|
<% end %>
|
10
10
|
</div>
|
11
11
|
<ol class="concepts unstyled">
|
12
|
-
|
12
|
+
<% @search_results.each do |result| %>
|
13
|
+
<%= render :partial => 'concepts/alphabetical/search_result',
|
14
|
+
:locals => { :result => result } %>
|
15
|
+
<% end %>
|
13
16
|
</ol>
|
14
17
|
</div>
|
15
18
|
|
16
|
-
<%= paginate @
|
19
|
+
<%= paginate @search_results %>
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<%= sidebar do %>
|
2
2
|
<%= sidebar_header t('txt.common.representations') %>
|
3
|
-
<%= sidebar_item :icon => '
|
4
|
-
<%= sidebar_item :icon => '
|
5
|
-
<%= sidebar_item :icon => '
|
3
|
+
<%= sidebar_item :icon => 'link', :text => 'HTML', :path => scheme_path(:format => :html) %>
|
4
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_scheme_url(:format => :rdf, :lang => nil), :id => 'rdf_link_xml' %>
|
5
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_scheme_url(:format => :ttl, :lang => nil), :id => 'rdf_link_ttl' %>
|
6
6
|
<% end %>
|
@@ -1,12 +1,12 @@
|
|
1
1
|
<%- published_param = concept.published? ? nil : "0" -%>
|
2
2
|
|
3
3
|
<%= sidebar do %>
|
4
|
-
<%= sidebar_item :icon => 'share', :text => t('txt.models.concept.uri'), :path => rdf_url(concept.origin, :format => nil, :published => published_param, :lang => nil) %>
|
5
4
|
<%= sidebar_header t('txt.common.representations') %>
|
6
|
-
<%= sidebar_item :icon => '
|
7
|
-
<%= sidebar_item :icon => '
|
8
|
-
<%= sidebar_item :icon => '
|
5
|
+
<%= sidebar_item :icon => 'link', :text => 'HTML', :path => concept_path(:id => concept, :format => :html, :published => published_param) %>
|
6
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => concept_path(:id => concept, :format => :rdf, :published => published_param), :id => 'rdf_link_xml' %>
|
7
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => concept_path(:id => concept, :format => :ttl, :published => published_param), :id => 'rdf_link_ttl' %>
|
9
8
|
<%= sidebar_header 'Links' if can?(:create, Iqvoc::Concept.base_class) %>
|
9
|
+
<%= sidebar_item :icon => 'link', :text => t('txt.models.concept.uri'), :path => rdf_url(concept.origin, :format => nil, :published => published_param, :lang => nil) %>
|
10
10
|
<%= sidebar_item :icon => :edit, :text => t('txt.views.concepts.new', :concept_class_name => Iqvoc::Concept.base_class.model_name.human), :path => new_concept_path,
|
11
11
|
:perms => [:create, Iqvoc::Concept.base_class], :active => params[:action] == 'new' %>
|
12
12
|
<% end %>
|
@@ -4,13 +4,16 @@
|
|
4
4
|
<%= sidebar_item { render(klass.new_link_partial_name) } %>
|
5
5
|
<% end %>
|
6
6
|
<%= sidebar_header t('txt.views.dashboard.full_rdf_export') %>
|
7
|
-
<%= sidebar_item(:icon =>
|
7
|
+
<%= sidebar_item(:icon => 'cloud-download', :text => "RDF/Turtle", :path => concepts_url(:format => :ttl),
|
8
8
|
:perms => [:full_export, Concept::Base]) %>
|
9
|
-
<%= sidebar_item(:icon =>
|
9
|
+
<%= sidebar_item(:icon => 'cloud-download', :text => "RDF/XML", :path => concepts_url(:format => :rdf),
|
10
10
|
:perms => [:full_export, Concept::Base]) %>
|
11
11
|
<%= sidebar_header 'Extras' %>
|
12
12
|
<%= sidebar_item(:icon => :upload, :text => t('txt.views.dashboard.import'),
|
13
|
-
:path =>
|
14
|
-
<%= sidebar_item(:icon => :
|
13
|
+
:path => imports_path, :active => params[:controller] == 'imports', :perms => [:import, Concept::Base]) %>
|
14
|
+
<%= sidebar_item(:icon => :eraser, :text => t('txt.views.dashboard.reset'),
|
15
|
+
:path => reset_path, :active => params[:action] == "reset",
|
16
|
+
:perms => [:reset, :thesaurus]) %>
|
17
|
+
<%= sidebar_item(:icon => :refresh, :text => t('txt.views.triplestore_sync.caption'),
|
15
18
|
:path => triplestore_sync_path, :active => params[:controller] == "triplestore_sync") %>
|
16
19
|
<% end %>
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<td><%= item.locking_user.blank? ? "" : item.locking_user.name %></td>
|
27
27
|
<td><%= l(item.follow_up) if item.follow_up.present? %></td>
|
28
28
|
<td><%= l(item.updated_at, :format => :short) %></td>
|
29
|
-
<td><%= item.state %></td>
|
29
|
+
<td><span class="label"><%= item.state %></span></td>
|
30
30
|
<td>
|
31
31
|
<%- if params[:check_consistency] == "1" -%>
|
32
32
|
<%= consistency_status(item) %>
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<%= page_header :title => t('txt.views.import.title') %>
|
2
|
+
<%= render 'dashboard/sidebar' %>
|
3
|
+
|
4
|
+
<%= form_tag imports_path, :method => :post, :multipart => true , :class => "form-horizontal" do %>
|
5
|
+
<%= input_block :label => t('txt.views.import.file') do %>
|
6
|
+
<%= file_field_tag 'ntriples_file' %>
|
7
|
+
<% end %>
|
8
|
+
|
9
|
+
<%= input_block :label => t('txt.views.import.namespace') do %>
|
10
|
+
<%= text_field_tag 'default_namespace',
|
11
|
+
root_url(:format => nil, :lang => nil, :trailing_slash => true).gsub(/\/\/$/, "/") %>
|
12
|
+
<% end %>
|
13
|
+
|
14
|
+
<%= input_block :label => t('txt.views.import.publish') do %>
|
15
|
+
<%= check_box_tag 'publish', '1', true %>
|
16
|
+
<% end %>
|
17
|
+
|
18
|
+
<div class="form-actions">
|
19
|
+
<%= submit_tag t('txt.views.import.title'), :class => 'btn btn-primary' %>
|
20
|
+
</div>
|
21
|
+
<% end %>
|
22
|
+
|
23
|
+
<table class="table">
|
24
|
+
<thead>
|
25
|
+
<tr>
|
26
|
+
<th>ID</th>
|
27
|
+
<th><%= Import.human_attribute_name(:user) %></th>
|
28
|
+
<th><%= Import.human_attribute_name(:created_at) %></th>
|
29
|
+
<th><%= Import.human_attribute_name(:finished_at) %></th>
|
30
|
+
<th><%= Import.human_attribute_name(:success) %></th>
|
31
|
+
</tr>
|
32
|
+
</thead>
|
33
|
+
<tbody>
|
34
|
+
<% @imports.each do |import| %>
|
35
|
+
<tr>
|
36
|
+
<td><%= link_to import.id, import_path(:id => import) %></td>
|
37
|
+
<td><%= import.user %></td>
|
38
|
+
<td><%= l(import.created_at, :format => :short) %></td>
|
39
|
+
<td><%= import.finished_at? ? l(import.finished_at, :format => :short) : icon(:cog, 'fa-spin') %></td>
|
40
|
+
<td><%= icon('thumbs-o-up') if import.success? %></td>
|
41
|
+
</tr>
|
42
|
+
<% end %>
|
43
|
+
</tbody>
|
44
|
+
</table>
|
@@ -14,7 +14,13 @@
|
|
14
14
|
<![endif]-->
|
15
15
|
<%= yield :head %>
|
16
16
|
</head>
|
17
|
+
|
18
|
+
<% if @datasets %> <%# XXX: special-casing matches federation %>
|
19
|
+
<body data-datasets="<%= @datasets %>"
|
20
|
+
data-remote-label-path="<%= remote_label_path(:lang => nil, :format => :json) %>">
|
21
|
+
<% else %>
|
17
22
|
<body>
|
23
|
+
<% end %>
|
18
24
|
<%= render 'layouts/navigation' %>
|
19
25
|
|
20
26
|
<div class="container">
|
@@ -22,7 +28,7 @@
|
|
22
28
|
<div class="<%= content_for?(:sidebar) ? "span9" : "span12" %>" id="content">
|
23
29
|
<%= yield :page_header %>
|
24
30
|
<% flash.each do |type, messages| %>
|
25
|
-
<%
|
31
|
+
<% Array.wrap(messages).each do |msg| %>
|
26
32
|
<%= alert(type) { msg } %>
|
27
33
|
<% end %>
|
28
34
|
<% end %>
|
@@ -1,17 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
<% if owner = result.owner %>
|
2
|
+
<li class="search-result" data-rdf-namespace="<%= result.rdf_namespace %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.to_s %>" data-rdf-language="<%= result.language %>">
|
3
|
+
<%= link_to_object(owner, result.target.value, :class => 'search-result-link', :data => { 'resource-path' => rdf_path(owner.origin, :lang => nil, :format => nil) }) %> <% if owner.additional_info.present? %>(<%= owner.additional_info %>)<% end %>
|
4
|
+
<dl class="search-result-meta">
|
5
|
+
<dt class="search-result-key"><%= t('txt.views.search_results.type') %></dt>
|
6
|
+
<dd class="search-result-value" data-key="<%= t('txt.views.search_results.type') %>"><%= result.model_name.human %></dd>
|
7
|
+
<% if result.target.language %>
|
8
|
+
<dt class="search-result-key"><%= t('txt.views.search_results.language') %></dt>
|
9
|
+
<dd class="search-result-value" data-key="<%= t('txt.views.search_results.language') %>"><%= result.target.language %></dd>
|
8
10
|
<% end %>
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
</dt>
|
13
|
-
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
14
|
-
<%- if result.target.language -%>
|
15
|
-
<dd><%= t('txt.views.search_results.language') %>: <%= result.target.language %></dd>
|
16
|
-
<%- end -%>
|
17
|
-
<%- end -%>
|
11
|
+
</dl>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<%- fieldname = "concept[inline_#{assoc_klass.name.to_relation_name}]" -%>
|
2
2
|
|
3
|
-
<%= f.input fieldname, :label => assoc_klass.model_name.human(:count => 2) do %>
|
3
|
+
<%= f.input fieldname, :label => assoc_klass.model_name.human(:count => 2), :label_html => { :for => fieldname } do %>
|
4
4
|
<%= text_area_tag fieldname, owner_klass.send("inline_#{assoc_klass.name.to_relation_name}"), :class => "span4", :rows => 4 %>
|
5
5
|
<% end %>
|
@@ -1,8 +1,11 @@
|
|
1
|
-
<
|
1
|
+
<li class="search-result" data-rdf-namespace="<%= iqvoc_default_rdf_namespaces[result.rdf_namespace.try(:to_sym)] %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.to_s %>" data-rdf-language="<%= result.language %>">
|
2
2
|
<% if result.owner.is_a?(Concept::Base) %>
|
3
|
-
<%= link_to
|
3
|
+
<%= link_to "#{result.owner.pref_label.to_s} (#{result.owner.origin})", concept_path(:id => result.owner) %>
|
4
4
|
<% elsif result.owner.is_a?(Label::Base) %>
|
5
|
-
<%= link_to
|
5
|
+
<%= link_to result.owner.value, label_path(:id => result.owner), :property => result.class.rdf_predicate, :lang => result.language %>
|
6
6
|
<% end %>
|
7
|
-
|
8
|
-
<
|
7
|
+
<dl class="search-result-meta">
|
8
|
+
<dt class="search-result-key"><%= t('txt.views.search_results.type') %></dt>
|
9
|
+
<dd class="search-result-value"><%= result.class.model_name.human %></dd>
|
10
|
+
</dl>
|
11
|
+
</li>
|
@@ -1,12 +1,9 @@
|
|
1
|
-
<
|
1
|
+
<li class="search-result" data-rdf-namespace="<%= iqvoc_default_rdf_namespaces[result.rdf_namespace.try(:to_sym)] %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.to_s %>" data-rdf-language="<%= result.language %>">
|
2
2
|
<% result.annotations.each do |annotation| %>
|
3
|
-
|
4
|
-
<%= link_to highlight_query("#{annotation.predicate}: #{annotation.value}", params[:query]), concept_path(:id => result.owner) %><br>
|
5
|
-
<% elsif result.owner.is_a?(Label::Base) %>
|
6
|
-
<%= link_to highlight_query("#{annotation.predicate}: #{annotation.value}", params[:query]), label_path(:id => result.owner) %><br>
|
7
|
-
<% elsif result.owner.is_a?(Collection::Base) %>
|
8
|
-
<%= link_to highlight_query("#{annotation.predicate}: #{annotation.value}", params[:query]), collection_path(:id => result.owner) %><br>
|
9
|
-
<% end %>
|
3
|
+
<%= link_to_object(result.owner, "#{annotation.predicate}: #{annotation.value}" %><br/>
|
10
4
|
<% end %>
|
11
|
-
|
12
|
-
<
|
5
|
+
<dl class="search-result-meta">
|
6
|
+
<dt class="search-result-key"><%= t('txt.views.search_results.type') %></dt>
|
7
|
+
<dd class="search-result-value"><%= result.class.model_name.human %></dd>
|
8
|
+
</dl>
|
9
|
+
</li>
|
@@ -1,8 +1,8 @@
|
|
1
|
-
<
|
1
|
+
<li class="search-result" data-rdf-namespace="<%= iqvoc_default_rdf_namespaces[result.rdf_namespace.try(:to_sym)] %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.to_s %>" data-rdf-language="<%= result.language %>">
|
2
2
|
<% if result.owner.is_a?(Concept::Base) %>
|
3
|
-
<%= link_to
|
3
|
+
<%= link_to result.owner.pref_label.to_s, concept_path(:id => result.owner), :class => 'search-result-link', :data => { 'resource-path' => rdf_path(result.owner.origin, :lang => nil, :format => nil) } %>
|
4
4
|
<% elsif result.owner.is_a?(Label::Base) %>
|
5
|
-
<%= link_to result.owner.value, label_path(:id => result.owner)
|
5
|
+
<%= link_to result.owner.value, label_path(:id => result.owner), :class => 'search-result-link', :data => { 'resource-path' => rdf_path(result.owner.origin, :lang => nil, :format => nil) } %>
|
6
6
|
<% end %>
|
7
|
-
|
8
|
-
|
7
|
+
<p class="search-result-body"><%= highlight_query(excerpt(result.value, params[:query]), params[:query]) %></p>
|
8
|
+
</li>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
Iqvoc.default_rdf_namespace_helper_methods.each do |meth|
|
2
|
+
document.namespaces(self.send(meth))
|
3
|
+
end
|
4
|
+
|
5
|
+
ns = IqRdf::Namespace.find_namespace_class(:void)
|
6
|
+
|
7
|
+
document << IqRdf.build_uri(Iqvoc.config['title'].parameterize, ns.build_uri('Dataset')) do |dataset|
|
8
|
+
dataset.dct.title Iqvoc.config['title']
|
9
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<li class="search-result" data-rdf-namespace="<%= iqvoc_default_rdf_namespaces[result.rdf_namespace.try(:to_sym)] %>" data-rdf-predicate="<%= result.rdf_predicate %>" data-rdf-value="<%= result.label %>" data-rdf-language="<%= result.language %>">
|
2
|
+
<%= link_to(result.label, result.url.to_s, :class => 'search-result-link') %>
|
3
|
+
<span class="search-result-uri"><%= result.url %></span>
|
4
|
+
<% if result.body.present? %>
|
5
|
+
<p class="search-result-body"><%= result.body %></p>
|
6
|
+
<% end %>
|
7
|
+
<dl class="search-result-meta">
|
8
|
+
<% result.meta.each do |meta_information| %>
|
9
|
+
<dt class="search-result-key"><%= meta_information.key %></dt>
|
10
|
+
<dd class="search-result-value" data-key="<%= meta_information.key %>"><%= meta_information.value %></dd>
|
11
|
+
<% end %>
|
12
|
+
</dl>
|
13
|
+
</li>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<% if results %>
|
2
2
|
<%= sidebar do %>
|
3
3
|
<%= sidebar_header t('txt.common.representations') %>
|
4
|
-
<%= sidebar_item :icon => '
|
5
|
-
<%= sidebar_item :icon => '
|
4
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/XML', :path => rdf_search_path(request.query_parameters.merge(:format => :rdf, :lang => nil, :page => results.current_page, :only_path => false)), :id => 'rdf_link_xml' %>
|
5
|
+
<%= sidebar_item :icon => 'link', :text => 'RDF/Turtle', :path => rdf_search_path(request.query_parameters.merge(:format => :ttl, :lang => nil, :page => @results.current_page, :only_path => false)), :id => 'rdf_link_ttl' %>
|
6
6
|
<% end %>
|
7
|
-
<% end %>
|
7
|
+
<% end %>
|
@@ -7,16 +7,16 @@
|
|
7
7
|
<div class="panel">
|
8
8
|
<%= results_header @results %>
|
9
9
|
|
10
|
-
<
|
10
|
+
<ul class="search-results unstyled">
|
11
11
|
<% @results.each do |result| %>
|
12
12
|
<% if @klass %>
|
13
13
|
<%= render @klass.search_result_partial_name, :result => result %>
|
14
14
|
<% else %>
|
15
|
-
<%= render result.
|
15
|
+
<%= render result.search_result_partial_name, :result => result %>
|
16
16
|
<% end %>
|
17
17
|
<% end %>
|
18
|
-
</
|
18
|
+
</ul>
|
19
19
|
|
20
20
|
<%= paginate @results %>
|
21
|
-
<% end %>
|
22
21
|
</div>
|
22
|
+
<% end %>
|