Sha256: 0062ff8b44c7020c2478ed54f594bb54068c95507ed35b31e751b86aaa4737a8
Contents?: true
Size: 807 Bytes
Versions: 1
Compression:
Stored size: 807 Bytes
Contents
= f.label field.name, field.label .repeater-field{ ng: { controller: 'MatrixFieldCtrl', init: "initRows(#{ f.object.send(field.name).to_json })" } } %table %thead %tr - field.mapping.keys.each do |key| %th= key.to_s.humanize %th %tbody %tr{ ng: { repeat: 'row in rows track by $index' } } - field.mapping.each do |key, form_helper| %td= f.send form_helper, nil, field.html_options.merge(name: "#{ f.object_name }[#{ field.name }][][#{ key }]", id: "#{ f.object_name }_#{ field.name }_{{ $index }}_#{ key }", value: nil, :'ng-model' => "row.#{ key }") %td.remove %a.alert{ ng: { click: 'removeRow($index)' } }= ficon(:x) .plus %a.button.success.tiny.radius{ ng: { click: 'addRow()' } }= ficon :plus, 'Add row'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
push_type_admin-0.5.0.alpha.2 | app/views/push_type/fields/_matrix.html.haml |