Sha256: 502d43e896f1bb20d4fd642879ca82d00f2a46b31f3ba6ec57861b5b2127d48f

Contents?: true

Size: 928 Bytes

Versions: 28

Compression:

Stored size: 928 Bytes

Contents

%repeater-field{ :':row-count' => field.rows.size, :'inline-template' => true }
  .repeater-field
    %table
      %tbody.rows
        // Static existing rows
        - field.rows.each do |row|
          = f.fields_for field.name, row do |r|
            %tr
              %td= render_field row.f, r, name: "#{ f.object_name }[#{ field.name }][]", id: nil
              %td.remove
                %a.alert{ :'v-remove-row' => true }= ficon(:x)
        
        // Dynamic rows
        = f.fields_for field.name, field.structure do |r|
          %tr{ :'v-for' => 'row in rows', :'track-by' => 'id' }
            %td= render_field field.structure.f, r, name: "#{ f.object_name }[#{ field.name }][]", id: nil
            %td.remove
              %a.alert{ :'v-on:click.prevent' => 'removeRow(row)' }= ficon(:x)

    .plus
      %a.button.success.tiny.radius{ :'v-on:click.prevent' => 'addRow()' }
        = ficon :plus, 'Add row'


Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
push_type_admin-0.12.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.12.0 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.12.0.beta.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.11.2 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.11.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.11.0.beta.2 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.11.0.beta.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.4 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.3 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.2 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.0 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.0.beta.5 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.10.0.beta.3 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.5 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.3 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.2 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.1 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.0 app/views/push_type/fields/_repeater.html.haml
push_type_admin-0.9.0.beta.4 app/views/push_type/fields/_repeater.html.haml