uploading is ok,checking parsing result is needed
This commit is contained in:
1 parent
d75dd4f936
commit
d2c2e174ac
2 files changed
+35
-13
No files matched your search
+22
-1
@@ -63,6 +63,10 @@ module Parser
|
||||
end
|
||||
res
|
||||
end
|
||||
c.define_tag 'stylesheets' do |tag|
|
||||
contents = tag.expand
|
||||
contents.to_html
|
||||
end
|
||||
c.define_tag 'image' do |tag|
|
||||
asset = Asset.find(tag.attr['id'])
|
||||
if asset
|
||||
@@ -158,6 +162,10 @@ module Parser
|
||||
res << '>'
|
||||
end
|
||||
end
|
||||
c.define_tag 'stylesheets' do |tag|
|
||||
contents = tag.expand
|
||||
contents.to_html
|
||||
end
|
||||
c.define_tag 'layout_part' do |tag|
|
||||
part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s }
|
||||
ret = ''
|
||||
@@ -191,8 +199,13 @@ module Parser
|
||||
parser.parse(layout_content)
|
||||
end
|
||||
|
||||
def parser_context_code(page)
|
||||
def parser_context_code(page) #context should be interpretd as the orginally one
|
||||
Radius::Context.new do |c|
|
||||
c.define_tag 'stylesheets' do |tag|
|
||||
res << "<r:layout_part>"
|
||||
res << tag.expand.to_s
|
||||
res << "</r:layout_part>"
|
||||
end
|
||||
c.define_tag 'layout_part' do |tag|
|
||||
part = page.page_parts.detect{ |p| p.name.to_s == tag.attr['name'].to_s }
|
||||
res = ''
|
||||
@@ -216,6 +229,14 @@ module Parser
|
||||
|
||||
def parser_layout_layout_part(layout )
|
||||
Radius::Context.new do |c|
|
||||
c.define_tag 'javascripts' do |tag|
|
||||
contents = tag.expand
|
||||
contents.to_s
|
||||
end
|
||||
c.define_tag 'stylesheets' do |tag|
|
||||
contents = tag.expand
|
||||
contents.to_s
|
||||
end
|
||||
c.define_tag 'layout_part' do |tag|
|
||||
data={}
|
||||
data[:class_tag]=tag.attr['class'].to_s
|
||||
|
||||
Reference in new issue
Block a user