diff --git a/froide_govplan/configuration.py b/froide_govplan/configuration.py index cfd27be..f6517fb 100644 --- a/froide_govplan/configuration.py +++ b/froide_govplan/configuration.py @@ -2,7 +2,6 @@ from datetime import datetime from typing import Iterator from django.utils.translation import gettext_lazy as _ - from froide.follow.configuration import FollowConfiguration from froide.helper.notifications import Notification, TemplatedEvent @@ -35,7 +34,11 @@ class GovernmentPlanFollowConfiguration(FollowConfiguration): return GovernmentPlan.objects.all() def can_follow(self, content_object, user, request=None): - return content_object.public or not has_limited_access(user) + return ( + content_object.government.active + and content_object.public + or not has_limited_access(user) + ) def get_batch_updates( self, start: datetime, end: datetime diff --git a/froide_govplan/templates/froide_govplan/detail.html b/froide_govplan/templates/froide_govplan/detail.html index 25b780b..e563388 100644 --- a/froide_govplan/templates/froide_govplan/detail.html +++ b/froide_govplan/templates/froide_govplan/detail.html @@ -1,6 +1,6 @@ {% extends "froide_govplan/base.html" %} - -{% load i18n %} {# TODO: i18n for all strings #} +{% load i18n %} +{# TODO: i18n for all strings #} {% load markup %} {% load cms_tags %} {% load follow_tags %} @@ -8,191 +8,192 @@ {% load form_helper %} {% load content_helper %} {% load thumbnail %} - -{% block title %}{{ object.title }}{% endblock title %} - +{% block title %} + {{ object.title }} +{% endblock title %} {% block meta %} - {% include "snippets/meta.html" %} + {% include "snippets/meta.html" %} {% endblock meta %} - {% block app_body %} -
- {{ object.quote | addquotes | markdown }} -- {% 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 %} - {% endif %} -- - Anfrage zum Vorhaben stellen - -
- {% else %} - {% with foirequest=object.get_recent_foirequest %} -Gibt es Neuigkeiten zu diesem Vorhaben, die wir noch nicht erfasst haben?
- -Gibt es Neuigkeiten zu diesem Vorhaben, die wir noch nicht erfasst haben?
+ +- {% 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. {% endblocktranslate %} -
-+ nicht begonnen + begonnen + teilweise umgesetzt + umgesetzt + verschoben +
+ {% include "froide_govplan/plugins/time_used.html" with instance=object %} +- nicht begonnen - begonnen - teilweise umgesetzt - umgesetzt - verschoben -
- {% include "froide_govplan/plugins/time_used.html" with instance=object %} -