{% 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 %} {% set canSetAuthorVisibility = not ddoc or handler.user.own(ddoc) %}
{{ form.form_select({columns:3,label:'Category',name:'category',options:categories,value:editorDoc.category|default('none'),row:false}) }} {% if forcedRef %}
本文将投稿到当前课程小节。
{% elif handler.user.hasPriv(PRIV.PRIV_EDIT_SYSTEM) %}
{% 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.hasPriv(PRIV.PRIV_EDIT_SYSTEM) or handler.user.own(ddoc)) %}{% endif %}
{% endblock %}