Sha256: c3c220593d343e24e2601133ae67c0726181c2410041904d0a0178973ee06298

Contents?: true

Size: 1.79 KB

Versions: 7

Compression:

Stored size: 1.79 KB

Contents

- data_source ||= field.link ? field.link.get_objects : field.reflection.klass.all 
= reflection_node f, field do
  .quick_edit_block
    %ul.relation.quick_edit_inject
      - data_source.each do |ref_object|
        %li.quick_edit_entry
          = f.many_to_many_check_box(ref_object, field.reflection.name, params, field.link && ! field.link.hide_edit)
          - 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'
          - 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
        = f.many_to_many_check_box(OpenStruct.new(to_bhf_s: '{to_bhf_s}'), field.reflection.name, params, field.link && ! field.link.hide_edit, true, "{object_id}", {class: 'js_remove_disabled', disabled: true}).gsub('_object_id_', '{object_id}').html_safe # fix for id attr
        - 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'
        - 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 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

7 entries across 7 versions & 1 rubygems

Version Path
bhf-0.10.12 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.11 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.10 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.9 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.9.9 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.9.8 app/views/bhf/form/has_and_belongs_to_many/_check_box.haml
bhf-0.9.7 app/views/bhf/form/has_and_belongs_to_many/_check_box.haml