From b5b86f5c8520dc698eec2e18ae7cbc6e004f7a64 Mon Sep 17 00:00:00 2001 From: krmax44 Date: Mon, 14 Mar 2022 17:45:23 +0100 Subject: [PATCH] draft templates for detail and section views --- .../locale/de/LC_MESSAGES/django.po | 21 ++- .../templates/froide_govplan/base.html | 11 ++ .../templates/froide_govplan/detail.html | 125 +++++++++++------- .../templates/froide_govplan/section.html | 71 ++++++++-- 4 files changed, 161 insertions(+), 67 deletions(-) diff --git a/froide_govplan/locale/de/LC_MESSAGES/django.po b/froide_govplan/locale/de/LC_MESSAGES/django.po index 9c25963..56f0f4f 100644 --- a/froide_govplan/locale/de/LC_MESSAGES/django.po +++ b/froide_govplan/locale/de/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2022-03-14 16:24+0100\n" +"POT-Creation-Date: 2022-03-14 16:55+0100\n" "PO-Revision-Date: 2022-03-11 23:37+0100\n" "Last-Translator: Stefan Wehrmeyer \n" "Language-Team: \n" @@ -360,7 +360,9 @@ msgstr "%s zutreffenden Vorhaben" #: froide_govplan/templates/froide_govplan/plugins/card_cols.html:6 msgid "" "Could not find any results. Try different keywords or browse the categories." -msgstr "Keine Ergebnisse gefunden. Versuchen Sie es mit anderen Stichworten oder durchsuchen Sie passende Kategorien." +msgstr "" +"Keine Ergebnisse gefunden. Versuchen Sie es mit anderen Stichworten oder " +"durchsuchen Sie passende Kategorien." #: froide_govplan/templates/froide_govplan/plugins/search.html:4 #, fuzzy @@ -372,6 +374,21 @@ msgstr "Durchsuche alle Vorhaben" msgid "Search results" msgstr "Suchergebnisse" +#: froide_govplan/templates/froide_govplan/section.html:18 +#, python-format +msgid "" +"\n" +" Here you can find all plans of the section \"%(section)s\", which the " +"coalition constituted in their agreement. On the curresponding detail pages, " +"you'll get more information, stay up to date with news or submit changes.\n" +" " +msgstr "" +"\n" +" Hier finden Sie alle Vorhaben aus dem Bereich „%(section)s“, welche die " +"Ampelkoalition im Koalitionsvertrag festgelegt hat. Auf den jeweiligen Detailseiten " +"erhalten Sie mehr Informationen, können Neuigkeiten abonnieren oder Änderungen einreichen." +" " + #: froide_govplan/urls.py:13 msgctxt "url part" msgid "/plan//" diff --git a/froide_govplan/templates/froide_govplan/base.html b/froide_govplan/templates/froide_govplan/base.html index 12feef9..93f4825 100644 --- a/froide_govplan/templates/froide_govplan/base.html +++ b/froide_govplan/templates/froide_govplan/base.html @@ -1,10 +1,21 @@ {% extends "cms/page.html" %} {% load cms_tags %} +{% load menu_tags %} {% block navbar %}{% endblock %} {% block body %} + + {% static_placeholder "govplan_header" %} {% block app_body %} {% placeholder "content" %} diff --git a/froide_govplan/templates/froide_govplan/detail.html b/froide_govplan/templates/froide_govplan/detail.html index 53d71d9..10adff7 100644 --- a/froide_govplan/templates/froide_govplan/detail.html +++ b/froide_govplan/templates/froide_govplan/detail.html @@ -7,25 +7,85 @@ {% block title %}{{ object.title }}{% endblock %} +{% block govplan_breadcrumbs %} + +{% endblock %} {% block app_body %} -
+
+
+
+
+
+
+

+ {{ object.title }} +

-
- Vorhaben der {{ object.government.name }} -

- {{ object.title }} -

+
+
    +
  • + + {{ object.get_status_display }} + +
  • + {% for cat in object.categories.all %} +
  • + + {{ cat.name }} + +
  • + {% endfor %} +
+ +
+ {% show_follow "govplan" object %} +
+
+ + {% if object.quote %} +
+ {{ object.quote | markdown }} +
+ {% endif %} + + {% with refs=object.get_reference_links %} + {% if refs %} +

+ {% if refs|length > 1 %} + Quellen: + {% else %} + Quelle: + {% endif %} + {% for ref in refs %} + + {{ forloop.counter }} + + {% endfor %} +

+ {% endif %} + {% endwith %} + + {% if object.organization %} +

+ Dieses Vorhaben wird beobachtet von + + {{ object.organization.name }} + +

+ {% endif %} +
+
+
+
+
- {% if object.image %} - {# this should not be a dependency! #} - {% include "fds_blog/includes/_picture.html" with picture=object.image %} - {% endif %} +
-
Status
-
{{ object.get_status_display }}
{% if object.rating %}
Bewertung
{{ object.get_rating_display }}
@@ -44,37 +104,9 @@ {{ object.description | safe }}
- {% if object.quote %} -
- Zitat -
- {{ object.quote | markdown }} -
-
- {% endif %} + - {% with refs=object.get_reference_links %} - {% if refs %} -

- {% if refs|length > 1 %} - Quellen: - {% else %} - Quelle: - {% endif %} - {% for ref in refs %} - - {{ forloop.counter }} - - {% endfor %} -

- {% endif %} - {% endwith %} - - {% show_follow "govplan" object %} - -

- {% for cat in object.categories.all %}{{ cat.name }}{% endfor %} -

+ {% if object.responsible_publicbody %}

@@ -85,15 +117,6 @@

{% endif %} - {% if object.organization %} -

- Dieses Vorhaben wird beobachtet von - - {{ object.organization.name }} - -

- {% endif %} -

Neueste Entwicklungen

{% for update in updates %}

{{ update.title }}

diff --git a/froide_govplan/templates/froide_govplan/section.html b/froide_govplan/templates/froide_govplan/section.html index f58575c..4facff1 100644 --- a/froide_govplan/templates/froide_govplan/section.html +++ b/froide_govplan/templates/froide_govplan/section.html @@ -4,26 +4,69 @@ {% load markup %} {% load cms_tags %} {% load follow_tags %} +{% load thumbnail %} {% block title %}{{ object.title }}{% endblock %} +{% block govplan_breadcrumbs %} + +{% endblock %} {% block app_body %} -
+
+
+
+
+
+ {% comment %}
+ {% with picture=object.image %} + + {% if ".svg" not in picture.url %} + {% thumbnail picture 280x0 crop=smart subject_location=picture.subject_location as thumb %} + + + {% thumbnail picture 200x0 crop=smart subject_location=picture.subject_location as thumb %} + + {% endif %} + {{ picture.default_alt_text }} + + {% endwith %} +
{% endcomment %} -
- {{ object.government.name }} -

- {{ object.title }} -

+
+

+ {{ object.title }} +

+ +

+ {% blocktranslate with section=object.title %} + Here you can find all plans of the section "{{section}}", which the coalition constituted in their agreement. On the curresponding detail pages, you'll get more information, stay up to date with news or submit changes. + {% endblocktranslate %} +

+ + {# TODO: make this dynamic #} + zurück zu allen Kategorien +
+
+
- - {% if object.image %} - {# this should not be a dependency! #} - {% include "fds_blog/includes/_picture.html" with picture=object.image %} - {% endif %} - - {% render_placeholder object.content_placeholder %} -
+
+ +
+ {% include "froide_govplan/plugins/card_cols.html" with object_list=plans %} +
{% endblock %}