Commit e0f11a90be76a0a9b358e2e9abb88e69ed11efcc

Authored by Karpikau Andrei
1 parent 583a299e

add template for render row and cell

@@ -61,9 +61,18 @@ module Kanjai @@ -61,9 +61,18 @@ module Kanjai
61 if page_content.type_content.split('-').include?('wrapper') 61 if page_content.type_content.split('-').include?('wrapper')
62 html += (page_content.get_simple_content).html_safe 62 html += (page_content.get_simple_content).html_safe
63 else 63 else
64 - html += ActionController::Base.helpers.content_tag(:div, '', html_attributes) do  
65 - ActionController::Base.helpers.concat((page_content.nil? ? '' : page_content.get_content_frontend).html_safe)  
66 - end 64 + cells = page_content.nil? ? '' : page_content.get_content_frontend
  65 +
  66 + data_attributes = [
  67 + "data-id='#{row['attributes']['id']}'",
  68 + "data-page_data_id='#{page_data.id}'"
  69 + ]
  70 +
  71 + html += ApplicationController.render(file: 'kanjai/pages/templates/block', assigns: {content: cells.html_safe, data_attributes: data_attributes.join(' ')}, layout: false).html_safe
  72 +
  73 + #html += ActionController::Base.helpers.content_tag(:div, '', html_attributes) do
  74 + # ActionController::Base.helpers.concat((page_content.nil? ? '' : page_content.get_content_frontend).html_safe)
  75 + #end
67 end 76 end
68 77
69 else 78 else
  1 +<div class="col">
  2 + <%= @content %>
  3 +</div>
1 <div class="row"> 1 <div class="row">
2 - <div class="container">  
3 - <%= @content %>  
4 - </div> 2 + <%= @content %>
5 </div> 3 </div>
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.126" 2 + VERSION = "0.0.127"
3 end 3 end