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.3KB

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