From 4a22a2724881e64e32b45053907792a0c0ddb993 Mon Sep 17 00:00:00 2001 From: Patrick Date: Tue, 8 Sep 2020 16:14:35 +0000 Subject: [PATCH] fix master --- fet2020/posts/views.py | 3 - .../templates/posts/partials/_date_box.html | 4 +- fet2020/templates/posts/show.html | 144 +++++++++--------- 3 files changed, 71 insertions(+), 80 deletions(-) diff --git a/fet2020/posts/views.py b/fet2020/posts/views.py index 494bc4bf..a57dc68e 100644 --- a/fet2020/posts/views.py +++ b/fet2020/posts/views.py @@ -70,8 +70,6 @@ def show(request, id=None): if post_author: author_image = post_author.image['avatar'].url - ep_link = (get_pad_link(p.agenda_key), get_pad_link(p.protocol_key)) - context = { "post": p, "author_image": author_image, @@ -79,7 +77,6 @@ def show(request, id=None): "related_posts": p.tags.similar_objects(), "ep_agenda_link": get_pad_link(p.agenda_key), "ep_protocol_link": get_pad_link(p.protocol_key), - } response = render(request, 'posts/show.html', context) diff --git a/fet2020/templates/posts/partials/_date_box.html b/fet2020/templates/posts/partials/_date_box.html index a982b693..016d1b13 100644 --- a/fet2020/templates/posts/partials/_date_box.html +++ b/fet2020/templates/posts/partials/_date_box.html @@ -2,8 +2,8 @@
- {{post.event_start_day}} - {{post.event_start_month}} + {{post.event_start|date:"d"}} + {{post.event_start|date:"M"}} {{post.title}} diff --git a/fet2020/templates/posts/show.html b/fet2020/templates/posts/show.html index b6c5be76..a9088b7e 100644 --- a/fet2020/templates/posts/show.html +++ b/fet2020/templates/posts/show.html @@ -5,91 +5,85 @@ {% block content %}
-
-
- -
-

{{post.title | tags_to_url }}

-
-
- {{post.subtitle | tags_to_url }} - {% if post.author != None %} - -
+
+
-
-
-

{{post.title | tags_to_url }}

-{{post.subtitle | tags_to_url }} -
- Nächster Artikel
-
-
-{% include 'posts/partials/_date_box.html' %} +
+
+

{{post.title | tags_to_url}}

+ {{post.subtitle | tags_to_url}} +
+ Nächster Artikel
-{% if post.has_agenda %} -Agenda
-{% endif %} + +
+ {% include 'posts/partials/_date_box.html' %} +
-{% if post.has_protocol %} -Protocol -{% endif %} -
-
+ Start: {{post.event_start}}
+ Ende: {{post.event_end}}
-Bearbeiten + {% if post.has_agenda %} + Agenda
+ {% endif %} -Start: {{post.event_start}}
-Ende: {{post.event_end}}
+ {% if post.has_protocol %} + Protocol + {% endif %} -{% if post.has_agenda %} -Agenda -{% endif %} + {% if request.user.is_authenticated %} + ------
+ Bearbeiten + {% endif %} -{% if post.has_protocol %} -Protokoll -{% endif %} +
+ {% for tag in post.get_tagnames %} + {{tag |tags_to_url}} + {% endfor %} -{% if request.user.is_authenticated %} -
------
-Bearbeiten -{% endif %} +
+ {{post.body | safe | add_internal_links | tags_to_url}} +
+
-
-{{post.body | safe | add_internal_links | tags_to_url}} - -
-{% for tag in post.get_tagnames %} -{{tag |tags_to_url}} -{% endfor %} -
-{{post.body | safe | add_internal_links | tags_to_url}} - -
-
- -{% for post in related_posts %} -
- {% include 'posts/partials/_posts_hero.html' %} -
- {% endfor %} -
+
+
+ {% for post in related_posts %} +
+ {% include 'posts/partials/_posts_hero.html' %} +
+ {% endfor %} +
{% endblock %}fffsdfag \ No newline at end of file