changed dashoard and added sicherheit und template

This commit is contained in:
Esther Kleinhenz
2018-11-15 14:17:44 +01:00
parent 39b964c4e8
commit e50439a1ff
25 changed files with 1767 additions and 1687 deletions
+3 -3
View File
@@ -32,7 +32,7 @@
<a class="nav-link" href="{% url 'admin:index' %}">Administration</a>
</li>
<li>
<a class="nav-link" href="{% url 'post_list' %}">Dashboard</a>
<a class="nav-link" href="{% url 'tag_list' %}">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'blog_search_list_view' %}">Suche</a>
@@ -49,7 +49,7 @@
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'post_list' %}">Dashboard</a>
<a class="nav-link" href="{% url 'tag_list' %}">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'blog_search_list_view' %}">Suche</a>
@@ -62,7 +62,7 @@
</li>
{% else %}
<li class="nav-item">
<a class="nav-link" href="{% url 'post_list' %}">{{user.get_username}}'s Dashboard</a>
<a class="nav-link" href="{% url 'tag_list' %}">{{user.get_username}}'s Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'blog_search_list_view' %}">Suche</a>
@@ -4,28 +4,17 @@
{% include_tagcloud 'application.Post' %}
<div class="container-fluid">
<div class="modal-body row">
<div class="col-md-6">
Abonniere deine Tags hier!
<form class="post-form" method="post">
{% csrf_token %} {{form.as_p}}
<button type="submit" class="save btn btn-outline-dark">Save</button>
</form>
{% if messages %}
{% for message in messages %}
<div {% if message.tags %} class="{{ message.tags }}" {% endif %}>{{ message }}</div>
{% endfor %}
{% endif %}
</div>
<div class="col-md-6">
Tag-Suche
<div id="custom-search-input">
<div class="input-group col-md-12">
<form type="get" action="." style="margin: 0">
<input id="search_box" type="text" name="search_box" placeholder="Search..."> <span class="input-group-btn">
<button id="search_submit" type="submit" class="btn btn-outline-dark">Suchen</button>
</button>
</span>
</div>
<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 %}
@@ -37,7 +26,7 @@
<a href="{% url 'post_detail' pk=post.pk %}">{{ post.title }}</a>
</h1>
<p>{{ post.text|linebreaks }}</p>
Tags: {% for tag in post.tags.all %}
{% 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 }}
@@ -47,6 +36,18 @@
</div>
</div>
</div>
<div class="col-md-6">
Abonniere deine Tags hier!
<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 %}
</div>
{% endblock %}
+4 -1
View File
@@ -4,6 +4,10 @@
<div>
</div>
<div>
<a id="search_submit" href="/posts" class="save btn btn-outline-dark">alle Artikel
</a>
{% for post in posts %}
<div class="post">
<div class="date">
@@ -19,7 +23,6 @@
{{ post.author }}
</p>
</div>
{% endfor %}
</div>
{% endblock %}