Sha256: 598bce46a36eb92aec192113d95172f7beb8c0eb2c5a1b02fb26f57c68ff6a89

Contents?: true

Size: 1.05 KB

Versions: 6

Compression:

Stored size: 1.05 KB

Contents

.controls{:data => { :nestedmany => true }}
  .btn-group
    %a.btn.btn-info.toggler{:'data-toggle' => "button", :'data-target' => "#{form.jquery_namespace(field)} > .tab-content, #{form.jquery_namespace(field)} > .controls > .nav", :class => (field.active? ? 'active' : '')}
      %i.icon-white
    - unless field.nested_form[:update_only] || !field.inline_add
      = form.link_to_add "<i class=\"icon-plus icon-white\"></i> #{wording_for(:link, :new, field.associated_model_config.abstract_model)}".html_safe, field.name, { :class => 'btn btn-info' }
  = form.errors_for(field)
  = form.help_for(field)
  %ul.nav.nav-tabs{ :style => 'margin-top:5px' }
.tab-content
  = form.fields_for field.name do |nested_form|
    - if field.nested_form[:allow_destroy] || nested_form.options[:child_index] == "new_#{field.name}"
      = nested_form.link_to_remove '<span class="btn btn-small btn-danger"><i class="icon-trash icon-white"></i></span>'.html_safe
    = nested_form.generate({:action => :nested, :model_config => field.associated_model_config, :nested_in => field.name })

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rails_admin-0.6.1 app/views/rails_admin/main/_form_nested_many.html.haml
rails_admin-0.6.0 app/views/rails_admin/main/_form_nested_many.html.haml
rails_admin-0.5.0 app/views/rails_admin/main/_form_nested_many.html.haml
rails_admin-0.4.9 app/views/rails_admin/main/_form_nested_many.html.haml
rails_admin-0.4.8 app/views/rails_admin/main/_form_nested_many.html.haml
rails_admin-0.4.7 app/views/rails_admin/main/_form_nested_many.html.haml