Commit e0f11a90be76a0a9b358e2e9abb88e69ed11efcc
1 parent
583a299e
add template for render row and cell
Showing
4 changed files
with
17 additions
and
7 deletions
| ... | ... | @@ -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 | ... | ... |