{% extends "_layouts/cp" %} {% import "_includes/forms" as forms %} {% set extraPageHeaderHtml %} {% if entry.id and CraftEdition >= CraftClient %} {% include "entries/_revisions" %} {% endif %} {% endset %} {% set sectionHandle = section.handle %} {% block main %}
{% if entry.id %}{% endif %} {% if craft.isLocalized() %}{% endif %}
{% include "_includes/tabs" %} {% include "entries/_fields" %}
{% if showPreviewBtn %}
{{ "Live Preview"|t }}
{% endif %} {% if craft.isLocalized() and section.getLocales() | length > 1 %}
    {% for localeId in localeIds %} {% set localeName = craft.i18n.getLocaleById(localeId).name %} {%- if localeId == entry.locale -%} {{ localeName }} {{ forms.lightswitch({ name: 'localeEnabled', on: entry.localeEnabled }) }} {%- else -%} {{ localeName }}
    {%- endif -%} {% endfor %}
{% endif %} {% if section.type != 'single' %}
{% if showEntryTypes %} {{ forms.selectField({ label: "Entry Type"|t, id: 'entryType', name: 'typeId', value: entryType.id, options: entryTypeOptions }) }} {% endif %} {{ forms.textField({ label: "Slug"|t, id: 'slug', name: 'slug', value: entry.slug, errors: entry.getErrors('slug'), required: true }) }} {% if section.type == 'structure' and parentOptions|length > 1 %} {{ forms.selectField({ label: "Parent Entry"|t, id: 'parentId', name: 'parentId', options: parentOptions, value: parentId }) }} {% endif %} {% if CraftEdition >= CraftClient %} {{ forms.selectField({ label: "Author"|t, id: 'author', name: 'author', options: authorOptions, value: entry.authorId }) }} {% endif %} {{ forms.dateTimeField({ label: "Post Date"|t, id: 'postDate', name: 'postDate', value: (entry.postDate ? entry.postDate : null), errors: entry.getErrors('postDate') }) }} {{ forms.dateTimeField({ label: "Expiration Date"|t, id: 'expiryDate', name: 'expiryDate', value: (entry.expiryDate ? entry.expiryDate : null), errors: entry.getErrors('expiryDate') }) }} {% if currentUser.can('publishEntries'~permissionSuffix) %} {{ forms.lightswitchField({ label: "Status"|t, name: 'enabled', on: entry.enabled }) }} {% endif %}
{% if canDeleteEntry %}
{% endif %} {% endif %}
{% if entry.classHandle != 'EntryVersion' %}
{% if entry.id and entry.classHandle == 'EntryDraft' %} {% if currentUser.can('publishEntries'~permissionSuffix) and (entry.creatorId == currentUser.id or currentUser.can('publishPeerEntryDrafts'~permissionSuffix)) %} {% endif %} {% if currentUser.can('publishEntries'~permissionSuffix) and (entry.creatorId == currentUser.id or currentUser.can('deletePeerEntryDrafts'~permissionSuffix)) %} {% endif %} {% else %} {% if not entry.id or not entry.enabled or currentUser.can('publishEntries'~permissionSuffix) %}
{% if entry.id and CraftEdition >= CraftClient %} {% endif %} {% else %} {% if CraftEdition >= CraftClient %} {% endif %} {% endif %} {% endif %}
{% endif %}
{% endblock %} {% if not entry.slug %} {% includeJs "window.slugGenerator = new Craft.SlugGenerator('#title', '#slug');" %} {% endif %}