From 41dbffaffebccb085a6dcb4667ca1ad614585924 Mon Sep 17 00:00:00 2001 From: krmax44 Date: Fri, 18 Mar 2022 09:30:09 +0100 Subject: [PATCH] link to plan update on front page --- .../froide_govplan/plugins/updates.html | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/froide_govplan/templates/froide_govplan/plugins/updates.html b/froide_govplan/templates/froide_govplan/plugins/updates.html index 54fa966..4b52c8e 100644 --- a/froide_govplan/templates/froide_govplan/plugins/updates.html +++ b/froide_govplan/templates/froide_govplan/plugins/updates.html @@ -30,18 +30,29 @@ {% if show_context %}

{{ update.title }}

{% endif %} - {{ update.content|markdown }} + + {% with update.content|markdown as content %} + {% if show_context %} + {{ content|truncatewords_html:75 }} + {% else %} + {{ content }} + {% endif %} + {% endwith %} {% endif %} - {% if update.url or update.foirequest %} + {% if update.url or update.foirequest or show_context %}
- {% if update.url %} - → Mehr auf {{ update.get_url_domain }} lesen… - {% endif %} + {% if show_context %} + → zum Vorhaben + {% else %} + {% if update.url %} + → mehr auf {{ update.get_url_domain }} lesen… + {% endif %} - {% if update.foirequest %} - → zur Anfrage + {% if update.foirequest %} + → zur Anfrage + {% endif %} {% endif %}
{% endif %}