app/views/pages/_link_form.slim
.collection-editor
ul.list-group
- page.links.each do |link|
= render 'link', link: link
h4
= t('pages.edit.add_link')
= render partial: 'tooltip', locals: { tooltip_text: t('tooltips.add_source'), space_left: true }
= form_for Link.new, remote: true, html: {class: 'form-inline', id: 'new_collection_element'} do |f|
= f.hidden_field :page_id, value: page.id
.form-group.two-ninths
= f.text_field :url, class: 'form-control', placeholder: t('links.forms.url')
.form-group.two-ninths
= f.text_field :title, class: 'form-control', placeholder: t('links.forms.title')
.form-group.two-ninths
= f.text_field :source, class: 'form-control', placeholder: t('links.forms.source')
.form-group.two-ninths
= f.date_field :date, class: 'form-control', placeholder: t('links.forms.date')
.form-group.one-ninth
= submit_tag t('pages.edit.add_link'), class: 'btn btn-default xhr-feedback', 'data-disable-with' => t('common.saving')
javascript:
$(function () {
window.ee.emit("collection:edit:loaded");
});