iqvoc_skosxl 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2f14622bd5b6659d1a10c80eaaf7aa726c9949ff
4
- data.tar.gz: 4322450f8ac9646e001bc4ae296daf1e03c561bc
3
+ metadata.gz: 30a0db365c1f573222b93a3963683ca8331a05b4
4
+ data.tar.gz: d3fc2c276bf9e31adb3f82ccf7804db9a3d361eb
5
5
  SHA512:
6
- metadata.gz: 0c3f60e5c7ab2eea9f0c2b8b78c1041ad5d8c8f6c5d4f01621ac5c89169c56e278efa3e33d6c4063d5c90141843930a13c1e376ed288f115626fe0ddae3441d3
7
- data.tar.gz: f9f04483cfe7df69c2891d96cc557ade4a11dda2e4321bfec1057d9c3796b0028b5adc85ad5650d02b4fec48ab4f215c38c80fda796012830476a4c91ec76958
6
+ metadata.gz: a26f186fb956734a1a6a1242656bd7d79d4ceae86a00491d0c4276ed57ff10e1c3cd308ed27c89a8d5f1093c7f43f136be2462b490638bb523d5033b6a1a44ac
7
+ data.tar.gz: 6c1979e28285db24712fdca025645629cc38f218a969a2e9f374e831ff0579f35d4f6e6646d2369ae8fb06a97e0806064fc07a3314894e84a7f7c277ab9d827a
data/Gemfile CHANGED
@@ -1,20 +1,22 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- gem 'iqvoc', '~> 4.8.0', :github => 'innoq/iqvoc'
3
+ gem 'iqvoc', '~> 4.9.0', :github => 'innoq/iqvoc', branch: 'master'
4
+
5
+ platforms :ruby do
6
+ gem 'mysql2'
7
+ gem 'sqlite3'
8
+ gem 'pg'
9
+ end
10
+
11
+ platforms :jruby do
12
+ gem 'activerecord-jdbcsqlite3-adapter'
13
+ gem 'activerecord-jdbcmysql-adapter'
14
+ gem 'activerecord-jdbcpostgresql-adapter', '~> 1.3.13'
15
+ end
4
16
 
5
17
  group :development, :test do
6
18
  gem 'awesome_print'
7
- gem 'spring'
8
19
  gem 'pry-rails'
9
-
10
- platforms :ruby do
11
- gem 'mysql2'
12
- gem 'sqlite3'
13
- end
14
- platforms :jruby do
15
- gem 'activerecord-jdbcsqlite3-adapter'
16
- gem 'activerecord-jdbcmysql-adapter'
17
- end
18
20
  end
19
21
 
20
22
  group :test do
data/Gemfile.lock CHANGED
@@ -1,10 +1,12 @@
1
1
  GIT
2
2
  remote: git://github.com/innoq/iqvoc.git
3
- revision: 2c318aa4315dd44af73797b8a05eb0c20b82ac5d
3
+ revision: 866b343dc8d2b913dbfa40887137c4a89005dd32
4
+ branch: master
4
5
  specs:
5
- iqvoc (4.8.2)
6
+ iqvoc (4.9.0)
6
7
  apipie-rails
7
8
  authlogic (~> 3.4.2)
9
+ autoprefixer-rails (~> 5.1.8)
8
10
  bootstrap-sass (~> 3.3.1.0)
9
11
  bootstrap_form (~> 2.2.0)
10
12
  bundler
@@ -12,7 +14,7 @@ GIT
12
14
  carrierwave
13
15
  database_cleaner
14
16
  delayed_job_active_record (~> 4.0.1)
15
- faraday
17
+ faraday (= 0.9.0)
16
18
  faraday_middleware
17
19
  font-awesome-rails (~> 4.2.0)
18
20
  iq_rdf (>= 0.1.15)
@@ -31,64 +33,73 @@ GIT
31
33
  GEM
32
34
  remote: https://rubygems.org/
33
35
  specs:
34
- actionmailer (4.2.0)
35
- actionpack (= 4.2.0)
36
- actionview (= 4.2.0)
37
- activejob (= 4.2.0)
36
+ actionmailer (4.2.1)
37
+ actionpack (= 4.2.1)
38
+ actionview (= 4.2.1)
39
+ activejob (= 4.2.1)
38
40
  mail (~> 2.5, >= 2.5.4)
39
41
  rails-dom-testing (~> 1.0, >= 1.0.5)
40
- actionpack (4.2.0)
41
- actionview (= 4.2.0)
42
- activesupport (= 4.2.0)
43
- rack (~> 1.6.0)
42
+ actionpack (4.2.1)
43
+ actionview (= 4.2.1)
44
+ activesupport (= 4.2.1)
45
+ rack (~> 1.6)
44
46
  rack-test (~> 0.6.2)
45
47
  rails-dom-testing (~> 1.0, >= 1.0.5)
46
48
  rails-html-sanitizer (~> 1.0, >= 1.0.1)
47
- actionview (4.2.0)
48
- activesupport (= 4.2.0)
49
+ actionview (4.2.1)
50
+ activesupport (= 4.2.1)
49
51
  builder (~> 3.1)
50
52
  erubis (~> 2.7.0)
51
53
  rails-dom-testing (~> 1.0, >= 1.0.5)
52
54
  rails-html-sanitizer (~> 1.0, >= 1.0.1)
53
- activejob (4.2.0)
54
- activesupport (= 4.2.0)
55
+ activejob (4.2.1)
56
+ activesupport (= 4.2.1)
55
57
  globalid (>= 0.3.0)
56
- activemodel (4.2.0)
57
- activesupport (= 4.2.0)
58
+ activemodel (4.2.1)
59
+ activesupport (= 4.2.1)
58
60
  builder (~> 3.1)
59
- activerecord (4.2.0)
60
- activemodel (= 4.2.0)
61
- activesupport (= 4.2.0)
61
+ activerecord (4.2.1)
62
+ activemodel (= 4.2.1)
63
+ activesupport (= 4.2.1)
62
64
  arel (~> 6.0)
63
- activerecord-jdbc-adapter (1.3.7)
65
+ activerecord-jdbc-adapter (1.3.14)
64
66
  activerecord (>= 2.2)
65
- activerecord-jdbcmysql-adapter (1.3.7)
66
- activerecord-jdbc-adapter (~> 1.3.7)
67
+ activerecord-jdbcmysql-adapter (1.3.14)
68
+ activerecord-jdbc-adapter (~> 1.3.14)
67
69
  jdbc-mysql (>= 5.1.22)
68
- activerecord-jdbcsqlite3-adapter (1.3.7)
69
- activerecord-jdbc-adapter (~> 1.3.7)
70
- jdbc-sqlite3 (~> 3.7.2)
71
- activesupport (4.2.0)
70
+ activerecord-jdbcpostgresql-adapter (1.3.14)
71
+ activerecord-jdbc-adapter (~> 1.3.14)
72
+ jdbc-postgres (>= 9.1)
73
+ activerecord-jdbcsqlite3-adapter (1.3.14)
74
+ activerecord-jdbc-adapter (~> 1.3.14)
75
+ jdbc-sqlite3 (>= 3.7.2, < 3.9)
76
+ activesupport (4.2.1)
72
77
  i18n (~> 0.7)
73
78
  json (~> 1.7, >= 1.7.7)
74
79
  minitest (~> 5.1)
75
80
  thread_safe (~> 0.3, >= 0.3.4)
76
81
  tzinfo (~> 1.1)
77
- apipie-rails (0.3.1)
82
+ addressable (2.3.8)
83
+ apipie-rails (0.3.4)
78
84
  json
79
85
  arel (6.0.0)
80
- authlogic (3.4.4)
86
+ authlogic (3.4.5)
81
87
  activerecord (>= 3.2)
82
88
  activesupport (>= 3.2)
83
89
  request_store (~> 1.0)
84
90
  scrypt (~> 1.2)
85
- awesome_print (1.2.0)
91
+ autoprefixer-rails (5.1.11)
92
+ execjs
93
+ json
94
+ awesome_print (1.6.1)
95
+ bcp47 (0.3.3)
96
+ i18n
86
97
  bootstrap-sass (3.3.1.0)
87
98
  sass (~> 3.2)
88
99
  bootstrap_form (2.2.0)
89
100
  builder (3.2.2)
90
101
  cancancan (1.10.1)
91
- capybara (2.3.0)
102
+ capybara (2.4.4)
92
103
  mime-types (>= 1.16)
93
104
  nokogiri (>= 1.3.3)
94
105
  rack (>= 1.0.0)
@@ -101,36 +112,34 @@ GEM
101
112
  mime-types (>= 1.16)
102
113
  cliver (0.3.2)
103
114
  coderay (1.1.0)
104
- database_cleaner (1.4.0)
115
+ database_cleaner (1.4.1)
105
116
  delayed_job (4.0.6)
106
117
  activesupport (>= 3.0, < 5.0)
107
118
  delayed_job_active_record (4.0.3)
108
119
  activerecord (>= 3.0, < 5.0)
109
120
  delayed_job (>= 3.0, < 4.1)
110
- ebnf (0.3.6)
111
- haml (~> 4.0)
121
+ ebnf (0.3.9)
112
122
  rdf (~> 1.1)
113
123
  sxp (~> 0.1, >= 0.1.3)
114
- equivalent-xml (0.5.1)
124
+ equivalent-xml (0.6.0)
115
125
  nokogiri (>= 1.4.3)
116
126
  erubis (2.7.0)
117
- execjs (2.2.2)
118
- faraday (0.9.1)
127
+ execjs (2.5.2)
128
+ faraday (0.9.0)
119
129
  multipart-post (>= 1.2, < 3)
120
130
  faraday_middleware (0.9.1)
121
131
  faraday (>= 0.7.4, < 0.10)
122
- ffi (1.9.6)
123
- ffi (1.9.6-java)
132
+ ffi (1.9.8)
133
+ ffi (1.9.8-java)
124
134
  ffi-compiler (0.1.3)
125
135
  ffi (>= 1.0.0)
126
136
  rake
127
137
  font-awesome-rails (4.2.0.0)
128
138
  railties (>= 3.2, < 5.0)
129
- globalid (0.3.0)
139
+ globalid (0.3.5)
130
140
  activesupport (>= 4.1.0)
131
141
  haml (4.0.6)
132
142
  tilt
133
- hike (1.2.3)
134
143
  htmlentities (4.3.3)
135
144
  i18n (0.7.0)
136
145
  iq_rdf (0.1.15)
@@ -138,121 +147,126 @@ GEM
138
147
  builder
139
148
  bundler
140
149
  iq_triplestorage (0.2.2)
141
- jdbc-mysql (5.1.30)
142
- jdbc-sqlite3 (3.7.2.1)
150
+ jdbc-mysql (5.1.33)
151
+ jdbc-postgres (9.3.1102)
152
+ jdbc-sqlite3 (3.8.7)
143
153
  json (1.8.2)
144
154
  json (1.8.2-java)
145
- json-ld (1.1.7)
146
- rdf (~> 1.1, >= 1.1.4)
147
- kaminari (0.16.2)
155
+ json-ld (1.1.8)
156
+ rdf (~> 1.1, >= 1.1.7)
157
+ kaminari (0.16.3)
148
158
  actionpack (>= 3.0.0)
149
159
  activesupport (>= 3.0.0)
150
160
  kaminari-bootstrap (3.0.1)
151
161
  kaminari (>= 0.13.0)
152
162
  rails
153
163
  link_header (0.0.8)
154
- linkeddata (1.1.2)
155
- equivalent-xml (~> 0.4)
156
- json-ld (~> 1.1, >= 1.1.7)
164
+ linkeddata (1.1.11)
165
+ equivalent-xml (~> 0.5)
166
+ json-ld (~> 1.1, >= 1.1.8)
157
167
  nokogiri (~> 1.6)
158
- rdf (~> 1.1, >= 1.1.7)
168
+ rdf (~> 1.1, >= 1.1.11)
159
169
  rdf-aggregate-repo (~> 1.1)
160
170
  rdf-isomorphic (~> 1.1)
161
- rdf-json (~> 1.1)
162
- rdf-microdata (~> 2.0)
163
- rdf-n3 (~> 1.1)
164
- rdf-rdfa (~> 1.1, >= 1.1.5)
165
- rdf-rdfxml (~> 1.1, >= 1.1.3)
171
+ rdf-json (~> 1.1, >= 1.1.2)
172
+ rdf-microdata (~> 2.0, >= 2.0.1)
173
+ rdf-n3 (~> 1.1, >= 1.1.3)
174
+ rdf-rdfa (~> 1.1, >= 1.1.6)
175
+ rdf-rdfxml (~> 1.1, >= 1.1.4)
166
176
  rdf-reasoner (~> 0.2, >= 0.2.1)
167
- rdf-trig (~> 1.1, >= 1.1.3)
177
+ rdf-tabular (~> 0.1, >= 0.1.2)
178
+ rdf-trig (~> 1.1, >= 1.1.4)
168
179
  rdf-trix (~> 1.1)
169
- rdf-turtle (~> 1.1, >= 1.1.5)
170
- sparql (~> 1.1, >= 1.1.4)
180
+ rdf-turtle (~> 1.1, >= 1.1.6)
181
+ rdf-vocab (~> 0.8)
182
+ rdf-xsd (~> 1.1, >= 1.1.3)
183
+ sparql (~> 1.1, >= 1.1.5)
171
184
  sparql-client (~> 1.1, >= 1.1.3)
172
- loofah (2.0.1)
185
+ loofah (2.0.2)
173
186
  nokogiri (>= 1.5.9)
174
187
  mail (2.6.3)
175
188
  mime-types (>= 1.16, < 3)
176
189
  maruku (0.7.2)
177
190
  method_source (0.8.2)
178
- mime-types (2.4.3)
191
+ mime-types (2.5)
179
192
  mini_portile (0.6.2)
180
- minitest (5.5.1)
181
- multi_json (1.10.1)
193
+ minitest (5.6.1)
194
+ multi_json (1.11.0)
182
195
  multipart-post (2.0.0)
183
- mysql2 (0.3.16)
196
+ mysql2 (0.3.17)
184
197
  net-http-persistent (2.9.4)
185
198
  nokogiri (1.6.6.2)
186
199
  mini_portile (~> 0.6.0)
187
200
  nokogiri (1.6.6.2-java)
201
+ pg (0.18.1)
188
202
  poltergeist (1.5.1)
189
203
  capybara (~> 2.1)
190
204
  cliver (~> 0.3.1)
191
205
  multi_json (~> 1.0)
192
206
  websocket-driver (>= 0.2.0)
193
- pry (0.9.12.6)
194
- coderay (~> 1.0)
195
- method_source (~> 0.8)
207
+ pry (0.10.1)
208
+ coderay (~> 1.1.0)
209
+ method_source (~> 0.8.1)
196
210
  slop (~> 3.4)
197
- pry (0.9.12.6-java)
198
- coderay (~> 1.0)
199
- method_source (~> 0.8)
211
+ pry (0.10.1-java)
212
+ coderay (~> 1.1.0)
213
+ method_source (~> 0.8.1)
200
214
  slop (~> 3.4)
201
215
  spoon (~> 0.0)
202
- pry-rails (0.3.2)
216
+ pry-rails (0.3.3)
203
217
  pry (>= 0.9.10)
204
- rack (1.6.0)
218
+ rack (1.6.1)
205
219
  rack-test (0.6.3)
206
220
  rack (>= 1.0)
207
- rails (4.2.0)
208
- actionmailer (= 4.2.0)
209
- actionpack (= 4.2.0)
210
- actionview (= 4.2.0)
211
- activejob (= 4.2.0)
212
- activemodel (= 4.2.0)
213
- activerecord (= 4.2.0)
214
- activesupport (= 4.2.0)
221
+ rails (4.2.1)
222
+ actionmailer (= 4.2.1)
223
+ actionpack (= 4.2.1)
224
+ actionview (= 4.2.1)
225
+ activejob (= 4.2.1)
226
+ activemodel (= 4.2.1)
227
+ activerecord (= 4.2.1)
228
+ activesupport (= 4.2.1)
215
229
  bundler (>= 1.3.0, < 2.0)
216
- railties (= 4.2.0)
230
+ railties (= 4.2.1)
217
231
  sprockets-rails
218
232
  rails-deprecated_sanitizer (1.0.3)
219
233
  activesupport (>= 4.2.0.alpha)
220
- rails-dom-testing (1.0.5)
234
+ rails-dom-testing (1.0.6)
221
235
  activesupport (>= 4.2.0.beta, < 5.0)
222
236
  nokogiri (~> 1.6.0)
223
237
  rails-deprecated_sanitizer (>= 1.0.1)
224
- rails-html-sanitizer (1.0.1)
238
+ rails-html-sanitizer (1.0.2)
225
239
  loofah (~> 2.0)
226
240
  rails_autolink (1.1.6)
227
241
  rails (> 3.1)
228
- railties (4.2.0)
229
- actionpack (= 4.2.0)
230
- activesupport (= 4.2.0)
242
+ railties (4.2.1)
243
+ actionpack (= 4.2.1)
244
+ activesupport (= 4.2.1)
231
245
  rake (>= 0.8.7)
232
246
  thor (>= 0.18.1, < 2.0)
233
247
  rake (10.4.2)
234
- rdf (1.1.7)
248
+ rdf (1.1.13)
235
249
  link_header (~> 0.0, >= 0.0.8)
236
250
  rdf-aggregate-repo (1.1.0)
237
251
  rdf (>= 1.1)
238
252
  rdf-isomorphic (1.1.0)
239
253
  rdf (>= 1.1)
240
- rdf-json (1.1.1)
254
+ rdf-json (1.1.2)
241
255
  rdf (~> 1.1)
242
- rdf-microdata (2.0)
256
+ rdf-microdata (2.0.1)
243
257
  htmlentities (~> 4.3)
244
258
  nokogiri (~> 1.6)
245
259
  rdf (~> 1.1)
246
260
  rdf-xsd (~> 1.1)
247
- rdf-n3 (1.1.2)
261
+ rdf-n3 (1.1.3)
248
262
  rdf (~> 1.1, >= 1.1.5)
249
- rdf-rdfa (1.1.5)
263
+ rdf-rdfa (1.1.6)
250
264
  haml (~> 4.0)
251
265
  htmlentities (~> 4.3)
252
266
  rdf (~> 1.1, >= 1.1.6)
253
- rdf-aggregate-repo
267
+ rdf-aggregate-repo (~> 1.1)
254
268
  rdf-xsd (~> 1.1)
255
- rdf-rdfxml (1.1.3)
269
+ rdf-rdfxml (1.1.4)
256
270
  htmlentities (~> 4.3)
257
271
  rdf (~> 1.1, >= 1.1.6)
258
272
  rdf-rdfa (~> 1.1, >= 1.1.4.1)
@@ -261,20 +275,28 @@ GEM
261
275
  rdf (~> 1.1, >= 1.1.4.2)
262
276
  rdf-turtle (~> 1.1)
263
277
  rdf-xsd (~> 1.1)
264
- rdf-trig (1.1.3.1)
265
- ebnf (~> 0.3, >= 0.3.5)
266
- rdf (~> 1.1, >= 1.1.2.1)
267
- rdf-turtle (~> 1.1, >= 1.1.3)
278
+ rdf-tabular (0.1.3.1)
279
+ addressable (~> 2.3)
280
+ bcp47 (~> 0.3, >= 0.3.3)
281
+ json-ld (~> 1.1)
282
+ rdf (~> 1.1, >= 1.1.7)
283
+ rdf-xsd (~> 1.1)
284
+ rdf-trig (1.1.4)
285
+ ebnf (~> 0.3, >= 0.3.7)
286
+ rdf (~> 1.1, >= 1.1.11)
287
+ rdf-turtle (~> 1.1, >= 1.1.6)
268
288
  rdf-trix (1.1.0)
269
289
  rdf (>= 1.1)
270
- rdf-turtle (1.1.5)
290
+ rdf-turtle (1.1.6)
271
291
  ebnf (~> 0.3, >= 0.3.6)
272
- rdf (~> 1.1, >= 1.1.4)
273
- rdf-xsd (1.1.2)
274
- rdf (~> 1.1)
292
+ rdf (~> 1.1, >= 1.1.10)
293
+ rdf-vocab (0.8.2)
294
+ rdf (~> 1.1, >= 1.1.10)
295
+ rdf-xsd (1.1.3)
296
+ rdf (~> 1.1, >= 1.1.9)
275
297
  request_store (1.1.0)
276
- sass (3.4.10)
277
- sass-rails (5.0.1)
298
+ sass (3.4.13)
299
+ sass-rails (5.0.3)
278
300
  railties (>= 4.0.0, < 5.0)
279
301
  sass (~> 3.1)
280
302
  sprockets (>= 2.8, < 4.0)
@@ -283,43 +305,42 @@ GEM
283
305
  scrypt (1.2.1)
284
306
  ffi-compiler (>= 0.0.2)
285
307
  rake
286
- slop (3.5.0)
287
- sparql (1.1.4)
288
- builder (~> 3.0)
289
- ebnf (~> 0.3, >= 0.3.5)
290
- rdf (~> 1.1, >= 1.1.4)
308
+ slop (3.6.0)
309
+ sparql (1.1.7)
310
+ builder (~> 3.2)
311
+ ebnf (~> 0.3, >= 0.3.9)
312
+ rdf (~> 1.1, >= 1.1.13)
291
313
  rdf-aggregate-repo (~> 1.1, >= 1.1.0)
292
314
  rdf-xsd (~> 1.1)
293
315
  sparql-client (~> 1.1)
294
316
  sxp (~> 0.1)
295
- sparql-client (1.1.3.1)
317
+ sparql-client (1.1.5)
296
318
  net-http-persistent (~> 2.9)
297
319
  rdf (~> 1.1)
298
320
  spoon (0.0.4)
299
321
  ffi
300
- spring (1.1.3)
301
- sprockets (2.12.3)
302
- hike (~> 1.2)
303
- multi_json (~> 1.0)
322
+ sprockets (3.1.0)
304
323
  rack (~> 1.0)
305
- tilt (~> 1.1, != 1.3.0)
306
- sprockets-rails (2.2.4)
324
+ sprockets-rails (2.3.1)
307
325
  actionpack (>= 3.0)
308
326
  activesupport (>= 3.0)
309
327
  sprockets (>= 2.8, < 4.0)
310
- sqlite3 (1.3.9)
328
+ sqlite3 (1.3.10)
311
329
  sxp (0.1.5)
312
330
  thor (0.19.1)
313
- thread_safe (0.3.4)
314
- thread_safe (0.3.4-java)
331
+ thread_safe (0.3.5)
332
+ thread_safe (0.3.5-java)
315
333
  tilt (1.4.1)
316
334
  tzinfo (1.2.2)
317
335
  thread_safe (~> 0.1)
318
- uglifier (2.7.0)
336
+ uglifier (2.7.1)
319
337
  execjs (>= 0.3.0)
320
338
  json (>= 1.8.0)
321
- websocket-driver (0.3.3)
322
- websocket-driver (0.3.3-java)
339
+ websocket-driver (0.5.1)
340
+ websocket-extensions (>= 0.1.0)
341
+ websocket-driver (0.5.1-java)
342
+ websocket-extensions (>= 0.1.0)
343
+ websocket-extensions (0.1.1)
323
344
  xpath (2.0.0)
324
345
  nokogiri (~> 1.3)
325
346
 
@@ -329,12 +350,16 @@ PLATFORMS
329
350
 
330
351
  DEPENDENCIES
331
352
  activerecord-jdbcmysql-adapter
353
+ activerecord-jdbcpostgresql-adapter (~> 1.3.13)
332
354
  activerecord-jdbcsqlite3-adapter
333
355
  awesome_print
334
356
  capybara
335
- iqvoc (~> 4.8.0)!
357
+ iqvoc (~> 4.9.0)!
336
358
  mysql2
359
+ pg
337
360
  poltergeist (~> 1.5.0)
338
361
  pry-rails
339
- spring
340
362
  sqlite3
363
+
364
+ BUNDLED WITH
365
+ 1.10.6
@@ -1,3 +1,4 @@
1
+ @import 'iqvoc/settings/bootstrap-variables';
1
2
  @import 'framework';
2
3
  @import 'iqvoc/manifest';
3
4
  @import 'iqvoc_skosxl/manifest';
@@ -47,6 +47,14 @@ class Labels::VersionsController < ApplicationController
47
47
  ActiveRecord::Base.transaction do
48
48
  new_version = current_label.branch(current_user)
49
49
  new_version.save!
50
+ Iqvoc.change_note_class.create! do |note|
51
+ note.owner = new_version
52
+ note.language = I18n.locale.to_s
53
+ note.annotations_attributes = [
54
+ { namespace: 'dct', predicate: 'creator', value: current_user.name },
55
+ { namespace: 'dct', predicate: 'modified', value: DateTime.now.to_s }
56
+ ]
57
+ end
50
58
  end
51
59
  flash[:success] = t('txt.controllers.versioning.branched')
52
60
  redirect_to edit_label_path(published: 0, id: new_version, check_associations_in_editing_mode: true)
@@ -16,7 +16,7 @@ class LabelsController < ApplicationController
16
16
  end
17
17
  format.text do
18
18
  render content_type: 'text/plain',
19
- text: @labels.map { |label| "#{label.origin}: #{label.value}" }.join("\n")
19
+ text: @labels.map { |label| "#{label.origin}: #{label.value}" }.join("\n")
20
20
  end
21
21
  format.json do
22
22
  response = []
@@ -28,20 +28,23 @@ class LabelsController < ApplicationController
28
28
  end
29
29
 
30
30
  def show
31
- if params[:published] == '1' || !params[:published]
32
- published = true
33
- @label = Iqvoc::XLLabel.base_class.by_origin(params[:id]).published.last
31
+ scope = Iqvoc::XLLabel.base_class.by_origin(params[:id]).with_associations
32
+
33
+ @published = params[:published] == '1' || !params[:published]
34
+ if @published
35
+ scope = scope.published
34
36
  @new_label_version = Iqvoc::XLLabel.base_class.by_origin(params[:id]).unpublished.last
35
- elsif params[:published] == '0'
36
- published = false
37
- @label = Iqvoc::XLLabel.base_class.by_origin(params[:id]).unpublished.last!
37
+ else
38
+ scope = scope.unpublished
38
39
  end
39
40
 
41
+ @label = scope.last!
42
+
40
43
  authorize! :read, @label
41
44
 
42
45
  respond_to do |format|
43
46
  format.html do
44
- published ? render('show_published') : render('show_unpublished')
47
+ @published ? render('show_published') : render('show_unpublished')
45
48
  end
46
49
  format.ttl
47
50
  end
@@ -49,10 +52,7 @@ class LabelsController < ApplicationController
49
52
 
50
53
  def new
51
54
  authorize! :create, Iqvoc::XLLabel.base_class
52
- raise 'You have to specify a language parameter!' if params[:language].blank?
53
- data = {language: params[:language]}
54
- data.merge(value: params[:value]) if params[:value]
55
- @label = Iqvoc::XLLabel.base_class.new(data)
55
+ @label = Iqvoc::XLLabel.base_class.new
56
56
  end
57
57
 
58
58
  def create
@@ -99,6 +99,9 @@ class LabelsController < ApplicationController
99
99
  @label = Iqvoc::XLLabel.base_class.by_origin(params[:id]).unpublished.last!
100
100
  authorize! :update, @label
101
101
 
102
+ # set to_review to false if someone edits a label
103
+ label_params["to_review"] = "false"
104
+
102
105
  respond_to do |format|
103
106
  format.html do
104
107
  if @label.update_attributes(label_params)
@@ -37,14 +37,14 @@ module Concept
37
37
  def labelings_by_id(relation_name, language)
38
38
  (@labelings_by_id && @labelings_by_id[relation_name] && @labelings_by_id[relation_name][language]) ||
39
39
  self.send(relation_name).by_label_language(language).
40
- map { |l| l.target.origin }.join(InlineDataHelper::JOINER)
40
+ map { |l| l.target.origin if l.target.published?}.join(InlineDataHelper::JOINER)
41
41
  end
42
42
 
43
43
  def valid_label_language
44
44
  (@labelings_by_id || {}).each { |labeling_class_name, origin_mappings|
45
45
  origin_mappings.each { |language, new_origins|
46
46
  new_origins = new_origins.split(InlineDataHelper::SPLITTER)
47
- Iqvoc::XLLabel.base_class.by_origin(new_origins).each do |label|
47
+ Iqvoc::XLLabel.base_class.by_origin(new_origins).published.each do |label|
48
48
  if label.language != language.to_s
49
49
  errors.add(:base,
50
50
  I18n.t('txt.controllers.versioned_concept.label_error') % label)
@@ -101,18 +101,39 @@ class Label::SKOSXL::Base < Label::Base
101
101
 
102
102
  # ********** Methods
103
103
 
104
- # def self.single_query(params = {})
105
- # query_str = build_query_string(params)
106
- #
107
- # by_query_value(query_str).
108
- # by_language(params[:languages].to_a).
109
- # published.
110
- # order("LOWER(#{Label::Base.table_name}.value)")
111
- # end
112
-
113
- # def self.search_result_partial_name
114
- # 'partials/labeling/skosxl/search_result'
115
- # end
104
+ def self.single_query(params = {})
105
+ query_str = build_query_string(params)
106
+
107
+ scope = by_query_value(query_str).
108
+ by_language(params[:languages].to_a).includes(:concepts).references(:concepts)
109
+ published.
110
+ order("LOWER(#{Label::Base.table_name}.value)")
111
+
112
+ if params[:collection_origin].present?
113
+ collection = Collection::Base.where(origin: params[:collection_origin]).last
114
+ if collection
115
+ scope = scope.includes(concepts: [ collections: { collection_members: :collection } ])
116
+ scope = scope.where("#{Collection::Member::Base.table_name}.collection_id" => collection.id)
117
+ else
118
+ raise "Collection with Origin #{params[:collection_origin]} not found!"
119
+ end
120
+ end
121
+
122
+ # apply search entity type
123
+ case params[:for]
124
+ when 'concept'
125
+ scope = scope.includes(:concepts).merge(Iqvoc::Concept.base_class.published)
126
+ when 'collection'
127
+ scope = scope.includes(:concepts).merge(Iqvoc::Collection.base_class.published)
128
+ end
129
+
130
+ scope = yield(scope) if block_given?
131
+ scope.map { |result| SearchResult.new(result) }
132
+ end
133
+
134
+ def self.search_result_partial_name
135
+ 'partials/label/skosxl/search_result'
136
+ end
116
137
 
117
138
  def self.new_link_partial_name
118
139
  'partials/label/skosxl/new_link_base'