Development of an internal social media platform with personalised dashboards for students
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

post_detail.html 1.1KB

12345678910111213141516171819202122232425262728293031323334353637
  1. {% extends 'base.html' %}{% block content %}
  2. {% load hitcount_tags %}
  3. <div class="post">
  4. {% if post.published_date %}
  5. <div class="date">
  6. {{ post.published_date }}
  7. </div>
  8. {% else %}
  9. <a class="btn btn-outline-dark" href="{% url 'post_publish' pk=post.pk %}">Publish</a>
  10. {% endif %} {% if user.is_staff and user == post.author %}
  11. <a class="btn btn-outline-dark" href="{% url 'post_edit' pk=post.pk %}">
  12. <span class="glyphicon glyphicon-pencil">Bearbeiten</span>
  13. </a>
  14. <a class="btn btn-outline-dark" href="{% url 'post_remove' pk=post.pk %}">
  15. <span class="glyphicon glyphicon-remove">Löschen</span>
  16. </a>
  17. {% endif %}
  18. <h1>{{ post.title }}</h1>
  19. <p>{{ post.text|linebreaksbr }}</p>
  20. <p>
  21. Tags:
  22. {% for tag in post.tags.all %}
  23. <a href="{% url 'blog_search_list_view' %}">{{ tag.name }} </a>
  24. {% if not forloop.last %}, {% endif %}
  25. {% endfor %}
  26. </p>
  27. <p>
  28. Autor: {{ post.author }}
  29. </p>
  30. {% if user.is_staff %}
  31. <p>
  32. {% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen!
  33. </p>
  34. {% endif %}
  35. </div>
  36. {% endblock %}