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

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