Sha256: 5ac5def12e833a177767256755b58dcacd85fe405af366cbb4f66df164acb3ab
Contents?: true
Size: 1.16 KB
Versions: 26
Compression:
Stored size: 1.16 KB
Contents
- if !f.object.new_record? && field.ui_enabled? - target_content_type = Locomotive::ContentType.class_name_to_content_type(field.class_name, current_site) - new_target_content_entry = target_content_type.entries.build(field.inverse_of => f.object) = f.input name.to_sym, label: field.label, hint: field.hint, as: :'locomotive/empty', wrapper_html: { id: "content_entry_#{name}_input", class: 'empty relationship input' } - content_for :head do %script{ type: 'text/html', id: "#{name}_list" } %p.empty{ style: 'display: none' }!= t('.empty') %ul %hr %p.actions = link_to t('.new_entry'), '#', class: 'add' %script{ type: 'text/html', id: "#{name}_entry" } %li .handle.col %i.icon-reorder .label.col {{label}} %span.actions = link_to_icon :pencil, '#', class: 'edit' = link_to_icon :trash, '#', class: 'remove', data: { confirm: t('locomotive.messages.confirm') } - content_for :backbone_view_data do :plain , #{name}_new_entry: #{to_json(new_target_content_entry)} - push_has_many_form field
Version data entries
26 entries across 26 versions & 1 rubygems