infopark_fiona7 0.71.1.1 → 0.71.1.2
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 473b5c069dec107647330585c7a2d486d58787f8
|
4
|
+
data.tar.gz: 07cc316117ad7a1703d18ee7947e82bceb7d96d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d3b776871dc5e054a165ec9a8ddae50f587aed738b21723aad6752c2f755a3cbf2133e383b49c02ef6a1f62d27c3f5ce435f855e96019e0d7a294aebe1b6b42
|
7
|
+
data.tar.gz: 0772f0b1b25d78663dea2f8ea374cc36eab105e31c07fc5b1a688eb36b89cc3f27052232f049822d8960c6048995dc16198810228113793650de0cfe69a19504
|
@@ -43,42 +43,42 @@
|
|
43
43
|
'commands.release_obj.not_modified_obj': 'Diese Seite wurde nicht geändert. Daher gibt es nichts zu freigeben.',
|
44
44
|
'commands.release_obj.dialog.title': 'Änderungen an dieser Seite veröffentlichen?',
|
45
45
|
'commands.release_obj.dialog.description': 'Eine Arbeitsversion zu veröffentlichen ist endgültig. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
46
|
-
'commands.release_obj.dialog.placeholder': 'Kommentar',
|
46
|
+
'commands.release_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
47
47
|
'commands.release_obj.dialog.confirm': 'Freigeben',
|
48
48
|
'commands.release_obj.failed': 'Freigabe fehlgeschlagen',
|
49
49
|
|
50
50
|
'commands.forward_obj.title': 'Seite weiterleiten',
|
51
51
|
'commands.forward_obj.dialog.title': 'Seite weiterleiten?',
|
52
52
|
'commands.forward_obj.dialog.description': 'Die Arbeitsversion wird an einen weiteren Bearbeiter weitergeleitet. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
53
|
-
'commands.forward_obj.dialog.placeholder': 'Kommentar',
|
53
|
+
'commands.forward_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
54
54
|
'commands.forward_obj.dialog.confirm': 'Weiterleiten',
|
55
55
|
'commands.forward_obj.failed': 'Weiterleitung fehlgeschlagen',
|
56
56
|
|
57
57
|
'commands.reject_obj.title': 'Seite ablehnen',
|
58
58
|
'commands.reject_obj.dialog.title': 'Seite ablehnen?',
|
59
59
|
'commands.reject_obj.dialog.description': 'Die Arbeitsversion wird abgelehnt. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
60
|
-
'commands.reject_obj.dialog.placeholder': 'Kommentar',
|
60
|
+
'commands.reject_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
61
61
|
'commands.reject_obj.dialog.confirm': 'Ablehnen',
|
62
62
|
'commands.reject_obj.failed': 'Ablehnung fehlgeschlagen',
|
63
63
|
|
64
64
|
'commands.sign_obj.title': 'Seite abzeichnen',
|
65
65
|
'commands.sign_obj.dialog.title': 'Seite abzeichnen?',
|
66
66
|
'commands.sign_obj.dialog.description': 'Die eingereichte Version wird abgezeichnet. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
67
|
-
'commands.sign_obj.dialog.placeholder': 'Kommentar',
|
67
|
+
'commands.sign_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
68
68
|
'commands.sign_obj.dialog.confirm': 'Abzeichnen',
|
69
69
|
'commands.sign_obj.failed': 'Abzeichnung fehlgeschlagen',
|
70
70
|
|
71
71
|
'commands.commit_obj.title': 'Seite einreichen',
|
72
72
|
'commands.commit_obj.dialog.title': 'Seite einreichen?',
|
73
73
|
'commands.commit_obj.dialog.description': 'Die Arbeitsversion wird eingereicht. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
74
|
-
'commands.commit_obj.dialog.placeholder': 'Kommentar',
|
74
|
+
'commands.commit_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
75
75
|
'commands.commit_obj.dialog.confirm': 'Einreichen',
|
76
76
|
'commands.commit_obj.failed': 'Einreichung fehlgeschlagen',
|
77
77
|
|
78
78
|
'commands.take_obj.title': 'Seite übernehmen',
|
79
79
|
'commands.take_obj.dialog.title': 'Seite übernehmen?',
|
80
80
|
'commands.take_obj.dialog.description': 'Die Arbeitsversion wird übernommen. Dieser Vorgang kann nicht rückgängig gemacht werden.',
|
81
|
-
'commands.take_obj.dialog.placeholder': 'Kommentar',
|
81
|
+
'commands.take_obj.dialog.placeholder': 'Bitte Kommentar eintragen',
|
82
82
|
'commands.take_obj.dialog.confirm': 'Übernehmen',
|
83
83
|
'commands.take_obj.failed': 'Übernahme fehlgeschlagen'
|
84
84
|
}, 'de');
|
@@ -78,6 +78,8 @@ module Fiona7
|
|
78
78
|
@widget_path_map = resolver.path_map
|
79
79
|
|
80
80
|
if @widget_pool && !@widget_pool.empty?
|
81
|
+
@new_full_text = rewrite_full_text
|
82
|
+
|
81
83
|
@widgets = BatchWidgetWriter.new(@obj, @id_map, @widget_pool, @widget_path_map)
|
82
84
|
@widgets.write
|
83
85
|
|
@@ -254,7 +256,9 @@ module Fiona7
|
|
254
256
|
raise Scrivito::ClientError.new("Unknown attribute type: #{virtual_type}", 418)
|
255
257
|
end
|
256
258
|
end
|
257
|
-
|
259
|
+
if (@new_full_text)
|
260
|
+
@obj.set(:X_full_text, @new_full_text)
|
261
|
+
end
|
258
262
|
@obj.set(:X_widget_pool, @new_widget_pool) if @new_widget_pool
|
259
263
|
@obj.set(:permalink, @permalink) if @permalink
|
260
264
|
|
@@ -286,10 +290,14 @@ module Fiona7
|
|
286
290
|
end
|
287
291
|
|
288
292
|
def rewrite_full_text
|
289
|
-
full_text = ::
|
293
|
+
full_text = ::YAML.load(@obj.attr_values["X_full_text"])
|
294
|
+
full_text = {} unless full_text.kind_of?(Hash)
|
290
295
|
full_text["_widget_pool"] ||= {}
|
291
296
|
full_text["_widget_pool"].deep_merge!(@widget_pool)
|
292
|
-
full_text.
|
297
|
+
full_text.to_yaml
|
298
|
+
rescue => e
|
299
|
+
Rails.logger.error("Unable to store information for search engine: #{e.message}")
|
300
|
+
nil
|
293
301
|
end
|
294
302
|
|
295
303
|
def upload_file(file)
|
@@ -2,11 +2,12 @@ module Fiona7
|
|
2
2
|
module CurrentUserMapHelper
|
3
3
|
def self.groups_for_user(user)
|
4
4
|
user_name = user.id rescue ""
|
5
|
+
return [] if user_name.blank?
|
5
6
|
Reactor::Sudo.su(Fiona7.root) do
|
6
7
|
Reactor::Cache::User.instance.get(user_name).groups
|
7
8
|
end
|
8
9
|
rescue => e
|
9
|
-
Rails.logger.error "Error occured reading user groups of #{user_name} (#{e.message})"
|
10
|
+
Rails.logger.error "Error occured while reading user groups of #{user_name} (#{e.message})"
|
10
11
|
[]
|
11
12
|
end
|
12
13
|
end
|
@@ -13,17 +13,23 @@ require 'fiona7/widget_resolver'
|
|
13
13
|
module Fiona7
|
14
14
|
module JSON
|
15
15
|
class ObjDecorator
|
16
|
-
def initialize(klass, obj)
|
16
|
+
def initialize(klass, obj, widget_resolver=nil)
|
17
17
|
@klass = klass
|
18
18
|
@obj = obj
|
19
19
|
|
20
20
|
@link_converter = LinkConverter::FionaToScrivito.new(obj)
|
21
|
+
|
22
|
+
if widget_resolver
|
23
|
+
@widget_resolver = widget_resolver
|
24
|
+
elsif (widget_links = @obj.attr_values["X_widget_pool"])
|
25
|
+
@widget_resolver = WidgetResolver.new(widget_links, @klass)
|
26
|
+
end
|
21
27
|
end
|
22
28
|
|
23
29
|
def as_json(*args)
|
24
|
-
attrs = standard_attrs
|
25
|
-
add_custom_attributes(attrs, *args)
|
30
|
+
@attrs = attrs = standard_attrs
|
26
31
|
replace_widget_pool(attrs, *args)
|
32
|
+
add_custom_attributes(attrs, *args)
|
27
33
|
|
28
34
|
attrs
|
29
35
|
end
|
@@ -150,7 +156,14 @@ module Fiona7
|
|
150
156
|
widget_ids = []
|
151
157
|
widgets = linklist.map do |link|
|
152
158
|
widget_id = link["title"]
|
153
|
-
|
159
|
+
# sometimes a released page references an unreleased widget
|
160
|
+
# it is then impossible to load it into widget_pool
|
161
|
+
# but the reference in the widgetlist field is still there
|
162
|
+
# therefore we need to check if the widget has been loaded
|
163
|
+
# into the pool - only then it can be included
|
164
|
+
if valid_widget_id?(widget_id)
|
165
|
+
widget_ids << widget_id
|
166
|
+
end
|
154
167
|
end
|
155
168
|
|
156
169
|
widget_ids
|
@@ -170,10 +183,14 @@ module Fiona7
|
|
170
183
|
end
|
171
184
|
end
|
172
185
|
|
186
|
+
def valid_widget_id?(widget_id)
|
187
|
+
@widget_resolver && @widget_resolver.path_map[widget_id]
|
188
|
+
end
|
189
|
+
|
173
190
|
def replace_widget_pool(attrs, *args)
|
174
|
-
if (widget_links = @obj.attr_values["X_widget_pool"])
|
191
|
+
if (widget_links = @obj.attr_values["X_widget_pool"]) && @widget_resolver
|
175
192
|
|
176
|
-
resolver =
|
193
|
+
resolver = @widget_resolver
|
177
194
|
|
178
195
|
Assert.success(
|
179
196
|
resolver.instance_map.all? {|_, instance| !instance.nil?},
|
@@ -182,7 +199,7 @@ module Fiona7
|
|
182
199
|
|
183
200
|
result = Hash[
|
184
201
|
resolver.instance_map.map {|widget_id, widget|
|
185
|
-
[widget_id, WidgetDecorator.new(@klass, widget).as_json(*args)]
|
202
|
+
[widget_id, WidgetDecorator.new(@klass, widget, @widget_resolver).as_json(*args)]
|
186
203
|
}
|
187
204
|
]
|
188
205
|
|
data/lib/fiona7/version.rb
CHANGED
@@ -33,7 +33,7 @@ module Fiona7
|
|
33
33
|
widget_id_to_object_id_map.map {|widget_id, obj_id|
|
34
34
|
object = object_id_to_widget_instance_map[obj_id]
|
35
35
|
if !object
|
36
|
-
Rails.logger.error("Unable to find widget with id #{widget_id} (obj_id = #{
|
36
|
+
Rails.logger.error("Unable to find widget with id #{widget_id} (obj_id = #{obj_id})")
|
37
37
|
next
|
38
38
|
end
|
39
39
|
[widget_id, object]
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infopark_fiona7
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.71.1.
|
4
|
+
version: 0.71.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomasz Przedmojski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|