Sha256: 7c5af3e099eb469800a45d5f39ea02e394f472e4abc3d51f6dc00ad3262f97fd
Contents?: true
Size: 1.67 KB
Versions: 21
Compression:
Stored size: 1.67 KB
Contents
= reflection_node f, field do - ref_objects ||= f.object.send(field.reflection.name) - is_one = (field.macro == :has_one || field.macro == :belongs_to) .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_path(field.link.name, 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_path(field.link.name, 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_path(field.link.name, '{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_path(field.link.name, '{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_path(field.link.name), class: 'js_add_field plus_button qe_button quick_edit default_form_align'
Version data entries
21 entries across 21 versions & 1 rubygems