Sha256: e576948547e0a7aadcc88a1ae36534f2fe83f9b73dd288a15916c05f15b76ecc

Contents?: true

Size: 1.82 KB

Versions: 19

Compression:

Stored size: 1.82 KB

Contents

- data_source ||= field.link ? field.link.get_objects : field.reflection.klass.all
- check_box_type ||= :many_to_many_check_box
= reflection_node f, field do
  .quick_edit_block
    %ul.relation.quick_edit_inject
      - data_source.each do |ref_object|
        %li.quick_edit_entry
          = f.send(check_box_type, 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.send(check_box_type, 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

19 entries across 19 versions & 1 rubygems

Version Path
bhf-1.0.0.beta16 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta15 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta14 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta13 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta12 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta11 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta10 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta9 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta8 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta7 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta6 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta5 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta4 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta3 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta2 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-1.0.0.beta1 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.17 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.16 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml
bhf-0.10.15 app/views/bhf/form/has_and_belongs_to_many/_check_box.html.haml