app/views/pages/new.slim
- content_for(:title, t('.title'))
= render "pages/sidebar", action: :new
.edit-block
h1.edit-block__title= t('.title')
= form_for @page, class: '' do |f|
= render 'shared/error_messages', target: @page
.form-group
= label_with_tooltip(f, :title, t('pages.edit.title'), t('tooltips.title'))
= f.text_field :title, class: 'form-control'
div.checkbox
label for="rtl-check"
input id="rtl-check" type="checkbox"
=t('pages.edit.rtl')
.form-group.slug-field style='display:none;'
.form-group
.alert.alert-warning
strong Whoops!
| Your slug isn't available. Please pick another.
.form-inline
.form-group.slug
= f.text_field :slug, class: 'form-control', placeholder: t('.slug_label')
span.glyphicon.glyphicon-ok.form-control-feedback
span.glyphicon.glyphicon-remove.form-control-feedback
.form-group
= link_to 'Check if name is available', '#', class: 'btn btn-default', id: 'check_slug_available'
.form-group
= f.label :language_id, t('pages.edit.language_label')
= f.select :language_id, Language.all.map { |lang| [lang.name, lang.id] }, {}, class: "form-control"
.form-group
= label_with_tooltip(f, :liquid_layout_id, t('pages.edit.layout_select'), t('tooltips.page_layout'))
.layout-settings
= render 'layout_select', field: :liquid_layout_id, f: f
.form-group
= f.submit t('common.lets_go'), class: 'btn btn-sm btn-primary submit-new-page'
span.loading style='display:none;'
span.glyphicon.glyphicon-refresh.glyphicon-refresh-animate
javascript:
$(function () {
window.ee.emit("pages:new");
$("#rtl-check").click(function(e) {
$("#page_title").toggleClass("rtl");
});
});