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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. {% extends "base.html" %} {% block content %}
  2. {% load taggit_templatetags2_tags %}
  3. <div class="container-fluid">
  4. <div class="modal-body row">
  5. <div class="col-md-6">
  6. <h1> Alle Tags im Überblick<br>
  7. </h1>
  8. <div class="col-md-10">
  9. <div style="border:solid; 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>
  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="border:solid; text-align:center;padding:5px;">
  53. {% for tag in tagsuser %}
  54. {{ tag.name }}
  55. {% if not forloop.last %}, {% endif %}
  56. {% endfor %}
  57. </div>
  58. {% endif %}
  59. </div>
  60. <div style="padding-bottom:40px;">
  61. </div>
  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. {% endblock %}