{% import "WebPortfolio/macros/base.html" as m with context %} {% import "WebPortfolio/macros/forms.html" as f with context %} {% import "WebPortfolio/macros/bootstrap.html" as bs with context %} {% extends "WebPortfolio/Module/Cms/Admin/_layout.html" %} {% block admin_content %}
{% if post and post.is_draft %} {{ m.flash_message("This post is a draft and is not yet published", category="warning", dismissible=False) }} {% endif %}
Status: {{ post.status | default('New', true) }}
{% if post and post.id %} Preview Post {% endif %}
{{- f.csrf_field() -}}
Title:

{% call bs.collapsible("Post Type") %} {{ f.tag('radio', 'type_id', options=types, checked=[post.type_id if post else 0 ]) }} {% endcall %} {% call bs.collapsible("Categories") %}
{{ f.tag('checkbox', 'post_categories', options=categories, checked=checked_categories) }}
{% endcall %} {% call bs.collapsible("Featured Image") %}
{% endcall %} {% call bs.collapsible("Info", collapse=true) %}
Published Date {% if post %}{{ post.published_at }}{% endif %}
Creation Date {% if post %}{{ post.created_at }}{% endif %}
{% endcall %}
{% call bs.collapsible("Slug", collapse=true) %} {% endcall %} {% call bs.collapsible("Tags") %} {% endcall %} {% call bs.collapsible("Description or Excerpt", collapse=true) %} {% endcall %} {% call bs.collapsible("Post Options") %} {{ f.group('radio', label='Public: ', name='is_public', checked="y" if post.is_public else "n", options=[("y", "Yes"), ("n", "No")], display_inline=true ) }} {{ f.group('radio', label='Sticky: ', name='is_sticky', checked="y" if post.is_sticky else "n",options=[("y", "Yes"), ("n", "No")], display_inline=true ) }} {{ f.group('radio', label='Featured: ', name='is_featured', checked="y" if post.is_featured else "n",options=[("y", "Yes"), ("n", "No")], display_inline=true ) }} {{ f.tag('checkbox', name='social_options', options=[('allow_comments', ' Allow Comments'), ('show_likes', 'Show Likes'), ('show_sharing_buttons', ' Show Sharing Buttons') ], checked=post.options.social) }} {% endcall %}
Save & Publish

Save as Draft
Trash it


{% endblock %}