2018-12-09 19:22:30 +01:00
|
|
|
<!--
|
|
|
|
marked parts of the template is external code
|
|
|
|
import from https://github.com/fizista/django-taggit-templatetags2
|
|
|
|
-->
|
2018-08-15 19:18:35 +02:00
|
|
|
{% extends "base.html" %} {% block content %}
|
2018-12-09 19:22:30 +01:00
|
|
|
|
|
|
|
<!-- imported start -->
|
2018-08-19 22:55:06 +02:00
|
|
|
{% load taggit_templatetags2_tags %}
|
2018-11-18 18:39:08 +01:00
|
|
|
<div class="container">
|
|
|
|
<div class="row equal">
|
2018-12-09 19:22:30 +01:00
|
|
|
<div class="col-md-6">
|
2018-11-17 19:57:10 +01:00
|
|
|
<h1> Alle Tags im Überblick<br>
|
|
|
|
</h1>
|
2018-11-18 18:39:08 +01:00
|
|
|
<div class="col-md-8" style="zoom: 1.6">
|
|
|
|
<div style="text-align:center;padding:5px;">
|
2018-11-17 15:23:17 +01:00
|
|
|
{% get_tagcloud as tags for 'application' %}
|
|
|
|
{% include_tagcloud 'application.Post' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-12-09 19:22:30 +01:00
|
|
|
<!-- imported end -->
|
|
|
|
|
2018-11-17 15:23:17 +01:00
|
|
|
<div style="padding-bottom:40px;">
|
|
|
|
</div>
|
2018-11-14 18:30:14 +01:00
|
|
|
Tag-Suche
|
|
|
|
<div id="custom-search-input">
|
2018-11-15 14:17:44 +01:00
|
|
|
<form type="get" action="." style="margin: 0" class="post-form">
|
|
|
|
<p>
|
|
|
|
<input id="search_box" type="text" name="search_box" placeholder="Search...">
|
|
|
|
</p>
|
|
|
|
<span>
|
|
|
|
<button id="search_submit" type="submit" class="save btn btn-outline-dark">Suchen</button>
|
|
|
|
</button>
|
|
|
|
</span>
|
2018-11-14 18:30:14 +01:00
|
|
|
</form>
|
2018-11-18 18:39:08 +01:00
|
|
|
<div class="pt-4">
|
2018-11-14 18:30:14 +01:00
|
|
|
{% for post in posts %}
|
|
|
|
<div class="post">
|
|
|
|
<div class="date">
|
|
|
|
{{ post.published_date }}
|
|
|
|
</div>
|
|
|
|
<h1>
|
|
|
|
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
|
|
|
|
</h1>
|
|
|
|
<p>{{ post.text|linebreaks }}</p>
|
2018-11-15 14:17:44 +01:00
|
|
|
{% for tag in post.tags.all %}
|
2018-11-14 18:30:14 +01:00
|
|
|
<a href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
|
|
|
|
{% if not forloop.last %}, {% endif %} {% endfor %} <p>
|
|
|
|
{{ post.author }}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2018-11-17 19:57:10 +01:00
|
|
|
<div class="col-md-6">
|
|
|
|
<h1> Bereits abonnierten Tags
|
|
|
|
</h1>
|
2018-11-17 15:23:17 +01:00
|
|
|
<div class="col-md-10">
|
2018-11-17 19:57:10 +01:00
|
|
|
{% if tags %}
|
2018-11-18 18:39:08 +01:00
|
|
|
<div style="text-align:center;padding-top:40px;">
|
2018-11-17 15:23:17 +01:00
|
|
|
{% for tag in tagsuser %}
|
2018-11-18 18:39:08 +01:00
|
|
|
<a class="text-white bg-dark p-3" href="{% url 'post_list_by_tag' tag.slug %}">{{ tag.name }}</a>
|
2018-11-17 15:23:17 +01:00
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2018-11-18 18:39:08 +01:00
|
|
|
<div style="padding-bottom:145px;">
|
2018-11-17 19:57:10 +01:00
|
|
|
</div>
|
2018-11-18 18:39:08 +01:00
|
|
|
<div class="mx-auto">
|
|
|
|
<div>
|
|
|
|
Abonniere deine Tags hier!
|
|
|
|
</div>
|
|
|
|
<form class="post-form" method="post">
|
|
|
|
{% csrf_token %} {{form.as_p}}
|
|
|
|
<button type="submit" class="save btn btn-outline-dark">Sichern</button>
|
|
|
|
</form>
|
|
|
|
{% if messages %}
|
|
|
|
{% for message in messages %}
|
|
|
|
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
|
|
|
|
{% endfor %}
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2018-11-15 14:17:44 +01:00
|
|
|
</div>
|
2018-11-14 18:30:14 +01:00
|
|
|
</div>
|
2018-11-15 14:17:44 +01:00
|
|
|
</div>
|
|
|
|
{% endblock %}
|