{% import "components/form.html" as form with context %} {% extends "layout/basic.html" %} {% block content %} {{ set(UiContext, 'forcedRef', forcedRef) }}
{% if forcedRef %} {% endif %} {% if draft %}
草稿已保存({{ datetimeSpan(draft.updatedAt)|safe }}){% if ddoc %},公开文章尚未更新{% endif %}。
{% endif %}
{{ form.form_select({ columns:3, label:'Category', name:'category', options:categories, value:editorDoc['category']|default(''), row:false }) }} {% if forcedRef %} {% elif handler.user.hasPerm(perm.PERM_EDIT_DOMAIN) %}
{% else %} {% endif %}
{{ form.form_textarea({ columns:12, label:'Content', name:'content', value:editorDoc.content|default(''), markdown:true, required:true, extra_style:'height: 500px', extra_textarea_class:'auto-resize' }) }}
{% if draft %} {% endif %} {% if ddoc and (handler.user.hasPerm(perm.PERM_EDIT_DOMAIN) or handler.user.own(ddoc)) %} {% endif %}
{% endblock %}