81 lines
3.0 KiB
HTML
81 lines
3.0 KiB
HTML
{% extends "base.html" %} {% block content %}
|
|
{% load taggit_templatetags2_tags %}
|
|
<div class="container-fluid">
|
|
<div class="modal-body row">
|
|
<div class="col-md-6">
|
|
<h1> Alle Tags im Überblick<br>
|
|
</h1>
|
|
<div class="col-md-10">
|
|
|
|
<div style="border:solid; text-align:center;padding:5px;">
|
|
{% get_tagcloud as tags for 'application' %}
|
|
{% include_tagcloud 'application.Post' %}
|
|
</div>
|
|
</div>
|
|
<div style="padding-bottom:40px;">
|
|
</div>
|
|
Tag-Suche
|
|
<div id="custom-search-input">
|
|
<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>
|
|
</form>
|
|
<div>
|
|
{% 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>
|
|
{% for tag in post.tags.all %}
|
|
<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>
|
|
<div class="col-md-6">
|
|
<h1> Bereits abonnierten Tags
|
|
</h1>
|
|
<div class="col-md-10">
|
|
{% if tags %}
|
|
<div style="border:solid; text-align:center;padding:5px;">
|
|
{% for tag in tagsuser %}
|
|
{{ tag.name }}
|
|
{% if not forloop.last %}, {% endif %}
|
|
{% endfor %}
|
|
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div style="padding-bottom:40px;">
|
|
</div>
|
|
<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>
|
|
</div>
|
|
</div>
|
|
{% endblock %} |