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

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