<div class="post{%if (not inlist) %} single-post{% endif %}{% if (not post.published) %} unpublished-post{% endif %}">
<div class="header">
{% if inlist %}
<a href="{{ path(post|post_url) }}"><h2>{{ post.title }}</h2></a>
{% else %}
<h2>{{ post.title }}</h2>
{% endif %}
<div>
<div class="pull-left">
<span class="muted">Posted by {{ post.user }}, <time title="{{ post.created_at|to_fulltime }}">{{ post.created_at|to_relative }}</time></span>
</div>
{% if userId %}
<div class="pull-right">
<a class="btn btn-mini" href="{{ path(concat('/editpost/', post._id)) }}">Edit</a>
<a class="btn btn-mini btn-danger" data-deletepostid="{{ post._id }}" href="#">Delete</a>
{% if post.published %}
<a class="btn btn-mini btn-warning" href="{{ path(concat('/unpublish/', post._id)) }}">Unpublish</a>
{% if (not post.published) %}
<a class="btn btn-mini btn-success" data-publishpostid="{{ post._id }}" href="#">Publish</a>
<div class="clearfix"></div>
<div class="content">
{{ post.html_body }}
<div class="footer">
<small>{% for tag in post.tags %}<span class="label"><a href="{{ path(concat('/tag/', tag)) }}">{{ tag }}</a></span> {% endfor %}</small>
<a href="{{ path(post|post_url) }}#comments">Comments</a>