clean up section and detail views a bit
This commit is contained in:
parent
fae6f31794
commit
01915865ef
5 changed files with 118 additions and 112 deletions
|
|
@ -3,7 +3,9 @@
|
||||||
{% load cms_tags %}
|
{% load cms_tags %}
|
||||||
{% load menu_tags %}
|
{% load menu_tags %}
|
||||||
|
|
||||||
{% block navbar %}{% endblock %}
|
{% block navbar %}
|
||||||
|
{% include "header_reduced.html" %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
{% block body %}
|
{% block body %}
|
||||||
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
<nav class="breadcrumb-container" aria-label="breadcrumb">
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
{% extends CMS_TEMPLATE %}
|
{% extends "froide_govplan/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load markup %}
|
{% load markup %}
|
||||||
{% load cms_tags %}
|
{% load cms_tags %}
|
||||||
{% load follow_tags %}
|
{% load follow_tags %}
|
||||||
|
{% load govplan %}
|
||||||
|
|
||||||
{% block title %}{{ object.title }}{% endblock %}
|
{% block title %}{{ object.title }}{% endblock %}
|
||||||
|
|
||||||
|
|
@ -14,53 +15,54 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block app_body %}
|
{% block app_body %}
|
||||||
<div class="container mb-5">
|
<div class="container">
|
||||||
<div class="row justify-content-center mb-5">
|
<div class="box-card border-yellow md:shadow-yellow bg-white mb-5">
|
||||||
<div class="col col-lg-8 mt-md-n5">
|
<div>
|
||||||
<div class="box-card border-yellow md:shadow-yellow bg-white">
|
<div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
|
||||||
<div>
|
<h1 class="mt-0 h3">
|
||||||
<div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
|
{{ object.title }}
|
||||||
<h1 class="mt-0 h3">
|
</h1>
|
||||||
{{ object.title }}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="d-md-flex my-3 align-items-center">
|
<div class="d-md-flex my-4 align-items-center">
|
||||||
<ul class="list-unstyled d-flex m-0">
|
<ul class="list-unstyled d-flex m-0">
|
||||||
<li>
|
<li>
|
||||||
<span class="badge badge-{{ object.get_status_css }} mr-2">
|
<span class="badge badge-{{ object.get_status_css }} mr-2">
|
||||||
{{ object.get_status_display }}
|
{{ object.get_status_display }}
|
||||||
</span>
|
</span>
|
||||||
</li>
|
</li>
|
||||||
{% for cat in object.categories.all %}
|
{% for cat in object.categories.all %}
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ section.get_absolute_url }}">
|
<a href="{{ section.get_absolute_url }}" class="badge badge-light mr-2">
|
||||||
<span class="badge badge-light mr-2">{{ cat.name }}</span>
|
{{ cat.name }}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="ml-auto">
|
<div class="ml-auto">
|
||||||
{% show_follow "govplan" object %}
|
{% show_follow "govplan" object %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col col-12 col-md-7 col-lg-8 order-md-2 offset-lg-1">
|
||||||
{% if object.quote %}
|
{% if object.quote %}
|
||||||
<blockquote>
|
<blockquote>
|
||||||
{{ object.quote | markdown }}
|
{{ object.quote | addquotes | markdown }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% with refs=object.get_reference_links %}
|
{% with refs=object.get_reference_links %}
|
||||||
{% if refs %}
|
{% if refs %}
|
||||||
<p class="small">
|
<p>
|
||||||
|
<span class="small">
|
||||||
{% if refs|length > 1 %}
|
{% if refs|length > 1 %}
|
||||||
Quellen:
|
Quellen:
|
||||||
{% else %}
|
{% else %}
|
||||||
Quelle:
|
Quelle:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</span>
|
||||||
{% for ref in refs %}
|
{% for ref in refs %}
|
||||||
<a href="{{ ref }}" target="_blank">
|
<a href="{{ ref }}" class="badge badge-light mr-2" target="_blank">
|
||||||
{{ forloop.counter }}
|
{{ forloop.counter }}
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
@ -68,80 +70,71 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
|
|
||||||
{% if object.organization %}
|
{% if object.description %}
|
||||||
<p>
|
<div class="mt-5">
|
||||||
Dieses Vorhaben wird beobachtet von
|
{{ object.description | safe }}
|
||||||
<a href="{{ object.organization.website }}">
|
</div>
|
||||||
{{ object.organization.name }}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col col-12 col-md-5 col-lg-3 mt-5 mt-md-0">
|
||||||
|
<dl>
|
||||||
|
{% if object.rating %}
|
||||||
|
<dt>Bewertung</dt>
|
||||||
|
<dd>{{ object.get_rating_display }}</dd>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.measure %}
|
||||||
|
<dt>Art der Umsetzung</dt>
|
||||||
|
<dd>{{ object.measure }}</dd>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.due_date %}
|
||||||
|
<dt>Frist</dt>
|
||||||
|
<dd>{{ object.due_date|date:"SHORT_DATE_FORMAT" }}</dd>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.responsible_publicbody %}
|
||||||
|
<dt>Federführung</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="{{ object.responsible_publicbody.get_absolute_url }}">
|
||||||
|
{{ object.responsible_publicbody.name }}
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
|
{% if object.organization %}
|
||||||
|
<dt>Beobachtet von</dt>
|
||||||
|
<dd>
|
||||||
|
<a href="{{ object.organization.website }}">
|
||||||
|
<img src="{{ object.organization.logo.url }}" class="img-sm" alt="{{ object.organization.name }}">
|
||||||
|
</a>
|
||||||
|
</dd>
|
||||||
|
{% endif %}
|
||||||
|
</dl>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
{% for update in updates %}
|
||||||
|
<h4>{{ update.title }}</h4>
|
||||||
|
|
||||||
<div class="container">
|
<time>{{ update.timestamp|date:"DATE_FORMAT" }}</time>
|
||||||
<dl>
|
|
||||||
{% if object.rating %}
|
|
||||||
<dt>Bewertung</dt>
|
|
||||||
<dd>{{ object.get_rating_display }}</dd>
|
|
||||||
{% endif %}
|
|
||||||
{% if object.measure %}
|
|
||||||
<dt>Art der Umsetzung</dt>
|
|
||||||
<dd>{{ object.measure }}</dd>
|
|
||||||
{% endif %}
|
|
||||||
{% if object.due_date %}
|
|
||||||
<dt>Frist</dt>
|
|
||||||
<dd>{{ object.due_date|date:"SHORT_DATE_FORMAT" }}</dd>
|
|
||||||
{% endif %}
|
|
||||||
</dl>
|
|
||||||
|
|
||||||
<div>
|
<small>von {% if update.user %}{{ update.user.get_full_name }}{% endif %}{% if update.organization %}({{ update.organization.name }}){% endif %}
|
||||||
{{ object.description | safe }}
|
</small>
|
||||||
</div>
|
|
||||||
|
|
||||||
|
{{ update.content|markdown }}
|
||||||
|
|
||||||
|
{% if update.url %}
|
||||||
|
<a href="{{ update.url }}">Mehr lesen</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if object.responsible_publicbody %}
|
{% if update.foirequest %}
|
||||||
<p>
|
<p>
|
||||||
Federführung:
|
Relevante Anfrage:
|
||||||
<a href="{{ object.responsible_publicbody.get_absolute_url }}">
|
<a href="{{ update.foirequest.get_absolute_url }}">
|
||||||
{{ object.responsible_publicbody.name }}
|
{{ update.foirequest.title }}
|
||||||
</a>
|
</a>
|
||||||
</p>
|
</p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
{% endfor %}
|
||||||
<h3>Neueste Entwicklungen</h3>
|
</div>
|
||||||
{% for update in updates %}
|
|
||||||
<h4>{{ update.title }}</h4>
|
|
||||||
|
|
||||||
<time>{{ update.timestamp|date:"DATE_FORMAT" }}</time>
|
|
||||||
|
|
||||||
<small>von {% if update.user %}{{ update.user.get_full_name }}{% endif %}{% if update.organization %}({{ update.organization.name }}){% endif %}
|
|
||||||
</small>
|
|
||||||
|
|
||||||
{{ update.content|markdown }}
|
|
||||||
|
|
||||||
{% if update.url %}
|
|
||||||
<a href="{{ update.url }}">Mehr lesen</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if update.foirequest %}
|
|
||||||
<p>
|
|
||||||
Relevante Anfrage:
|
|
||||||
<a href="{{ update.foirequest.get_absolute_url }}">
|
|
||||||
{{ update.foirequest.title }}
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
{% endif %}
|
|
||||||
{% empty %}
|
|
||||||
Keine Entwicklungen
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
{% load thumbnail %}
|
{% load thumbnail %}
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% load govplan %}
|
||||||
|
|
||||||
{% if object_list|length == 0 %}
|
{% if object_list|length == 0 %}
|
||||||
<p>
|
<p>
|
||||||
|
|
@ -10,21 +11,28 @@
|
||||||
{% for object in object_list %}
|
{% for object in object_list %}
|
||||||
<div class="col col-12 col-md-6 col-lg-4 d-flex mb-3">
|
<div class="col col-12 col-md-6 col-lg-4 d-flex mb-3">
|
||||||
<a href="{{ object.get_absolute_url }}" class="d-flex w-100 text-body text-decoration-none">
|
<a href="{{ object.get_absolute_url }}" class="d-flex w-100 text-body text-decoration-none">
|
||||||
<div class="box-card border-blue w-100 shadow-blue">
|
<div class="box-card border-blue w-100 bg-white shadow-blue">
|
||||||
<div class="box-card-header p-3 bg-blue-20">
|
<div class="box-card-header p-3 bg-blue-20">
|
||||||
<h3 class="h6 m-0">
|
<h3 class="h6 m-0">
|
||||||
{{ object.title }}
|
{{ object.title }}
|
||||||
</h3>
|
</h3>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-3 tight-margin">
|
<div class="p-3 tight-margin d-flex flex-column flex-1 h-100">
|
||||||
{% if object.quote %}
|
{% if object.quote %}
|
||||||
<blockquote>
|
<blockquote>
|
||||||
„{{ object.quote|striptags|truncatewords:20 }}“
|
{{ object.quote|striptags|truncatewords:20|addquotes }}
|
||||||
</blockquote>
|
</blockquote>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<span class="badge badge-{{ object.get_status_css }} mt-auto">
|
<div class="d-flex mt-auto">
|
||||||
{{ object.get_status_display }}
|
<span href="{{ object.get_absolute_url }}" class="action-link text-blue-600">
|
||||||
</span>
|
→ mehr lesen
|
||||||
|
</span>
|
||||||
|
<div class="ml-auto">
|
||||||
|
<span class="badge badge-{{ object.get_status_css }}">
|
||||||
|
{{ object.get_status_display }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
{% extends CMS_TEMPLATE %}
|
{% extends "froide_govplan/base.html" %}
|
||||||
|
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
{% load markup %}
|
{% load markup %}
|
||||||
|
|
@ -15,9 +15,9 @@
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block app_body %}
|
{% block app_body %}
|
||||||
<div class="container mb-5">
|
<div class="container">
|
||||||
<div class="row justify-content-center mb-5">
|
<div class="row justify-content-center mb-3">
|
||||||
<div class="col col-lg-8 mt-md-n5">
|
<div class="col col-lg-12">
|
||||||
<div class="box-card {% comment %} box-card-has-image-lg {% endcomment %} border-yellow md:shadow-yellow bg-white">
|
<div class="box-card {% comment %} box-card-has-image-lg {% endcomment %} border-yellow md:shadow-yellow bg-white">
|
||||||
<div>
|
<div>
|
||||||
{% comment %} <div class="box-card-image overlap-right text-center">
|
{% comment %} <div class="box-card-image overlap-right text-center">
|
||||||
|
|
@ -47,26 +47,24 @@
|
||||||
</div> {% endcomment %}
|
</div> {% endcomment %}
|
||||||
|
|
||||||
<div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
|
<div class="flex-grow-1 tight-margin p-3 p-md-4 p-lg-5">
|
||||||
<h1 class="mt-0">
|
<h1 class="mt-0 h2">
|
||||||
{{ object.title }}
|
{{ object.title }}
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p>
|
<p class="col-lg-8 px-0">
|
||||||
{% blocktranslate with section=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.
|
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 %}
|
{% endblocktranslate %}
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
{% page_url 'koalitionstracker' as base_url %}
|
<!-- {% page_url 'koalitionstracker' as base_url %}
|
||||||
<a href="{{ base_url }}" class="action-link">zurück zu allen Kategorien</a>
|
<a href="{{ base_url }}" class="action-link">zurück zu allen Kategorien</a> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
{% include "froide_govplan/plugins/card_cols.html" with object_list=plans %}
|
{% include "froide_govplan/plugins/card_cols.html" with object_list=plans %}
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
|
||||||
|
|
@ -41,3 +41,8 @@ def get_plan_progress(object_list):
|
||||||
@register.inclusion_tag("froide_govplan/plugins/progress.html")
|
@register.inclusion_tag("froide_govplan/plugins/progress.html")
|
||||||
def get_section_progress(section):
|
def get_section_progress(section):
|
||||||
return {"object_list": section.get_plans()}
|
return {"object_list": section.get_plans()}
|
||||||
|
|
||||||
|
|
||||||
|
@register.filter
|
||||||
|
def addquotes(text):
|
||||||
|
return f"„{str.strip(text)}“"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue