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 3.0KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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-8">
  6. <p> Alle Tags im Überblick<br>
  7. </p>
  8. <div class="col-md-5">
  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-4">
  48. <p> Bereits abonnierten Tags
  49. </p>
  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. Abonniere deine Tags hier!
  63. <form class="post-form" method="post">
  64. {% csrf_token %} {{form.as_p}}
  65. <button type="submit" class="save btn btn-outline-dark">Sichern</button>
  66. </form>
  67. {% if messages %}
  68. {% for message in messages %}
  69. <div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
  70. {% endfor %}
  71. {% endif %}
  72. </div>
  73. </div>
  74. </div>
  75. {% endblock %}