add searching for posts by date

This commit is contained in:
2021-05-07 11:01:21 +00:00
parent d6de6218c3
commit b314611cdb
6 changed files with 224 additions and 22 deletions

View File

@@ -3,12 +3,55 @@
{% block content %}
<div class="grid-container">
<div class="grid-x">
<div class="medium-8 cell">
{% for post in posts %}
{% include 'posts/partials/_posts_hero.html' %}
<div class="grid-x grid-margin-x">
<div class="cell medium-8">
{% for message in messages %}
<p id="messages" style="background-color: red">{{message}}</p>
{% endfor %}
</div>
</div>
<form action="" method="post">
{% csrf_token %}
<div class="grid-x grid-margin-x padding-top-1">
{{ formset.management_form }}
{% for form in formset %}
<div class="cell medium-3 large-2 small-10">
{{ form.label }}
{{ form }}
</div>
{% endfor %}
<div class="cell medium-3 large-2 small-10 align-self-middle">
<input type="checkbox" id="compact_view" name="checkbox" value="compact_view" {% if compact_view %} checked {% endif %}>
<label for="compact_view">kompakte Ansicht</label>
<input type="checkbox" id="fet_meeting_only" name="checkbox" value="fet_meeting_only" {% if fet_meeting_only %} checked {% endif %}>
<label for="fet_meeting_only">nur FET Sitzung</label>
</div>
<div class="cell medium-3 large-2 small-10 align-self-bottom">
<input type="submit" class="button" name="btn_input" value="Suchen">
</div>
</div>
</form>
<div class="grid-x">
<div class="cell medium-8">
{% if compact_view %}
{% for post in posts %}
{% include 'posts/partials/_posts_hero_compact.html' %}
{% endfor %}
{% else %}
{% for post in posts %}
{% include 'posts/partials/_posts_hero.html' %}
{% endfor %}
{% endif %}
</div>
</div>
</div>
{% endblock %}