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.

blog_search_list_view.html 2.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. {% extends "base.html" %} {% block content %}
  2. {% load taggit_templatetags2_tags %}
  3. {% get_tagcloud as tags for 'application' %}
  4. {% include_tagcloud 'application.Post' %}
  5. <div class="container-fluid">
  6. <div class="modal-body row">
  7. <div class="col-md-6">
  8. Abonniere deine Tags hier!
  9. <form class="post-form" method="post">
  10. {% csrf_token %} {{form.as_p}}
  11. <button type="submit" class="save btn btn-outline-dark">Save</button>
  12. </form>
  13. {% if messages %}
  14. {% for message in messages %}
  15. <div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
  16. {% endfor %}
  17. {% endif %}
  18. </div>
  19. <div class="col-md-6">
  20. Tag-Suche
  21. <div id="custom-search-input">
  22. <div class="input-group col-md-12">
  23. <form type="get" action="." style="margin: 0">
  24. <input id="search_box" type="text" name="search_box" placeholder="Search..."> <span class="input-group-btn">
  25. <button id="search_submit" type="submit" class="btn btn-outline-dark">Suchen</button>
  26. </button>
  27. </span>
  28. </div>
  29. </form>
  30. <div>
  31. {% for post in posts %}
  32. <div class="post">
  33. <div class="date">
  34. {{ post.published_date }}
  35. </div>
  36. <h1>
  37. <a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
  38. </h1>
  39. <p>{{ post.text|linebreaks }}</p>
  40. Tags: {% for tag in post.tags.all %}
  41. <a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
  42. {% if not forloop.last %}, {% endif %} {% endfor %} <p>
  43. {{ post.author }}
  44. </p>
  45. </div>
  46. {% endfor %}
  47. </div>
  48. </div>
  49. </div>
  50. </div>
  51. </div>
  52. {% endblock %}