Commit e0f11a90be76a0a9b358e2e9abb88e69ed11efcc

Authored by Karpikau Andrei
1 parent 583a299e

add template for render row and cell

... ... @@ -61,9 +61,18 @@ module Kanjai
61 61 if page_content.type_content.split('-').include?('wrapper')
62 62 html += (page_content.get_simple_content).html_safe
63 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 76 end
68 77
69 78 else
... ...
  1 +<div class="col">
  2 + <%= @content %>
  3 +</div>
\ No newline at end of file
... ...
1 1 <div class="row">
2   - <div class="container">
3   - <%= @content %>
4   - </div>
  2 + <%= @content %>
5 3 </div>
\ No newline at end of file
... ...
1 1 module Kanjai
2   - VERSION = "0.0.126"
  2 + VERSION = "0.0.127"
3 3 end
... ...