draft templates for detail and section views

This commit is contained in:
krmax44 2022-03-14 17:45:23 +01:00
parent 20fe00e8f7
commit b5b86f5c85
No known key found for this signature in database
GPG key ID: 5C499A4F4EC4EE03
4 changed files with 161 additions and 67 deletions

View file

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: 2022-03-11 23:37+0100\n"
"Last-Translator: Stefan Wehrmeyer <stefan.wehrmeyer@okfn.de>\n" "Last-Translator: Stefan Wehrmeyer <stefan.wehrmeyer@okfn.de>\n"
"Language-Team: \n" "Language-Team: \n"
@ -360,7 +360,9 @@ msgstr "%s zutreffenden Vorhaben"
#: froide_govplan/templates/froide_govplan/plugins/card_cols.html:6 #: froide_govplan/templates/froide_govplan/plugins/card_cols.html:6
msgid "" msgid ""
"Could not find any results. Try different keywords or browse the categories." "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 #: froide_govplan/templates/froide_govplan/plugins/search.html:4
#, fuzzy #, fuzzy
@ -372,6 +374,21 @@ msgstr "Durchsuche alle Vorhaben"
msgid "Search results" msgid "Search results"
msgstr "Suchergebnisse" 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 #: froide_govplan/urls.py:13
msgctxt "url part" msgctxt "url part"
msgid "<slug:gov>/plan/<slug:plan>/" msgid "<slug:gov>/plan/<slug:plan>/"

View file

@ -1,10 +1,21 @@
{% extends "cms/page.html" %} {% extends "cms/page.html" %}
{% load cms_tags %} {% load cms_tags %}
{% load menu_tags %}
{% block navbar %}{% endblock %} {% block navbar %}{% endblock %}
{% block body %} {% block body %}
<nav class="breadcrumb-container" aria-label="breadcrumb">
<div class="container">
<ol class="breadcrumb">
{# TODO: make this dynamic #}
<li class="breadcrumb-item"><a href="/koalitionstracker/">Koalitionstracker</a></li>
{% block govplan_breadcrumbs %}{% endblock %}
</ol>
</div>
</nav>
{% static_placeholder "govplan_header" %} {% static_placeholder "govplan_header" %}
{% block app_body %} {% block app_body %}
{% placeholder "content" %} {% placeholder "content" %}

View file

@ -7,25 +7,85 @@
{% block title %}{{ object.title }}{% endblock %} {% block title %}{{ object.title }}{% endblock %}
{% block govplan_breadcrumbs %}
<li class="breadcrumb-item active" aria-current="page">
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
</li>
{% endblock %}
{% block app_body %} {% block app_body %}
<div class="container mt-3 mb-5"> <div class="container mb-5">
<div class="row justify-content-center mb-5">
<div class="jumbotron"> <div class="col col-lg-8 mt-md-n5">
<small class="badge badge-light">Vorhaben der {{ object.government.name }}</small> <div class="box-card border-yellow md:shadow-yellow bg-white">
<h1 class="display-4 mt-0"> <div>
<div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
<h1 class="mt-0 h3">
{{ object.title }} {{ object.title }}
</h1> </h1>
<div class="d-md-flex my-3 align-items-center">
<ul class="list-unstyled d-flex m-0">
<li>
<span class="badge badge-{{ object.get_status_css }} mr-2">
{{ object.get_status_display }}
</span>
</li>
{% for cat in object.categories.all %}
<li>
<a href="{% comment %} TODO: link to category {% endcomment %}">
<span class="badge badge-light mr-2">{{ cat.name }}</span>
</a>
</li>
{% endfor %}
</ul>
<div class="ml-auto">
{% show_follow "govplan" object %}
</div>
</div> </div>
{% if object.image %} {% if object.quote %}
{# this should not be a dependency! #} <blockquote>
{% include "fds_blog/includes/_picture.html" with picture=object.image %} {{ object.quote | markdown }}
</blockquote>
{% endif %} {% endif %}
{% with refs=object.get_reference_links %}
{% if refs %}
<p class="small">
{% if refs|length > 1 %}
Quellen:
{% else %}
Quelle:
{% endif %}
{% for ref in refs %}
<a href="{{ ref }}" target="_blank">
{{ forloop.counter }}
</a>
{% endfor %}
</p>
{% endif %}
{% endwith %}
{% if object.organization %}
<p>
Dieses Vorhaben wird beobachtet von
<a href="{{ object.organization.website }}">
{{ object.organization.name }}
</a>
</p>
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<dl> <dl>
<dt>Status</dt>
<dd>{{ object.get_status_display }}</dd>
{% if object.rating %} {% if object.rating %}
<dt>Bewertung</dt> <dt>Bewertung</dt>
<dd>{{ object.get_rating_display }}</dd> <dd>{{ object.get_rating_display }}</dd>
@ -44,37 +104,9 @@
{{ object.description | safe }} {{ object.description | safe }}
</div> </div>
{% if object.quote %}
<details>
<summary>Zitat</summary>
<blockquote class="blockquote">
{{ object.quote | markdown }}
</blockquote>
</details>
{% endif %}
{% with refs=object.get_reference_links %}
{% if refs %}
<p>
{% if refs|length > 1 %}
Quellen:
{% else %}
Quelle:
{% endif %}
{% for ref in refs %}
<a href="{{ ref }}" target="_blank">
{{ forloop.counter }}
</a>
{% endfor %}
</p>
{% endif %}
{% endwith %}
{% show_follow "govplan" object %}
<p>
{% for cat in object.categories.all %}<span class="badge badge-light mr-2">{{ cat.name }}</span>{% endfor %}
</p>
{% if object.responsible_publicbody %} {% if object.responsible_publicbody %}
<p> <p>
@ -85,15 +117,6 @@
</p> </p>
{% endif %} {% endif %}
{% if object.organization %}
<p>
Dieses Vorhaben wird beobachtet von
<a href="{{ object.organization.website }}">
{{ object.organization.name }}
</a>
</p>
{% endif %}
<h3>Neueste Entwicklungen</h3> <h3>Neueste Entwicklungen</h3>
{% for update in updates %} {% for update in updates %}
<h4>{{ update.title }}</h4> <h4>{{ update.title }}</h4>

View file

@ -4,26 +4,69 @@
{% load markup %} {% load markup %}
{% load cms_tags %} {% load cms_tags %}
{% load follow_tags %} {% load follow_tags %}
{% load thumbnail %}
{% block title %}{{ object.title }}{% endblock %} {% block title %}{{ object.title }}{% endblock %}
{% block govplan_breadcrumbs %}
<li class="breadcrumb-item active" aria-current="page">
<a href="{{ object.get_absolute_url }}">{{ object.title }}</a>
</li>
{% endblock %}
{% block app_body %} {% block app_body %}
<div class="container mt-3 mb-5"> <div class="container mb-5">
<div class="row justify-content-center mb-5">
<div class="col col-lg-8 mt-md-n5">
<div class="box-card {% comment %} box-card-has-image-lg {% endcomment %} border-yellow md:shadow-yellow bg-white">
<div>
{% comment %} <div class="box-card-image overlap-right text-center">
{% with picture=object.image %}
<picture>
{% if ".svg" not in picture.url %}
{% thumbnail picture 280x0 crop=smart subject_location=picture.subject_location as thumb %}
<source
media="(min-width: 992px)"
srcset="{{ thumb.url }}"
/>
<source
media="(min-width: 992px)"
srcset="{{ thumb.url }}.avif"
type="image/avif"
/>
{% thumbnail picture 200x0 crop=smart subject_location=picture.subject_location as thumb %}
<source
srcset="{{ thumb.url }}.avif"
type="image/avif"
/>
{% endif %}
<img class="img-lg z-index-10" width="{{ thumb.width }}" height="{{ thumb.height }}" src="{{ thumb.url }}"
{% if picture.default_alt_text and not attributes.alt %} alt="{{ picture.default_alt_text }}"{% endif %}>
</picture>
{% endwith %}
</div> {% endcomment %}
<div class="jumbotron"> <div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
<small class="badge badge-light">{{ object.government.name }}</small> <h1 class="mt-0">
<h1 class="display-4 mt-0">
{{ object.title }} {{ object.title }}
</h1> </h1>
<p>
{% 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 %}
</p>
{# TODO: make this dynamic #}
<a href="/koalitionstracker/" class="action-link">zurück zu allen Kategorien</a>
</div>
</div>
</div>
</div>
</div>
</div> </div>
{% if object.image %} <div class="container">
{# this should not be a dependency! #} {% include "froide_govplan/plugins/card_cols.html" with object_list=plans %}
{% include "fds_blog/includes/_picture.html" with picture=object.image %}
{% endif %}
{% render_placeholder object.content_placeholder %}
</div> </div>
{% endblock %} {% endblock %}