fix detail page updates
This commit is contained in:
parent
b3bbfc5d30
commit
0b7d568a46
2 changed files with 86 additions and 2 deletions
|
|
@ -66,7 +66,7 @@
|
||||||
{% if object.responsible_publicbody %}
|
{% if object.responsible_publicbody %}
|
||||||
{% if not object.has_recent_foirequest and government.active %}
|
{% if not object.has_recent_foirequest and government.active %}
|
||||||
<p>
|
<p>
|
||||||
<a href="#"
|
<a href="https://fragdenstaat.de/anfrage-stellen/an/{{ object.responsible_publicbody.other_names }}/?subject=Stand des Verwaltungsvorhabens „{{ object.title }}“&body=Dokumente, die den Stand des Verwaltungsvorhabens zum Thema {{ object.title }}, dokumentieren.&ref=verwaltungstracker:plan@358&tags=Verwaltungstracker&hide_public=1&hide_similar=1&hide_draft=1"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
class="btn btn-outline-primary btn-sm">Anfrage zum Vorhaben stellen</a>
|
class="btn btn-outline-primary btn-sm">Anfrage zum Vorhaben stellen</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
{% load markup %}
|
{% load markup %}
|
||||||
|
|
||||||
|
{% if request.path == '/' %}
|
||||||
|
|
||||||
<div class="py-3">
|
<div class="py-3">
|
||||||
<h1 class="text-body-emphasis">Aktuelles</h1>
|
<h1 class="text-body-emphasis">Aktuelles</h1>
|
||||||
<p class="fs-5 col-md-8">
|
<p class="fs-5 col-md-8">
|
||||||
|
|
@ -163,3 +165,85 @@
|
||||||
<span class="visually-hidden">Weiter</span>
|
<span class="visually-hidden">Weiter</span>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
{% else %}
|
||||||
|
|
||||||
|
<div class="py-3">
|
||||||
|
<h1 class="text-body-emphasis">Aktuelles</h1>
|
||||||
|
<p class="fs-5 col-md-8">
|
||||||
|
Hier finden Sie aktuelle Artikel und Links zu Blogs zu den Fortschritten des Vorhabens.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row row-cols-1 row-cols-sm-2 row-cols-md-3 g-4">
|
||||||
|
{% for update in updates %}
|
||||||
|
<div class="col">
|
||||||
|
<div class="card mb-4 rounded-3 shadow-sm">
|
||||||
|
<a href="{{ update.get_absolute_url }}" class="text-body text-decoration-none">
|
||||||
|
<div class="card-header p-3 tight-margin text-start">
|
||||||
|
{% if show_context %}
|
||||||
|
<span class="badge text-bg-blue-100 rounded-pill float-md-right mb-2 mb-md-0">
|
||||||
|
{{ update.plan.get_section }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if show_context %}
|
||||||
|
<h3 class="h5 mt-0">{{ update.plan }}</h3>
|
||||||
|
{% else %}
|
||||||
|
<h3 class="h4 mt-0">{{ update.title }}</h3>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<div class="small">
|
||||||
|
<time datetime="{{ update.timestamp|date:'c' }}">{{ update.timestamp|date:"DATE_FORMAT" }}</time>
|
||||||
|
|
||||||
|
{% if update.user or update.organization %}
|
||||||
|
<span>
|
||||||
|
von {{ update.user.get_full_name }}{% if update.user and update.organization %},{% endif %}
|
||||||
|
{{ update.organization.name }}
|
||||||
|
</span>
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
<div class="card-body tight-margin text-start">
|
||||||
|
|
||||||
|
{% if update.content or show_context %}
|
||||||
|
<div class="tight-margin">
|
||||||
|
{% if show_context %}
|
||||||
|
<h4 class="h5">{{ update.title }}</h4>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% with update.content|markdown as content %}
|
||||||
|
{% if show_context %}
|
||||||
|
{{ content|truncatewords_html:50 }}
|
||||||
|
{% else %}
|
||||||
|
{{ content }}
|
||||||
|
{% endif %}
|
||||||
|
{% endwith %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if update.url or update.foirequest or show_context %}
|
||||||
|
<div class="{% if update.content %}box-card-links{% else %}d-flex mt-auto{% endif %}">
|
||||||
|
{% if show_context %}
|
||||||
|
<a href="{{ update.get_absolute_url }}" class="action-link">→ zum Vorhaben</a>
|
||||||
|
{% else %}
|
||||||
|
{% if update.url %}
|
||||||
|
<a href="{{ update.url }}" class="action-link me-3" target="_blank" rel="noopener">→ mehr auf {{ update.get_url_domain }} lesen…</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if update.foirequest %}
|
||||||
|
<a href="{{ update.foirequest.get_absolute_url }}" class="action-link">→ zur Anfrage</a>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{% endfor %}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endif %}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue