Commit 147e4b0a5f554664ecd9d8aee935f6ca4d8294e7

Authored by Karpikau Andrei
1 parent d14c164e

check build page and that structure saved

@@ -55,25 +55,27 @@ module Kanjai @@ -55,25 +55,27 @@ module Kanjai
55 structure_id = row['attributes']['id'] 55 structure_id = row['attributes']['id']
56 page_content = page_data.page_contents.where(:structure_id => structure_id).first 56 page_content = page_data.page_contents.where(:structure_id => structure_id).first
57 57
58 - html_attributes = {}  
59 - html_attributes[:class] = 'col'  
60 - html_attributes['data-id'] = row['attributes']['id']  
61 - html_attributes['data-page_data_id'] = page_data.id  
62 -  
63 - if page_content.type_content.split('-').include?('wrapper')  
64 - html += (page_content.get_simple_content).html_safe  
65 - else  
66 - cells = page_content.nil? ? '' : page_content.get_content_frontend  
67 -  
68 - data_attributes = [  
69 - "data-id=#{row['attributes']['id']}",  
70 - "data-page_data_id=#{page_data.id}"  
71 - ]  
72 - html += ApplicationController.render(file: 'kanjai/pages/templates/block', assigns: {content: cells.html_safe, data_attributes: data_attributes.join(' ')}, layout: false).html_safe  
73 -  
74 - #html += ActionController::Base.helpers.content_tag(:div, '', html_attributes) do  
75 - # ActionController::Base.helpers.concat((page_content.nil? ? '' : page_content.get_content_frontend).html_safe)  
76 - #end 58 + if page_content
  59 + html_attributes = {}
  60 + html_attributes[:class] = 'col'
  61 + html_attributes['data-id'] = row['attributes']['id']
  62 + html_attributes['data-page_data_id'] = page_data.id
  63 +
  64 + if page_content.type_content.split('-').include?('wrapper')
  65 + html += (page_content.get_simple_content).html_safe
  66 + else
  67 + cells = page_content.nil? ? '' : page_content.get_content_frontend
  68 +
  69 + data_attributes = [
  70 + "data-id=#{row['attributes']['id']}",
  71 + "data-page_data_id=#{page_data.id}"
  72 + ]
  73 + html += ApplicationController.render(file: 'kanjai/pages/templates/block', assigns: {content: cells.html_safe, data_attributes: data_attributes.join(' ')}, layout: false).html_safe
  74 +
  75 + #html += ActionController::Base.helpers.content_tag(:div, '', html_attributes) do
  76 + # ActionController::Base.helpers.concat((page_content.nil? ? '' : page_content.get_content_frontend).html_safe)
  77 + #end
  78 + end
77 end 79 end
78 end 80 end
79 81
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.224" 2 + VERSION = "0.0.225"
3 end 3 end