radiant-fabulator-extension 0.0.9 → 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/VERSION +1 -1
- data/app/models/fabulator_page.rb +5 -15
- data/config/routes.rb +0 -3
- data/lib/fabulator/radiant/actions/page.rb +1 -0
- metadata +4 -4
data/History.txt
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.10
|
@@ -230,8 +230,6 @@ class FabulatorPage < Page
|
|
230
230
|
tag 'for-each' do |tag|
|
231
231
|
selection = tag.attr['select']
|
232
232
|
c = get_fabulator_context(tag)
|
233
|
-
#Rails.logger.info("context: #{YAML::dump(c)}")
|
234
|
-
#Rails.logger.info("for-each: #{selection} from #{c}")
|
235
233
|
ns = get_fabulator_ns(tag)
|
236
234
|
items = c.nil? ? [] : c.eval_expression(selection)
|
237
235
|
sort_by = tag.attr['sort']
|
@@ -271,7 +269,11 @@ class FabulatorPage < Page
|
|
271
269
|
selection = tag.attr['select']
|
272
270
|
c = get_fabulator_context(tag)
|
273
271
|
items = c.nil? ? [] : c.eval_expression(selection)
|
274
|
-
|
272
|
+
if tag.attr['raw']
|
273
|
+
items.collect{|i| c.with_root(i).to([Fabulator::FAB_NS, 'string']).root.value }.join('')
|
274
|
+
else
|
275
|
+
items.collect{|i| c.with_root(i).to([Fabulator::FAB_NS, 'html']).root.value }.join('')
|
276
|
+
end
|
275
277
|
end
|
276
278
|
|
277
279
|
desc %{
|
@@ -341,11 +343,7 @@ private
|
|
341
343
|
if c.nil?
|
342
344
|
c = tag.globals.page
|
343
345
|
end
|
344
|
-
#Rails.logger.info("page: #{c}")
|
345
|
-
#Rails.logger.info("state machine: #{c.state_machine}")
|
346
|
-
#Rails.logger.info("namespaces: #{c.state_machine.namespaces}")
|
347
346
|
ret = (c.state_machine.namespaces rescue { })
|
348
|
-
#Rails.logger.info("get_fabulator_ns: [#{ret}]")
|
349
347
|
ret
|
350
348
|
end
|
351
349
|
|
@@ -378,15 +376,7 @@ private
|
|
378
376
|
self[:compiled_xml] = nil
|
379
377
|
@compiled_xml = nil
|
380
378
|
sm = self.state_machine
|
381
|
-
#Rails.logger.info("SM: #{YAML::dump(sm)}")
|
382
379
|
return if sm.nil?
|
383
|
-
#Rails.logger.info("Ensuring the right parts are present")
|
384
|
-
|
385
|
-
sm.state_names.sort.each do |part_name|
|
386
|
-
parts.create(:name => part_name, :content => %{
|
387
|
-
<h1>View for State #{part_name}</h1>
|
388
|
-
}) unless parts.any?{ |p| p.name == part_name }
|
389
|
-
end
|
390
380
|
end
|
391
381
|
|
392
382
|
end
|
data/config/routes.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-fabulator-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 10
|
10
|
+
version: 0.0.10
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- James Smith
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-12-
|
18
|
+
date: 2010-12-08 00:00:00 +00:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|