forzar al ancho de columnas

This commit is contained in:
f 2018-07-24 18:13:02 -03:00
parent 8af9b4a2a5
commit 6173922a35
No known key found for this signature in database
GPG key ID: F3FDAB97B5F9F7E7

View file

@ -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