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.

search_add.html 3.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. {% extends "base.html" %} {% block content %}
  2. {% load taggit_templatetags2_tags %}
  3. <div class="container">
  4. <div class="row equal">
  5. <div class="col-md-6" >
  6. <h1> Alle Tags im Überblick<br>
  7. </h1>
  8. <div class="col-md-8" style="zoom: 1.6">
  9. <div style="text-align:center;padding:5px;">
  10. {% get_tagcloud as tags for 'application' %}
  11. {% include_tagcloud 'application.Post' %}
  12. </div>
  13. </div>
  14. <div style="padding-bottom:40px;">
  15. </div>
  16. Tag-Suche
  17. <div id="custom-search-input">
  18. <form type="get" action="." style="margin: 0" class="post-form">
  19. <p>
  20. <input id="search_box" type="text" name="search_box" placeholder="Search...">
  21. </p>
  22. <span>
  23. <button id="search_submit" type="submit" class="save btn btn-outline-dark">Suchen</button>
  24. </button>
  25. </span>
  26. </form>
  27. <div class="pt-4">
  28. {% for post in posts %}
  29. <div class="post">
  30. <div class="date">
  31. {{ post.published_date }}
  32. </div>
  33. <h1>
  34. <a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
  35. </h1>
  36. <p>{{ post.text|linebreaks }}</p>
  37. {% for tag in post.tags.all %}
  38. <a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
  39. {% if not forloop.last %}, {% endif %} {% endfor %} <p>
  40. {{ post.author }}
  41. </p>
  42. </div>
  43. {% endfor %}
  44. </div>
  45. </div>
  46. </div>
  47. <div class="col-md-6">
  48. <h1> Bereits abonnierten Tags
  49. </h1>
  50. <div class="col-md-10">
  51. {% if tags %}
  52. <div style="text-align:center;padding-top:40px;">
  53. {% for tag in tagsuser %}
  54. <a class="text-white bg-dark p-3" href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
  55. {% endfor %}
  56. </div>
  57. {% endif %}
  58. </div>
  59. <div style="padding-bottom:145px;">
  60. </div>
  61. <div class="mx-auto">
  62. <div>
  63. Abonniere deine Tags hier!
  64. </div>
  65. <form class="post-form" method="post">
  66. {% csrf_token %} {{form.as_p}}
  67. <button type="submit" class="save btn btn-outline-dark">Sichern</button>
  68. </form>
  69. {% if messages %}
  70. {% for message in messages %}
  71. <div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
  72. {% endfor %}
  73. {% endif %}
  74. </div>
  75. </div>
  76. </div>
  77. </div>
  78. {% endblock %}