from django.utils.translation import gettext_lazy as _

from adhocracy4.dashboard import ModuleFormSetComponent
from adhocracy4.dashboard import components

from . import forms


class ModerationTasksComponent(ModuleFormSetComponent):
    identifier = 'moderation_tasks'
    weight = 15
    label = _('Moderation Tasks')

    form_title = _('Edit moderation tasks')
    form_class = forms.ModerationTasksFormSet
    form_template_name = \
        'meinberlin_moderationtasks/moderation_tasks_form.html'

    def is_effective(self, module):
        return module.blueprint_type in ['PB1', 'PB2', 'PB3']


components.register_module(ModerationTasksComponent())

meinberlin/apps/moderationtasks/dashboard.py
from django.utils.translation import gettext_lazy as _

from adhocracy4.dashboard import ModuleFormSetComponent
from adhocracy4.dashboard import components

from . import forms


class ModerationTasksComponent(ModuleFormSetComponent):
    identifier = 'moderation_tasks'
    weight = 15
    label = _('Moderation Tasks')

    form_title = _('Edit moderation tasks')
    form_class = forms.ModerationTasksFormSet
    form_template_name = \
        'meinberlin_moderationtasks/moderation_tasks_form.html'

    def is_effective(self, module):
        return module.blueprint_type in ['PB', 'PB2', 'PB3']


components.register_module(ModerationTasksComponent())

meinberlin/apps/moderationtasks/dashboard.py
diff --git a/meinberlin/apps/contrib/templates/meinberlin_contrib/item_detail.html b/meinberlin/apps/contrib/templates/meinberlin_contrib/item_detail.html
index 4028cfdfbc..3485d572b0 100644
--- a/meinberlin/apps/contrib/templates/meinberlin_contrib/item_detail.html
+++ b/meinberlin/apps/contrib/templates/meinberlin_contrib/item_detail.html
@@ -64,7 +64,7 @@ <h1 class="item-detail__title">{{ object.name }}</h1>
 
 
                 <div class="lr-bar__right">
-                {% if is_moderator and not module.blueprint_type in 'PB3,PB2,PB1' %}
+                {% if is_moderator and not module.blueprint_type in 'PB3,PB2,PB' %}
                     {% popover_remark object %}
                 {% endif %}
 
@@ -126,7 +126,7 @@ <h2 class="moderator-statement__title">{% translate 'Official Statement' %}</h2>
     {% block vote_button %}{% endblock %}
 
     {% block moderation_info %}
-        {% if is_moderator and module.blueprint_type in 'PB3,PB2,PB1' %}
+        {% if is_moderator and module.blueprint_type in 'PB3,PB2,PB' %}
         <div class="offset-lg-3 col-lg-6">
             <div class="moderation-info__accordion">
                 <details class="accordion" open>
diff --git a/meinberlin/apps/moderationtasks/dashboard.py b/meinberlin/apps/moderationtasks/dashboard.py
index 0dae11dd0e..6dddcf6237 100644
--- a/meinberlin/apps/moderationtasks/dashboard.py
+++ b/meinberlin/apps/moderationtasks/dashboard.py
@@ -17,7 +17,7 @@ class ModerationTasksComponent(ModuleFormSetComponent):
         'meinberlin_moderationtasks/moderation_tasks_form.html'
 
     def is_effective(self, module):
-        return module.blueprint_type in ['PB1', 'PB2', 'PB3']
+        return module.blueprint_type in ['PB', 'PB2', 'PB3']
 
 
 components.register_module(ModerationTasksComponent())
diff --git a/tests/moderationtasks/test_dashboard_components.py b/tests/moderationtasks/test_dashboard_components.py
index 0625dfc588..a071845575 100644
--- a/tests/moderationtasks/test_dashboard_components.py
+++ b/tests/moderationtasks/test_dashboard_components.py
@@ -5,7 +5,7 @@
 
 @pytest.mark.django_db
 def test_module_moderation_tasks_settings(module_factory):
-    module_pb1 = module_factory(blueprint_type='PB1')
+    module_pb1 = module_factory(blueprint_type='PB')
     module_pb3 = module_factory(blueprint_type='PB3')
     module_ic = module_factory(blueprint_type='IC')
     component = ModerationTasksComponent()

No "moderation tasks" filter in participatory budget (one phase)
**URL:** https://meinberlin-dev.liqd.net/projekte/module/burgerhaushalt/?mode=list (list view)
or https://meinberlin-dev.liqd.net/dashboard/projects/burgerhaushalt-spandau/basic/ (dashboard)
**user:** Moderator, Admin
**expected behaviour:** When using participatory budget with one phase i want to be able to set up moderation tasks for the discussion of ideas and want to filter ideas with an filter "open moderationtasks"
**behaviour:** There is no filter "moderation tasks" in the list view of ideas in participatory budget (one phase) nor is there the possibility to create moderation tasks in the dashboard of the project
**important screensize:** no
**device & browser:** Mac/Windows Chrome, Edge Firefox, Iphone, Samsung Galaxy 20




