{% import "Pylot/macros/base.html" as m with context %} {% import "Pylot/macros/forms.html" as f with context %} {% extends "Pylot/PostAdmin/layout.html" %} {% block page_title %}Writer{% endblock %} {% block content %} {% if post and post.is_draft %} {{ m.alert("This post is a draft and is not yet published", category="warning", dismissible=False) }} {% endif %} {% if post %}
View Post
{% endif %}
{{- f.csrf_field() -}} {{ f.input("input", name="title", placeholder="Your Post Title", value=post.title if post else "") }} {% include "Pylot/PostAdmin/mdeditor.html" %}
// Post Meta
Post Types
{{ f.tag('radio', 'type_id', options=types, checked=[post.type_id if post else 0]) }}
Post Categories
{{ f.tag('checkbox', 'post_categories', options=categories, checked=checked_categories) }}
Post Info
Status {% if post %}{{ post.status }}{% endif %}
Published Date {% if post %}{{ post.published_date }}{% endif %}
Creation Date {% if post %}{{ post.created_at }}{% endif %}
Is Public {% if post %}{{ post.is_public | bool_to_yes }}{% endif %}
Save as Draft
Save & Publish
Trash it
{% endblock %}