Commit c649c603bc1455581215b6323d4cb7aaaa84edb9
1 parent
e0f11a90
add template for render row and cell
Showing
3 changed files
with
9 additions
and
9 deletions
| ... | ... | @@ -64,8 +64,8 @@ module Kanjai |
| 64 | 64 | cells = page_content.nil? ? '' : page_content.get_content_frontend |
| 65 | 65 | |
| 66 | 66 | data_attributes = [ |
| 67 | - "data-id='#{row['attributes']['id']}'", | |
| 68 | - "data-page_data_id='#{page_data.id}'" | |
| 67 | + "data-id=#{row['attributes']['id']}", | |
| 68 | + "data-page_data_id=#{page_data.id}" | |
| 69 | 69 | ] |
| 70 | 70 | |
| 71 | 71 | html += ApplicationController.render(file: 'kanjai/pages/templates/block', assigns: {content: cells.html_safe, data_attributes: data_attributes.join(' ')}, layout: false).html_safe |
| ... | ... | @@ -109,11 +109,11 @@ module Kanjai |
| 109 | 109 | cell_class_name = cell['className'] |
| 110 | 110 | |
| 111 | 111 | data_attributes = [ |
| 112 | - "data-size='#{cell['size']}'", | |
| 113 | - "data-offset='#{cell['offset']}'", | |
| 114 | - "data-id='#{cell['id']}'", | |
| 115 | - "data-page_data_id='#{page_data.id}'", | |
| 116 | - "data-class='#{cell['className']}'", | |
| 112 | + "data-size=#{cell['size']}", | |
| 113 | + "data-offset=#{cell['offset']}", | |
| 114 | + "data-id=#{cell['id']}", | |
| 115 | + "data-page_data_id=#{page_data.id}", | |
| 116 | + "data-class=#{cell['className']}", | |
| 117 | 117 | ] |
| 118 | 118 | |
| 119 | 119 | cells += ApplicationController.render file: 'kanjai/pages/templates/cell', assigns: {content: html.html_safe, cell: cell, class_name: cell_class_name, data_attributes: data_attributes.join(' ')}, layout: false | ... | ... |