From 6173922a35a7f0b25fb4cef0ed1063dbd5c766e4 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 24 Jul 2018 18:13:02 -0300 Subject: [PATCH] forzar al ancho de columnas --- app/views/posts/template_field/_table.haml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/views/posts/template_field/_table.haml b/app/views/posts/template_field/_table.haml index dff4fe0a..a0bc0792 100644 --- a/app/views/posts/template_field/_table.haml +++ b/app/views/posts/template_field/_table.haml @@ -26,10 +26,11 @@ = fa_icon 'close', title: t('posts.row.del', group: template.key.humanize) = t('posts.row.del', group: template.key.humanize) -# Separar los campos en dos columnas - - template.nested_fields.each_slice(template.cols || 2).to_a.each do |col| + - cols = template.cols || 2 + - template.nested_fields.each_slice(cols).to_a.each do |col| .form-row{class: "align-items-#{template.align || 'start'}"} - col.each do |nf| - .col-md + %div{class: "col-md-#{12/cols}"} -# Si el template es un array, quiere decir que esperamos un array de hashes. -# El valor vacĂ­o luego es reemplazado por un id temporal