2018-08-18 12:10:40 +02:00

23 lines
771 B
HTML

{% extends 'base.html' %} {% block content %}
<div class="post">
{% if post.published_date %}
<div class="date">
{{ post.published_date }}
</div>
{% else %}
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
{% endif %}
{% if user.is_staff and user == post.author %}
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
<span class="glyphicon glyphicon-pencil">Edit</span>
</a>
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
<span class="glyphicon glyphicon-remove">Remove</span>
</a>
{% endif %}
<h1>{{ post.title }}</h1>
<p>{{ post.text|linebreaksbr }}</p>
<p>{{ post.tag }}</p>
</div>
{% endblock %}