{% import "Juice/macros/forms.html" as f with context %} {% include "Juice/Plugin/Publisher/Admin/_include.html" %}
{% if post and post.is_draft %} {{ widget.alert("This post is a draft and is not yet published", category="warning", dismissible=False) }} {% endif %}
{% set label = "default" %} {% if post %} {% if post.is_draft %} {% set label = "warning" %} {% elif post.is_published %} {% set label = "success" %} {% elif post.is_deleted %} {% set label = "danger" %} {% endif %} {% endif %}
{{ post.status | default('New', true) }}
{% if post and post.id %} Preview Post {% endif %}
{% call forms.post('PublisherAdmin:post', id="form-post-edit") %}
Title:

{% call widget.collapsible("Post Type") %} {{ forms.radio(name='type_id', options=types, checked=[post.type_id if post else 0 ], data={"validation": "required"}) }} {% endcall %} {% call widget.collapsible("Categories") %}

{{ forms.checkbox(name='post_categories', options=categories, checked=checked_categories) }}
{% endcall %} {% call widget.collapsible("Featured Image") %}
{% endcall %} {% call widget.collapsible("Featured Embed") %} {% endcall %} {% call widget.collapsible("Info", collapse=true) %}
Published Date {% if post %}{{ post.published_at }}{% endif %}
Creation Date {% if post %}{{ post.created_at }}{% endif %}
Featured Date {% if post %}{{ post.featured_at }}{% endif %}
Sticky Date {% if post %}{{ post.sticky_at }}{% endif %}
{% endcall %}
{% call widget.collapsible("Slug", collapse=true) %} {% endcall %} {% call widget.collapsible("Tags") %} {% endcall %} {% call widget.collapsible("Description or Excerpt", collapse=true) %} {% endcall %} {% call widget.collapsible("Post Options") %} {{ forms.radio(label='Set Public: ', name='is_public', checked="y" if post.is_public else "n", options=[("y", "Yes"), ("n", "No")], inline=true ) }} {{ forms.radio(label='Set Featured Post: ', name='is_featured', checked="y" if post.is_featured else "n",options=[("y", "Yes"), ("n", "No")], inline=true ) }} {{ forms.radio(label='Set Sticky Post: ', name='is_sticky', checked="y" if post.is_sticky else "n",options=[("y", "Yes"), ("n", "No")], inline=true ) }} {{ forms.radio(label='Featured Media Top: ', name='featured_media_top', checked=[post.featured_media_top or ""], options=[("embed", "Embed"), ("image", "Image"), ("", "None")], inline=true ) }} {% endcall %} {% call widget.collapsible("Other Options") %} {{ forms.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 as Draft


Save & Publish


Trash it
{% endcall %}
{% call widget.modal('Add New Category', id='modal-insert-cat-inline') %} {% call forms.post('PublisherAdmin:categories') %} {{ forms.hidden(name="ajax", value="1") }} {{ forms.input(label="Name", name="name") }} {% endcall %} {% endcall %}