From b03b106fd84a65fee008b0eaebb64b966b19f9bb Mon Sep 17 00:00:00 2001 From: Esther Kleinhenz Date: Sat, 17 Nov 2018 19:57:10 +0100 Subject: [PATCH] changed tempalte design --- application/templates/base.html | 8 +- application/templates/post_detail.html | 65 +++--- application/templates/post_draft_list.html | 12 +- application/templates/post_edit.html | 12 +- application/templates/post_list.html | 39 ++-- ..._search_list_view.html => search_add.html} | 25 ++- application/templates/student_page.html | 14 -- application/templates/tag_list.html | 52 +++-- application/urls.py | 4 +- application/views.py | 12 +- .../bachelorabeit_EstherKleinhenz.log | 8 +- .../bachelorabeit_EstherKleinhenz.synctex.gz | Bin 167592 -> 167647 bytes .../bachelorabeit_EstherKleinhenz.pdf | Bin 1267456 -> 1267566 bytes .../chapters/prototyp.tex | 4 +- log.txt | 199 ++++++++++++++++++ 15 files changed, 335 insertions(+), 119 deletions(-) rename application/templates/{blog_search_list_view.html => search_add.html} (89%) delete mode 100644 application/templates/student_page.html diff --git a/application/templates/base.html b/application/templates/base.html index 9093371..3d31ecc 100644 --- a/application/templates/base.html +++ b/application/templates/base.html @@ -35,7 +35,7 @@ Dashboard {% endif %} @@ -114,7 +114,7 @@
-
+
{% block content %} {% endblock %}
diff --git a/application/templates/post_detail.html b/application/templates/post_detail.html index 2992e5c..983d865 100644 --- a/application/templates/post_detail.html +++ b/application/templates/post_detail.html @@ -1,37 +1,38 @@ {% extends 'base.html' %}{% block content %} {% load hitcount_tags %} -
- - {% if post.published_date %} -
- {{ post.published_date }} +
+
+ {% if post.published_date %} +
+ {{ post.published_date }} +
+ {% else %} + Publish + {% endif %} {% if user.is_staff and user == post.author %} + + Bearbeiten + + + Löschen + + {% endif %} +

{{ post.title }}

+

{{ post.text|linebreaksbr }}

+

+ Tags: + {% for tag in post.tags.all %} + {{ tag.name }} + {% if not forloop.last %}, {% endif %} + {% endfor %} +

+

+ Autor: {{ post.author }} +

+ {% if user.is_staff %} +

+ {% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen! +

+ {% endif %}
- {% else %} - Publish - {% endif %} {% if user.is_staff and user == post.author %} - - Bearbeiten - - - Löschen - - {% endif %} -

{{ post.title }}

-

{{ post.text|linebreaksbr }}

-

- Tags: - {% for tag in post.tags.all %} - {{ tag.name }} - {% if not forloop.last %}, {% endif %} - {% endfor %} -

-

- Autor: {{ post.author }} -

- {% if user.is_staff %} -

- {% get_hit_count for post %} Benutzer haben diesen Post bereits gelesen! -

- {% endif %}
{% endblock %} \ No newline at end of file diff --git a/application/templates/post_draft_list.html b/application/templates/post_draft_list.html index 61613ee..8b4f26a 100644 --- a/application/templates/post_draft_list.html +++ b/application/templates/post_draft_list.html @@ -1,11 +1,17 @@ {% extends 'base.html' %} {% block content %} - {% for post in posts %} -
+
+
+

Unveröffentliche Artikel
+

+ {% for post in posts %} +

created: {{ post.created_date|date:'d-m-Y' }}

{{ post.title }}

{{ post.text|truncatechars:200 }}

- {% endfor %} +
+
+{% endfor %} {% endblock %} \ No newline at end of file diff --git a/application/templates/post_edit.html b/application/templates/post_edit.html index bef4efb..d1b6f18 100644 --- a/application/templates/post_edit.html +++ b/application/templates/post_edit.html @@ -1,9 +1,13 @@ {% extends 'base.html' %} {% block content %} -

Artikel-Editor

-
{% csrf_token %} +
+
+

Artikel-Editor

+ {% csrf_token %} {{ form.as_p }} - - + + +
+
{% endblock %} \ No newline at end of file diff --git a/application/templates/post_list.html b/application/templates/post_list.html index e6413fa..323b35b 100644 --- a/application/templates/post_list.html +++ b/application/templates/post_list.html @@ -1,20 +1,34 @@ -{% extends 'base.html' %} {% block content %} -{% if tag %} Posts tagged with "{{ tag.name }}" {% endif %} - {% if messages %} -
- {% for message in messages %} -

{{ message }}

- {% endfor %} +{% extends 'base.html' %} {% block content %} +
+ + + {% if tag %}
+

Artikel mit dem Tag "{{ tag.name }}"

+
{% endif %} +
+
+
+

Artikleübersicht

+
- {% endif %} +
+
+
+ +{% if messages %}
+ {% for message in messages %} +

{{ message }}

+ {% endfor %} +
+{% endif %} {% for post in posts %} -
+
{{ post.published_date }}
-

+

{{ post.title }} -

+

{{ post.text|linebreaks }}

Tags: {% for tag in post.tags.all %} {{ tag.name }} @@ -22,6 +36,7 @@ {{ post.author }}

-{% endfor %} +{% endfor %} +
{% endblock %} \ No newline at end of file diff --git a/application/templates/blog_search_list_view.html b/application/templates/search_add.html similarity index 89% rename from application/templates/blog_search_list_view.html rename to application/templates/search_add.html index b033ffd..e9e5b82 100644 --- a/application/templates/blog_search_list_view.html +++ b/application/templates/search_add.html @@ -2,10 +2,11 @@ {% load taggit_templatetags2_tags %}