= reflection_node f, field do - ref_objects ||= f.object.send(field.reflection.name) - is_one = field.macro == :embeds_one .quick_edit_block %p.empty{class: ('hide' unless ref_objects.blank?)}= t 'bhf.helpers.entry.empty', count: (is_one ? 1 : 2) %ul.relation.quick_edit_inject{class: field.macro} - ref_objects.each do |ref_object| %li.quick_edit_entry - if field.link && ! field.link.hide_edit = link_to ref_object.to_bhf_s, edit_entry_embed_path(field.link.name, f.object, ref_object), class: 'js_edit_field qe_button quick_edit' - else = ref_object.to_bhf_s - if field.link && ! field.link.hide_delete = link_to '×'.html_safe, entry_embed_path(field.link.name, f.object, ref_object), method: :delete, class: 'qe_delete js_delete', remote: true, data: {confirm: t('bhf.helpers.promts.confirm', platform_title: field.link.title_singular)} .quick_edit_template{type: 'text/template'} %li.quick_edit_entry - if field.link && ! field.link.hide_edit = link_to '{to_bhf_s}', edit_entry_embed_path(field.link.name, f.object, '{object_id}'), class: 'js_edit_field qe_button quick_edit' - else = '{to_bhf_s}' - if field.link && ! field.link.hide_delete = link_to '×'.html_safe, entry_embed_path(field.link.name, f.object, '{object_id}'), method: :delete, class: 'qe_delete js_delete', remote: true, data: {confirm: t('bhf.helpers.promts.confirm', platform_title: field.link.title_singular)} - if ! is_one && field.link && ! field.link.hide_create = link_to '+', new_entry_embed_path(field.link.name, f.object), class: 'js_add_field plus_button qe_button quick_edit default_form_align'