Commit 533288e58e3c34fef19be4cfd542a2b990e0e362

Authored by Karpikau Andrei
1 parent 7209de75

add template for render row and cell

@@ -41,8 +41,8 @@ module Kanjai @@ -41,8 +41,8 @@ module Kanjai
41 json_data = page_data.template_content 41 json_data = page_data.template_content
42 html = '' 42 html = ''
43 43
44 - row_template = File.open("#{Rails.root}/app/view/kanjai/pages/templates/row.html.erb").read  
45 - cell_template = File.open("#{Rails.root}/app/view/kanjai/pages/templates/cell.html.erb").read 44 + #row_template = File.open("#{Rails.root}/app/view/kanjai/pages/templates/row.html.erb").read
  45 + #cell_template = File.open("#{Rails.root}/app/view/kanjai/pages/templates/cell.html.erb").read
46 46
47 json_data.each do |row| 47 json_data.each do |row|
48 row['attributes'] ||= {} 48 row['attributes'] ||= {}
@@ -107,10 +107,10 @@ module Kanjai @@ -107,10 +107,10 @@ module Kanjai
107 "data-class='#{cell['className']}'", 107 "data-class='#{cell['className']}'",
108 ] 108 ]
109 109
110 - cells += ApplicationController.render assigns: {content: html.html_safe, cell: cell, class_name: cell_class_name, data_attributes: data_attributes.join(' ')}, inline: template 110 + cells += ApplicationController.render 'kanjai/pages/templates/cell', assigns: {content: html.html_safe, cell: cell, class_name: cell_class_name, data_attributes: data_attributes.join(' ')}
111 end 111 end
112 112
113 - html += ApplicationController.render assigns: {content: cells}, inline: row_template 113 + html += ApplicationController.render 'kanjai/pages/templates/row', assigns: {content: cells}
114 114
115 end 115 end
116 116
1 module Kanjai 1 module Kanjai
2 - VERSION = "0.0.122" 2 + VERSION = "0.0.123"
3 end 3 end