iqvoc 3.2.3 → 3.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +4 -1
- data/Gemfile.lock +48 -10
- data/README.md +5 -5
- data/app/controllers/application_controller.rb +1 -0
- data/app/controllers/concepts/versions_controller.rb +3 -3
- data/app/controllers/concepts_controller.rb +3 -4
- data/app/helpers/application_helper.rb +1 -1
- data/app/models/concept/base.rb +9 -6
- data/app/models/labeling/skos/base.rb +12 -7
- data/app/models/note/skos/change_note.rb +11 -0
- data/app/models/origin_mapping.rb +1 -1
- data/app/views/concepts/_base_data.html.erb +3 -3
- data/app/views/layouts/_controls.html.erb +1 -1
- data/app/views/layouts/application.html.erb +5 -2
- data/app/views/partials/labeling/skos/_search_result.html.erb +9 -4
- data/app/views/partials/note/skos/change_note/_search_result.html.erb +12 -0
- data/app/views/search_results/index.html.erb +6 -0
- data/config/database.template.yml +21 -35
- data/config/database.yml +34 -32
- data/config/database.yml.mysql +29 -0
- data/config/database.yml.sqlite +17 -0
- data/config/initializers/secret_token.rb +2 -1
- data/config/initializers/secret_token.rb.template +2 -1
- data/config/locales/activerecord.de.yml +6 -0
- data/config/locales/activerecord.en.yml +6 -0
- data/config/locales/de.yml +1 -0
- data/config/locales/en.yml +1 -0
- data/config/routes.rb +1 -1
- data/db/iqvoc_test.sqlite3 +0 -0
- data/db/schema.rb +1 -0
- data/lib/iqvoc/rdf_helper.rb +1 -1
- data/lib/iqvoc/version.rb +1 -1
- data/lib/iqvoc/versioning.rb +1 -1
- data/public/javascripts/iqvoc/application.js +11 -1
- data/public/javascripts/iqvoc/entityselect.js +1 -1
- data/public/javascripts/iqvoc/{jquery-ui-1.8.13.custom.js → jquery-ui-1.8.16.custom.js} +85 -45
- data/public/javascripts/iqvoc/jquery-ui-1.8.16.custom.min.js +165 -0
- data/public/stylesheets/iqvoc/ie_fixes.css +6 -0
- data/public/stylesheets/iqvoc/images/ui-bg_flat_55_fbec88_40x100.png +0 -0
- data/public/stylesheets/iqvoc/images/ui-icons_f9bd01_256x240.png +0 -0
- data/public/stylesheets/iqvoc/iqvoc.css +6 -3
- data/public/stylesheets/iqvoc/{jquery-ui-1.8.13.custom.css → jquery-ui-1.8.16.custom.css} +11 -16
- data/test/integration/note_annotations_test.rb +6 -4
- data/test/integration/search_test.rb +10 -4
- data/test/unit/origin_mapping_test.rb +4 -8
- metadata +24 -33
- data/app/views/partials/collection_label/_search_result.html.erb +0 -5
- data/app/views/users/_user_preference.html.erb +0 -12
- data/config/environments/production.template.rb +0 -65
- data/config/environments/production_internal.rb +0 -65
- data/public/images/iqvoc/add.png +0 -0
- data/public/images/iqvoc/go_there.png +0 -0
- data/public/images/iqvoc/header.png +0 -0
- data/public/images/iqvoc/iqvoc.png +0 -0
- data/public/images/iqvoc/note_add.png +0 -0
- data/public/images/iqvoc/note_delete.png +0 -0
- data/public/images/iqvoc/note_edit.png +0 -0
- data/public/images/iqvoc/rails.png +0 -0
- data/public/images/iqvoc/remove.png +0 -0
- data/public/javascripts/iqvoc/jquery-ui-1.8.13.custom.min.js +0 -163
data/Gemfile
CHANGED
@@ -34,6 +34,9 @@ gem 'rails_helpers_fix'
|
|
34
34
|
|
35
35
|
group :development do
|
36
36
|
gem 'awesome_print'
|
37
|
+
gem 'capistrano'
|
38
|
+
gem 'capistrano-ext'
|
39
|
+
gem 'rvm' # RVM API (for capistrano deployments)
|
37
40
|
end
|
38
41
|
|
39
42
|
group :development, :test do
|
@@ -54,8 +57,8 @@ group :test do
|
|
54
57
|
gem 'capybara-webkit'
|
55
58
|
gem 'database_cleaner'
|
56
59
|
gem 'factory_girl_rails'
|
57
|
-
# gem 'factory_girl'
|
58
60
|
gem 'memory_test_fix'
|
61
|
+
gem 'turn'
|
59
62
|
end
|
60
63
|
|
61
64
|
group :production, :production_internal do
|
data/Gemfile.lock
CHANGED
@@ -24,10 +24,19 @@ GEM
|
|
24
24
|
activesupport (= 3.0.10)
|
25
25
|
arel (~> 2.0.10)
|
26
26
|
tzinfo (~> 0.3.23)
|
27
|
+
activerecord-jdbc-adapter (1.2.0)
|
28
|
+
activerecord-jdbcmysql-adapter (1.2.0)
|
29
|
+
activerecord-jdbc-adapter (~> 1.2.0)
|
30
|
+
jdbc-mysql (~> 5.1.0)
|
31
|
+
activerecord-jdbcsqlite3-adapter (1.2.0)
|
32
|
+
activerecord-jdbc-adapter (~> 1.2.0)
|
33
|
+
jdbc-sqlite3 (~> 3.7.2)
|
34
|
+
activerecord-oracle_enhanced-adapter (1.4.0)
|
27
35
|
activeresource (3.0.10)
|
28
36
|
activemodel (= 3.0.10)
|
29
37
|
activesupport (= 3.0.10)
|
30
38
|
activesupport (3.0.10)
|
39
|
+
ansi (1.3.0)
|
31
40
|
arel (2.0.10)
|
32
41
|
authlogic (3.0.3)
|
33
42
|
activerecord (>= 3.0.7)
|
@@ -35,6 +44,14 @@ GEM
|
|
35
44
|
awesome_print (0.4.0)
|
36
45
|
builder (2.1.2)
|
37
46
|
cancan (1.6.5)
|
47
|
+
capistrano (2.9.0)
|
48
|
+
highline
|
49
|
+
net-scp (>= 1.0.0)
|
50
|
+
net-sftp (>= 2.0.0)
|
51
|
+
net-ssh (>= 2.0.14)
|
52
|
+
net-ssh-gateway (>= 1.1.0)
|
53
|
+
capistrano-ext (1.2.1)
|
54
|
+
capistrano (>= 1.0.0)
|
38
55
|
capybara (1.0.1)
|
39
56
|
mime-types (>= 1.16)
|
40
57
|
nokogiri (>= 1.3.3)
|
@@ -42,24 +59,29 @@ GEM
|
|
42
59
|
rack-test (>= 0.5.4)
|
43
60
|
selenium-webdriver (~> 2.0)
|
44
61
|
xpath (~> 0.1.4)
|
45
|
-
capybara-webkit (0.6.
|
62
|
+
capybara-webkit (0.6.1)
|
46
63
|
capybara (~> 1.0.0)
|
47
|
-
childprocess (0.2.
|
64
|
+
childprocess (0.2.2)
|
48
65
|
ffi (~> 1.0.6)
|
49
66
|
database_cleaner (0.6.7)
|
50
67
|
erubis (2.6.6)
|
51
68
|
abstract (>= 1.0.0)
|
52
|
-
factory_girl (2.0
|
53
|
-
factory_girl_rails (1.
|
54
|
-
factory_girl (~> 2.
|
69
|
+
factory_girl (2.1.0)
|
70
|
+
factory_girl_rails (1.2.0)
|
71
|
+
factory_girl (~> 2.1.0)
|
55
72
|
railties (>= 3.0.0)
|
56
73
|
ffi (1.0.9)
|
74
|
+
ffi (1.0.9-java)
|
75
|
+
highline (1.6.2)
|
57
76
|
i18n (0.5.0)
|
58
77
|
iq_rdf (0.0.15)
|
59
78
|
builder
|
60
79
|
bundler
|
61
|
-
|
62
|
-
|
80
|
+
jdbc-mysql (5.1.13)
|
81
|
+
jdbc-sqlite3 (3.7.2)
|
82
|
+
json (1.6.1)
|
83
|
+
json (1.6.1-java)
|
84
|
+
json_pure (1.6.1)
|
63
85
|
kaminari (0.12.4)
|
64
86
|
rails (>= 3.0.0)
|
65
87
|
mail (2.2.19)
|
@@ -70,9 +92,17 @@ GEM
|
|
70
92
|
memory_test_fix (0.2.0)
|
71
93
|
mime-types (1.16)
|
72
94
|
mysql2 (0.2.7)
|
95
|
+
net-scp (1.0.4)
|
96
|
+
net-ssh (>= 1.99.1)
|
97
|
+
net-sftp (2.0.5)
|
98
|
+
net-ssh (>= 2.0.9)
|
99
|
+
net-ssh (2.2.1)
|
100
|
+
net-ssh-gateway (1.1.0)
|
101
|
+
net-ssh (>= 1.99.1)
|
73
102
|
nokogiri (1.5.0)
|
103
|
+
nokogiri (1.5.0-java)
|
74
104
|
polyglot (0.3.2)
|
75
|
-
rack (1.2.
|
105
|
+
rack (1.2.4)
|
76
106
|
rack-mount (0.6.14)
|
77
107
|
rack (>= 1.0.0)
|
78
108
|
rack-test (0.5.7)
|
@@ -93,9 +123,10 @@ GEM
|
|
93
123
|
rdoc (~> 3.4)
|
94
124
|
thor (~> 0.14.4)
|
95
125
|
rake (0.9.2)
|
96
|
-
rdoc (3.9.
|
126
|
+
rdoc (3.9.4)
|
97
127
|
rubyzip (0.9.4)
|
98
|
-
|
128
|
+
rvm (1.9.2)
|
129
|
+
selenium-webdriver (2.6.0)
|
99
130
|
childprocess (>= 0.2.1)
|
100
131
|
ffi (>= 1.0.7)
|
101
132
|
json_pure
|
@@ -105,11 +136,14 @@ GEM
|
|
105
136
|
treetop (1.4.10)
|
106
137
|
polyglot
|
107
138
|
polyglot (>= 0.3.1)
|
139
|
+
turn (0.8.2)
|
140
|
+
ansi (>= 1.2.2)
|
108
141
|
tzinfo (0.3.29)
|
109
142
|
xpath (0.1.4)
|
110
143
|
nokogiri (~> 1.3)
|
111
144
|
|
112
145
|
PLATFORMS
|
146
|
+
java
|
113
147
|
ruby
|
114
148
|
|
115
149
|
DEPENDENCIES
|
@@ -119,6 +153,8 @@ DEPENDENCIES
|
|
119
153
|
authlogic
|
120
154
|
awesome_print
|
121
155
|
cancan
|
156
|
+
capistrano
|
157
|
+
capistrano-ext
|
122
158
|
capybara
|
123
159
|
capybara-webkit
|
124
160
|
database_cleaner
|
@@ -131,4 +167,6 @@ DEPENDENCIES
|
|
131
167
|
nokogiri (= 1.5.0)
|
132
168
|
rails (= 3.0.10)
|
133
169
|
rails_helpers_fix
|
170
|
+
rvm
|
134
171
|
sqlite3
|
172
|
+
turn
|
data/README.md
CHANGED
@@ -20,15 +20,15 @@ iQvoc is built with state-of-the-art technology and can be easily customized acc
|
|
20
20
|
|
21
21
|
## Getting Started
|
22
22
|
|
23
|
-
1. Configure your database via `config/database.template.yml`
|
24
|
-
2. `bundle install`
|
25
|
-
3. Run `rake db:create` to create the database
|
23
|
+
1. Configure your database via `config/database.template.yml`. Don't forget to rename it to `database.yml`
|
24
|
+
2. Run `bundle install`
|
25
|
+
3. Run `bundle exec rake db:create` to create the database
|
26
26
|
4. Create the necessary tables by running `rake db:migrate`
|
27
27
|
5. Load some base data by running `rake db:seed`
|
28
28
|
6. Create `config/initializers/secret_token.rb` based on
|
29
29
|
`config/initializers/secret_token.rb.template`, filling in the secret token
|
30
|
-
generated by `rake secret`
|
31
|
-
7. Boot up the app using `rails s` (or `passenger start` if you use passenger)
|
30
|
+
generated by `bundle exec rake secret`
|
31
|
+
7. Boot up the app using `bundle exec rails s` (or `passenger start` if you use passenger)
|
32
32
|
8. Log in with "admin@iqvoc" / "admin" or "demo@iqvoc" / "cooluri" (cf. step #5)
|
33
33
|
9. Visit the Users section and change the default passwords
|
34
34
|
|
@@ -39,6 +39,7 @@ class ApplicationController < ActionController::Base
|
|
39
39
|
# Force an extension to every url. (LOD)
|
40
40
|
def ensure_extension
|
41
41
|
unless params[:format] || request.method != "GET"
|
42
|
+
flash.keep
|
42
43
|
redirect_to url_for(params.merge(:format => (request.format && request.format.symbol) || :html))
|
43
44
|
end
|
44
45
|
end
|
@@ -69,7 +69,7 @@ class Concepts::VersionsController < ApplicationController
|
|
69
69
|
authorize! :lock, new_version
|
70
70
|
|
71
71
|
new_version.lock_by_user(current_user.id)
|
72
|
-
new_version.save
|
72
|
+
new_version.save :validate => false
|
73
73
|
|
74
74
|
flash[:notice] = t("txt.controllers.versioning.locked")
|
75
75
|
redirect_to edit_concept_path(:published => 0, :id => new_version)
|
@@ -83,8 +83,8 @@ class Concepts::VersionsController < ApplicationController
|
|
83
83
|
authorize! :unlock, new_version
|
84
84
|
|
85
85
|
new_version.unlock
|
86
|
-
new_version.save
|
87
|
-
|
86
|
+
new_version.save :validate => false
|
87
|
+
|
88
88
|
flash[:notice] = t("txt.controllers.versioning.unlocked")
|
89
89
|
redirect_to concept_path(:published => 0, :id => new_version)
|
90
90
|
end
|
@@ -19,7 +19,7 @@ class ConceptsController < ApplicationController
|
|
19
19
|
|
20
20
|
def index
|
21
21
|
authorize! :read, Concept::Base
|
22
|
-
|
22
|
+
|
23
23
|
respond_to do |format|
|
24
24
|
format.json do # Search for widget
|
25
25
|
@concepts = Iqvoc::Concept.base_class.editor_selectable.with_pref_labels.merge(Label::Base.by_query_value("#{params[:query]}%")).all
|
@@ -129,7 +129,7 @@ class ConceptsController < ApplicationController
|
|
129
129
|
def update
|
130
130
|
@concept = Iqvoc::Concept.base_class.by_origin(params[:id]).unpublished.last
|
131
131
|
raise ActiveRecord::RecordNotFound unless @concept
|
132
|
-
|
132
|
+
|
133
133
|
authorize! :update, @concept
|
134
134
|
|
135
135
|
if @concept.update_attributes(params[:concept])
|
@@ -158,7 +158,7 @@ class ConceptsController < ApplicationController
|
|
158
158
|
|
159
159
|
protected
|
160
160
|
|
161
|
-
# TODO:
|
161
|
+
# TODO: rename to match the behavior of the method
|
162
162
|
def labeling_as_json(labeling)
|
163
163
|
label = labeling.target
|
164
164
|
return {
|
@@ -171,4 +171,3 @@ class ConceptsController < ApplicationController
|
|
171
171
|
end
|
172
172
|
|
173
173
|
end
|
174
|
-
|
data/app/models/concept/base.rb
CHANGED
@@ -163,12 +163,15 @@ class Concept::Base < ActiveRecord::Base
|
|
163
163
|
has_many labeling_class_name.to_relation_name,
|
164
164
|
:foreign_key => 'owner_id',
|
165
165
|
:class_name => labeling_class_name
|
166
|
-
#
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
166
|
+
# Only clone superclass relations
|
167
|
+
unless Iqvoc::Concept.labeling_classes.keys.detect { |klass| labeling_class_name.constantize < klass }
|
168
|
+
# When a Label has only one labeling (the "no skosxl" case) we'll have to
|
169
|
+
# clone the label too.
|
170
|
+
if labeling_class_name.constantize.reflections[:target].options[:dependent] == :destroy
|
171
|
+
include_to_deep_cloning(labeling_class_name.to_relation_name => :target)
|
172
|
+
else
|
173
|
+
include_to_deep_cloning(labeling_class_name.to_relation_name)
|
174
|
+
end
|
172
175
|
end
|
173
176
|
end
|
174
177
|
|
@@ -62,13 +62,18 @@ class Labeling::SKOS::Base < Labeling::Base
|
|
62
62
|
raise "Collection with Origin #{params[:collection_origin]} not found!"
|
63
63
|
end
|
64
64
|
end
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
65
|
+
scope = scope.includes(:owner)
|
66
|
+
|
67
|
+
scope = case params[:for]
|
68
|
+
when "concept"
|
69
|
+
scope.where("concepts.type" => Iqvoc::Concept.base_class_name).merge(Concept::Base.published)
|
70
|
+
when "collection"
|
71
|
+
scope.where("concepts.type" => Iqvoc::Collection.base_class_name)
|
72
|
+
else
|
73
|
+
# no additional conditions
|
74
|
+
scope
|
75
|
+
end
|
76
|
+
|
72
77
|
scope
|
73
78
|
end
|
74
79
|
|
@@ -21,6 +21,17 @@ class Note::SKOS::ChangeNote < Note::SKOS::Base
|
|
21
21
|
def self.edit_partial_name(obj)
|
22
22
|
"partials/note/skos/edit_change_note"
|
23
23
|
end
|
24
|
+
|
25
|
+
def self.search_result_partial_name
|
26
|
+
'partials/note/skos/change_note/search_result'
|
27
|
+
end
|
28
|
+
|
29
|
+
def self.single_query(params = {})
|
30
|
+
query_str = build_query_string(params)
|
31
|
+
|
32
|
+
Note::SKOS::ChangeNote.includes(:annotations).
|
33
|
+
merge(Note::Annotated::Base.where(Note::Annotated::Base.arel_table[:value].matches(query_str)))
|
34
|
+
end
|
24
35
|
|
25
36
|
def build_rdf(document, subject)
|
26
37
|
subject.send(self.rdf_namespace).build_predicate(self.rdf_predicate) do |blank_node|
|
@@ -21,7 +21,7 @@
|
|
21
21
|
</fieldset>
|
22
22
|
|
23
23
|
<fieldset>
|
24
|
-
<legend
|
24
|
+
<legend><%= Labeling::Base.model_name.human(:count => 2) %></legend>
|
25
25
|
<ol>
|
26
26
|
<%- Iqvoc::Concept.labeling_classes.each do |labeling_class, languages| -%>
|
27
27
|
<%- languages.each do |language| -%>
|
@@ -38,7 +38,7 @@
|
|
38
38
|
<% end %>
|
39
39
|
|
40
40
|
<fieldset>
|
41
|
-
<legend
|
41
|
+
<legend><%= Concept::Relation::Base.model_name.human(:count => 2) %></legend>
|
42
42
|
<ol>
|
43
43
|
<%- if Iqvoc::Concept.broader_relation_class.narrower_editable -%>
|
44
44
|
<%= render Iqvoc::Concept.broader_relation_class.narrower_class.edit_partial_name(@concept),
|
@@ -55,7 +55,7 @@
|
|
55
55
|
</fieldset>
|
56
56
|
|
57
57
|
<fieldset>
|
58
|
-
<legend
|
58
|
+
<legend><%= Match::Base.model_name.human(:count => 2) %></legend>
|
59
59
|
<ol>
|
60
60
|
<% Iqvoc::Concept.match_classes.each do |match_class| %>
|
61
61
|
<%= render :partial => match_class.edit_partial_name(@concept),
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<% end %>
|
9
9
|
</li>
|
10
10
|
|
11
|
-
<li>
|
11
|
+
<li id="language_selection">
|
12
12
|
<a href="javascript:;" class="lang-widget"><%= t("txt.views.lang_widget.caption") %> ▼</a>
|
13
13
|
<ul class="lang-widget">
|
14
14
|
<%- unless Iqvoc::Concept.pref_labeling_languages.reject(&:nil?).length == 0 -%>
|
@@ -14,11 +14,14 @@
|
|
14
14
|
<%= stylesheet_link_tag "iqvoc/iqvoc.css", :media => "all" %>
|
15
15
|
<%= stylesheet_link_tag "iqvoc/forms.css" %>
|
16
16
|
<%= stylesheet_link_tag "/javascripts/iqvoc/jquery-treeview/jquery.treeview.css" %>
|
17
|
-
<%= stylesheet_link_tag "iqvoc/jquery-ui-1.8.
|
17
|
+
<%= stylesheet_link_tag "iqvoc/jquery-ui-1.8.16.custom.css" %>
|
18
18
|
<%= stylesheet_link_tag "iqvoc/widgets.css" %>
|
19
19
|
<% Iqvoc.additional_css_files.each do |file| %>
|
20
20
|
<%= stylesheet_link_tag file %>
|
21
21
|
<% end %>
|
22
|
+
<!--[if (gte IE 6)&(lte IE 8)]>
|
23
|
+
<%= stylesheet_link_tag "iqvoc/ie_fixes.css" %>
|
24
|
+
<![endif]-->
|
22
25
|
|
23
26
|
<%= yield :head %>
|
24
27
|
</head>
|
@@ -65,7 +68,7 @@
|
|
65
68
|
}
|
66
69
|
</script>
|
67
70
|
<%= javascript_include_tag "iqvoc/jquery-1.6.2.min.js" %>
|
68
|
-
<%= javascript_include_tag "iqvoc/jquery-ui-1.8.
|
71
|
+
<%= javascript_include_tag "iqvoc/jquery-ui-1.8.16.custom.min.js" %>
|
69
72
|
<%= javascript_include_tag "iqvoc/jquery-ui.datepicker-de.js" %>
|
70
73
|
<%= javascript_include_tag "iqvoc/jquery-treeview/jquery.treeview.js" %>
|
71
74
|
<%= javascript_include_tag "iqvoc/jquery-treeview/jquery.treeview.async.js" %>
|
@@ -1,8 +1,13 @@
|
|
1
|
-
<%- if
|
1
|
+
<%- if owner = result.owner -%>
|
2
2
|
<dt>
|
3
|
-
|
4
|
-
|
5
|
-
|
3
|
+
<% case owner.class.name %>
|
4
|
+
<% when Iqvoc::Concept.base_class_name %>
|
5
|
+
<%= link_to highlight_query(result.target.value, params[:query]), concept_path(:id => owner) %>
|
6
|
+
<% when Iqvoc::Collection.base_class_name %>
|
7
|
+
<%= link_to highlight_query(result.target.value, params[:query]), collection_path(:id => owner) %>
|
8
|
+
<% end %>
|
9
|
+
<%- if owner.additional_info.present? -%>
|
10
|
+
(<%= owner.additional_info %>)
|
6
11
|
<%- end -%>
|
7
12
|
</dt>
|
8
13
|
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<dt>
|
2
|
+
<% result.annotations.each do |annotation| %>
|
3
|
+
<% if result.owner.is_a?(Concept::Base) %>
|
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 %>
|
10
|
+
<% end %>
|
11
|
+
</dt>
|
12
|
+
<dd><%= t('txt.views.search_results.type') %>: <%= result.class.model_name.human %></dd>
|
@@ -40,6 +40,12 @@
|
|
40
40
|
<%= text_field_tag :q, params[:query] %>
|
41
41
|
<% end %>
|
42
42
|
</li>
|
43
|
+
<li class="result_type_filter">
|
44
|
+
<label><%= t('txt.views.search_results.for') %></label>
|
45
|
+
<%= radio_button_tag 'for', 'concept', params[:for] == "concept" %> <label for="for_concept"><%= Iqvoc::Concept.base_class.model_name.human %></label>
|
46
|
+
<%= radio_button_tag 'for', 'collection', params[:for] == "collection" %> <label for="for_collection"><%= Iqvoc::Collection.base_class.model_name.human %></label>
|
47
|
+
<%= radio_button_tag 'for', 'all', !%w(concept collection).include?(params[:for]) %> <label for="for_all"><%= t("txt.views.search_results.all") %></label>
|
48
|
+
</li>
|
43
49
|
<li>
|
44
50
|
<label for"c"><%= Iqvoc::Collection.base_class.model_name.human %></label>
|
45
51
|
<%= select_tag 'c', options_for_select(@collections.sort { |a, b| a.pref_label.to_s <=> b.pref_label.to_s }.map { |c| [c.pref_label.to_s, c.origin] }, params[:c]), :include_blank => true %>
|
@@ -1,43 +1,29 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
"/opt/local/var/run/mysql5/mysqld.sock",
|
4
|
-
"/tmp/mysqld.sock",
|
5
|
-
"/var/run/mysqld.sock"
|
6
|
-
].detect{ |socket| File.exist?(socket) }
|
7
|
-
} %>
|
8
|
-
|
9
|
-
development: &DEVELOPMENT
|
1
|
+
development:
|
2
|
+
adapter: mysql2
|
10
3
|
encoding: utf8
|
11
|
-
|
12
|
-
password:
|
4
|
+
reconnect: false
|
13
5
|
database: iqvoc_development
|
14
|
-
<% if defined?(JRuby) %>
|
15
|
-
adapter: jdbcmysql
|
16
|
-
hostname: localhost
|
17
|
-
<% else %>
|
18
|
-
adapter: mysql2
|
19
|
-
socket: <%= detect_socket.call %>
|
20
|
-
<% end %>
|
21
|
-
|
22
|
-
# Warning: The database defined as 'test' will be erased and
|
23
|
-
# re-generated from your development database when you run 'rake'.
|
24
|
-
# Do not set this db to the same as development or production.
|
25
|
-
test: &TEST
|
26
|
-
adapter: sqlite3
|
27
|
-
database: db/iqvoc_test.sqlite3
|
28
6
|
pool: 5
|
29
|
-
|
7
|
+
username: root
|
8
|
+
password:
|
9
|
+
hostname: 127.0.0.1
|
30
10
|
|
31
|
-
|
11
|
+
test:
|
12
|
+
adapter: mysql2
|
32
13
|
encoding: utf8
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
14
|
+
reconnect: false
|
15
|
+
database: iqvoc_test
|
16
|
+
pool: 5
|
17
|
+
username: root
|
18
|
+
password:
|
19
|
+
hostname: 127.0.0.1
|
37
20
|
|
38
21
|
production:
|
22
|
+
adapter: mysql2
|
39
23
|
encoding: utf8
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
24
|
+
reconnect: false
|
25
|
+
database: iqvoc_production
|
26
|
+
pool: 5
|
27
|
+
username: root
|
28
|
+
password:
|
29
|
+
hostname: 127.0.0.1
|
data/config/database.yml
CHANGED
@@ -1,40 +1,42 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
# MySQL. Versions 4.1 and 5.0 are recommended.
|
2
|
+
#
|
3
|
+
# Install the MYSQL driver
|
4
|
+
# gem install mysql2
|
5
|
+
#
|
6
|
+
# Ensure the MySQL gem is defined in your Gemfile
|
7
|
+
# gem 'mysql2'
|
8
|
+
#
|
9
|
+
# And be sure to use new-style password hashing:
|
10
|
+
# http://dev.mysql.com/doc/refman/5.0/en/old-client.html
|
11
|
+
development:
|
12
|
+
adapter: mysql2
|
7
13
|
encoding: utf8
|
14
|
+
reconnect: false
|
15
|
+
database: iqvoc_development
|
16
|
+
pool: 5
|
8
17
|
username: root
|
9
18
|
password:
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
<% else %>
|
15
|
-
adapter: mysql2
|
16
|
-
socket: <%= socket %>
|
17
|
-
<% end %>
|
18
|
-
|
19
|
-
# Warning: The database defined as 'test' will be erased and
|
20
|
-
# re-generated from your development database when you run 'rake'.
|
19
|
+
socket: /tmp/mysql.sock
|
20
|
+
|
21
|
+
# Warning: The database defined as "test" will be erased and
|
22
|
+
# re-generated from your development database when you run "rake".
|
21
23
|
# Do not set this db to the same as development or production.
|
22
|
-
test:
|
23
|
-
adapter:
|
24
|
-
# database: ":memory:"
|
25
|
-
database: db/iqvoc_test.sqlite3
|
26
|
-
timeout: 5000
|
27
|
-
|
28
|
-
production_internal:
|
24
|
+
test:
|
25
|
+
adapter: mysql2
|
29
26
|
encoding: utf8
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
27
|
+
reconnect: false
|
28
|
+
database: iqvoc_test
|
29
|
+
pool: 5
|
30
|
+
username: root
|
31
|
+
password:
|
32
|
+
socket: /tmp/mysql.sock
|
34
33
|
|
35
34
|
production:
|
35
|
+
adapter: mysql2
|
36
36
|
encoding: utf8
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
37
|
+
reconnect: false
|
38
|
+
database: iqvoc_production
|
39
|
+
pool: 5
|
40
|
+
username: root
|
41
|
+
password:
|
42
|
+
socket: /tmp/mysql.sock
|
@@ -0,0 +1,29 @@
|
|
1
|
+
development:
|
2
|
+
adapter: mysql2
|
3
|
+
encoding: utf8
|
4
|
+
reconnect: false
|
5
|
+
database: iqvoc_development
|
6
|
+
pool: 5
|
7
|
+
username: root
|
8
|
+
password:
|
9
|
+
hostname: 127.0.0.1
|
10
|
+
|
11
|
+
test:
|
12
|
+
adapter: mysql2
|
13
|
+
encoding: utf8
|
14
|
+
reconnect: false
|
15
|
+
database: iqvoc_test
|
16
|
+
pool: 5
|
17
|
+
username: root
|
18
|
+
password:
|
19
|
+
hostname: 127.0.0.1
|
20
|
+
|
21
|
+
production:
|
22
|
+
adapter: mysql2
|
23
|
+
encoding: utf8
|
24
|
+
reconnect: false
|
25
|
+
database: iqvoc_production
|
26
|
+
pool: 5
|
27
|
+
username: root
|
28
|
+
password:
|
29
|
+
hostname: 127.0.0.1
|
@@ -0,0 +1,17 @@
|
|
1
|
+
development:
|
2
|
+
adapter: sqlite3
|
3
|
+
database: db/iqvoc_development.sqlite3
|
4
|
+
pool: 5
|
5
|
+
timeout: 5000
|
6
|
+
|
7
|
+
test:
|
8
|
+
adapter: sqlite3
|
9
|
+
database: db/iqvoc_test.sqlite3
|
10
|
+
pool: 5
|
11
|
+
timeout: 5000
|
12
|
+
|
13
|
+
production:
|
14
|
+
adapter: sqlite3
|
15
|
+
database: db/iqvoc_production.sqlite3
|
16
|
+
pool: 5
|
17
|
+
timeout: 5000
|
@@ -24,6 +24,7 @@ if Iqvoc.const_defined?(:Application)
|
|
24
24
|
# no regular words or you'll be exposed to dictionary attacks.
|
25
25
|
|
26
26
|
# Run `rake secret` and uncomment the following line
|
27
|
-
|
27
|
+
# Replace the secret-placeholder with your generated token
|
28
|
+
Iqvoc::Application.config.secret_token = 'e31dccdf1caecf25fe01b7ef39e38787b2b21c5f3d5b74d9f44e56de699109141ab30206c07bc68948699618fe55c17b1338462ce7691c7559a65bfc69d929de'
|
28
29
|
|
29
30
|
end
|
@@ -24,6 +24,7 @@ if Iqvoc.const_defined?(:Application)
|
|
24
24
|
# no regular words or you'll be exposed to dictionary attacks.
|
25
25
|
|
26
26
|
# Run `rake secret` and uncomment the following line
|
27
|
-
#
|
27
|
+
# Replace the secret-placeholder with your generated token
|
28
|
+
Iqvoc::Application.config.secret_token = 'S-E-C-R-E-T'
|
28
29
|
|
29
30
|
end
|
@@ -22,6 +22,9 @@ de:
|
|
22
22
|
one: "Konzept"
|
23
23
|
other: "Konzepte"
|
24
24
|
relation:
|
25
|
+
base:
|
26
|
+
one: "Relation"
|
27
|
+
other: "Relationen"
|
25
28
|
skos:
|
26
29
|
broader:
|
27
30
|
mono:
|
@@ -57,6 +60,9 @@ de:
|
|
57
60
|
one: "Alternatives Label"
|
58
61
|
other: "Alternative Labels"
|
59
62
|
match:
|
63
|
+
base:
|
64
|
+
one: "Match"
|
65
|
+
other: "Matches"
|
60
66
|
skos:
|
61
67
|
broad_match:
|
62
68
|
one: "Broader Match"
|