Commit 83c55b50f8209a624efb0a4349755baaa9c10967
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'virtuoso_integration' of gitlab.com:participa/noosfero into virtuoso_integration
Conflicts: plugins/virtuoso/lib/virtuoso_plugin/dspace_harvest.rb
Showing
3 changed files
with
8 additions
and
8 deletions
Show diff stats
plugins/virtuoso/lib/virtuoso_plugin/dspace_harvest.rb
@@ -25,9 +25,9 @@ class VirtuosoPlugin::DspaceHarvest | @@ -25,9 +25,9 @@ class VirtuosoPlugin::DspaceHarvest | ||
25 | puts "triplify #{record.header.identifier}" | 25 | puts "triplify #{record.header.identifier}" |
26 | 26 | ||
27 | settings.ontology_mapping.each do |mapping| | 27 | settings.ontology_mapping.each do |mapping| |
28 | - values = [metadata.extract_field(mapping['source'])].flatten.compact | 28 | + values = [metadata.extract_field(mapping[:source])].flatten.compact |
29 | values.each do |value| | 29 | values.each do |value| |
30 | - query = RDF::Virtuoso::Query.insert_data([RDF::URI.new(metadata.identifier), RDF::URI.new(mapping['target']), value]).graph(RDF::URI.new(@dspace_uri)) | 30 | + query = RDF::Virtuoso::Query.insert_data([RDF::URI.new(metadata.identifier), RDF::URI.new(mapping[:target]), value]).graph(RDF::URI.new(@dspace_uri)) |
31 | plugin.virtuoso_client.insert(query) | 31 | plugin.virtuoso_client.insert(query) |
32 | end | 32 | end |
33 | end | 33 | end |
plugins/virtuoso/views/virtuoso_plugin_admin/_server_list_item.html.erb
1 | <div> | 1 | <div> |
2 | <% value = server_list_item[:dspace_uri] if server_list_item %> | 2 | <% value = server_list_item[:dspace_uri] if server_list_item %> |
3 | - <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', value, { :class => 'link-name', :maxlength => 60 } %> | 3 | + <%= text_field_tag 'settings[dspace_servers][][dspace_uri]', value, { :class => 'link-name', :maxlength => 60, :size=> 58 } %> |
4 | <%= button_without_text(:delete, _('Delete'), "#" , :class=>"delete-server-list-row") %> | 4 | <%= button_without_text(:delete, _('Delete'), "#" , :class=>"delete-server-list-row") %> |
5 | <BR><BR> | 5 | <BR><BR> |
6 | </div> | 6 | </div> |
plugins/virtuoso/views/virtuoso_plugin_admin/index.html.erb
@@ -5,11 +5,11 @@ | @@ -5,11 +5,11 @@ | ||
5 | 5 | ||
6 | <%= form_for(:settings) do |f| %> | 6 | <%= form_for(:settings) do |f| %> |
7 | <strong> | 7 | <strong> |
8 | - <%= labelled_form_field _('Virtuoso URL:'), f.text_field(:virtuoso_uri) %> | ||
9 | - <%= labelled_form_field _('Virtuoso Admin Username:'), f.text_field(:virtuoso_username) %> | ||
10 | - <%= labelled_form_field _('Virtuoso Admin Password:'), f.password_field(:virtuoso_password) %> | ||
11 | - <%= labelled_form_field _('Virtuoso Read-Only Username:'), f.text_field(:virtuoso_readonly_username) %> | ||
12 | - <%= labelled_form_field _('Virtuoso Read-Only Password:'), f.password_field(:virtuoso_readonly_password) %> | 8 | + <%= labelled_form_field _('Virtuoso URL:'), f.text_field(:virtuoso_uri, :size=> 60) %> |
9 | + <%= labelled_form_field _('Virtuoso Admin Username:'), f.text_field(:virtuoso_username, :size=> 60) %> | ||
10 | + <%= labelled_form_field _('Virtuoso Admin Password:'), f.password_field(:virtuoso_password, :size=> 60) %> | ||
11 | + <%= labelled_form_field _('Virtuoso Read-Only Username:'), f.text_field(:virtuoso_readonly_username, :size=> 60) %> | ||
12 | + <%= labelled_form_field _('Virtuoso Read-Only Password:'), f.password_field(:virtuoso_readonly_password, :size=> 60) %> | ||
13 | </strong> | 13 | </strong> |
14 | <BR> | 14 | <BR> |
15 | <div class="dspace-servers-config-box" > | 15 | <div class="dspace-servers-config-box" > |