Sha256: 05664109165afaaef0bf9ad0809ed906cfc8c23f639c8514223943f159b91839

Contents?: true

Size: 863 Bytes

Versions: 6

Compression:

Stored size: 863 Bytes

Contents

- orderable = {}
- orderable = { "class" => "nested-form-sortable inputs-vertical-list", data: { orderable:  true}} if field.orderable
%div{orderable}
  = form.render_nested_form field do |nform|
    .nested_fields.well.well-small{"class" => "nested_form_for_#{field.method_name}"}
      %div{"class" => field.orderable ? "nested-form-drag ui-icon ui-icon-grip-dotted-vertical" : ""}
      - if field.nested_form[:allow_destroy] or nform.new_record?
        = nform.link_to_remove '<span class="btn btn-mini btn-danger"><i class="icon-trash icon-white"></i></span>'.html_safe
      = nform.render_fields

  - unless field.nested_form[:update_only] # || !field.inline_add
    .clearfix
      = form.link_to_add "<i class=\"icon-plus icon-white\"></i> #{field.associated_model_config.label}".html_safe,
          field.name, { :class => 'btn btn-info pull-right' }

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
basepack-1.0.1 app/views/forms/edit/_form_nested_many.html.haml
basepack-1.0.0 app/views/forms/edit/_form_nested_many.html.haml
basepack-1.0.0.pre.0 app/views/forms/edit/_form_nested_many.html.haml
basepack-0.2.0 app/views/forms/edit/_form_nested_many.html.haml
basepack-0.1.0 app/views/forms/edit/_form_nested_many.html.haml
basepack-0.0.2 app/views/forms/edit/_form_nested_many.html.haml