2018-10-30 18:43:30 +01:00
|
|
|
{% extends 'base.html' %}{% block content %}
|
|
|
|
{% load hitcount_tags %}
|
2018-06-28 12:33:19 +02:00
|
|
|
<div class="post">
|
2018-10-30 18:43:30 +01:00
|
|
|
|
2018-06-28 12:33:19 +02:00
|
|
|
{% if post.published_date %}
|
|
|
|
<div class="date">
|
|
|
|
{{ post.published_date }}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
2018-07-23 07:35:45 +02:00
|
|
|
<a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
|
2018-08-19 22:55:06 +02:00
|
|
|
{% endif %} {% if user.is_staff and user == post.author %}
|
2018-07-23 07:35:45 +02:00
|
|
|
<a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
|
|
|
|
<span class="glyphicon glyphicon-pencil">Edit</span>
|
2018-06-28 12:33:19 +02:00
|
|
|
</a>
|
2018-07-23 07:35:45 +02:00
|
|
|
<a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
|
|
|
|
<span class="glyphicon glyphicon-remove">Remove</span>
|
2018-06-28 12:33:19 +02:00
|
|
|
</a>
|
2018-08-15 11:33:53 +02:00
|
|
|
{% endif %}
|
2018-06-28 12:33:19 +02:00
|
|
|
<h1>{{ post.title }}</h1>
|
|
|
|
<p>{{ post.text|linebreaksbr }}</p>
|
2018-08-19 22:55:06 +02:00
|
|
|
<p>
|
2018-10-30 18:43:30 +01:00
|
|
|
Tags:
|
2018-08-19 22:55:06 +02:00
|
|
|
{% for tag in post.tags.all %}
|
|
|
|
<a href="{% url 'blog_search_list_view' %}">{{ tag.name }}, </a>
|
|
|
|
{% endfor %}
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
Autor: {{ post.author }}
|
|
|
|
</p>
|
2018-10-30 18:43:30 +01:00
|
|
|
{% if user.is_staff %}
|
|
|
|
<p>
|
|
|
|
{% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
|
|
|
|
</p>
|
|
|
|
{% endif %}
|
2018-06-28 12:33:19 +02:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|