Sha256: 4ddbbdc2b9d4ac63b067a5be44b45e78b4cbcad116bc362eaff9fad3fad8c0f6

Contents?: true

Size: 751 Bytes

Versions: 1

Compression:

Stored size: 751 Bytes

Contents

= reflection_node f, field do
  - ref_objects = f.object.send(field.reflection.name)
  - if ref_objects.blank?
    = t 'bhf.helpers.entry.empty', :count => 2
  - else
    %ul.relation
      - ref_objects.each do |ref_object|
        %li
          = link_to_if field.link, ref_object.to_bhf_s, edit_bhf_entry_embed_path(field.link || 0, f.object, ref_object), :class => 'quick_edit'
          = link_to_if field.link, '×'.html_safe, bhf_entry_embed_path(field.link || 0, f.object, ref_object), :method => :delete, :confirm => t('bhf.helpers.promts.confirm'), :class => 'delete', :remote => true

  - # FIXME: empty ul js problem
  - if field.link
    = link_to '+', new_bhf_entry_embed_path(field.link, f.object), :class => 'add_field quick_edit'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bhf-0.3.11 app/views/bhf/entries/form/embeds_many/_static.haml