diff --git a/src/open_inwoner/components/templates/components/Product/finder.html b/src/open_inwoner/components/templates/components/Product/finder.html index 51390c3ce3..e0633a8f16 100644 --- a/src/open_inwoner/components/templates/components/Product/finder.html +++ b/src/open_inwoner/components/templates/components/Product/finder.html @@ -1,8 +1,8 @@ {% load i18n grid_tags form_tags button_tags %} {% render_column span=6 compact=True extra_classes="product-finder" %} -

{% trans "Productzoeker" %}

-

Met een paar simpele vragen ziet u welke producten passen bij uw situatie

+

{{configurable_text.home_page.home_product_finder_title}}

+

{{configurable_text.home_page.home_product_finder_intro|linebreaksbr}}

{% if not conditions_done %} diff --git a/src/open_inwoner/components/templatetags/product_tags.py b/src/open_inwoner/components/templatetags/product_tags.py index d52170911b..3885267787 100644 --- a/src/open_inwoner/components/templatetags/product_tags.py +++ b/src/open_inwoner/components/templatetags/product_tags.py @@ -5,8 +5,10 @@ register = template.Library() -@register.inclusion_tag("components/Product/finder.html") -def product_finder(condition, form, form_action=".", primary_text=None, **kwargs): +@register.inclusion_tag("components/Product/finder.html", takes_context=True) +def product_finder( + context, condition, form, form_action=".", primary_text=None, **kwargs +): """ Renders the actions in a filterable table. @@ -31,5 +33,6 @@ def product_finder(condition, form, form_action=".", primary_text=None, **kwargs form=form, form_action=form_action, primary_text=primary_text, + configurable_text=context["configurable_text"], ) return kwargs diff --git a/src/open_inwoner/configurations/admin.py b/src/open_inwoner/configurations/admin.py index 4acb046ee3..8d4bf7bf3f 100644 --- a/src/open_inwoner/configurations/admin.py +++ b/src/open_inwoner/configurations/admin.py @@ -77,12 +77,17 @@ class SiteConfigurarionAdmin(OrderedInlineModelAdminMixin, SingletonModelAdmin): "home_theme_intro", "home_map_title", "home_map_intro", + "home_product_finder_title", + "home_product_finder_intro", "theme_title", "theme_intro", "home_questionnaire_title", - "home_questionnaire_subtitle", + "home_questionnaire_intro", "select_questionnaire_title", - "select_questionnaire_subtitle", + "select_questionnaire_intro", + "plans_intro", + "plans_no_plans_message", + "plans_edit_message", ), }, ), diff --git a/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py b/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py new file mode 100644 index 0000000000..e06028494c --- /dev/null +++ b/src/open_inwoner/configurations/migrations/0022_siteconfiguration_more_text.py @@ -0,0 +1,62 @@ +# Generated by Django 3.2.15 on 2022-11-16 11:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("configurations", "0021_siteconfiguration_more_titles"), + ] + + operations = [ + migrations.AddField( + model_name="siteconfiguration", + name="home_product_finder_intro", + field=models.TextField( + blank=True, + default="Met een paar simpele vragen ziet u welke producten passen bij uw situatie", + help_text="Product finder's intro text on the home page.", + verbose_name="Home product finder intro", + ), + ), + migrations.AddField( + model_name="siteconfiguration", + name="home_product_finder_title", + field=models.CharField( + default="Productzoeker", + help_text="Product finder's title on the home page.", + max_length=255, + verbose_name="Product finder title", + ), + ), + migrations.AddField( + model_name="siteconfiguration", + name="plans_edit_message", + field=models.CharField( + default="Hier kunt u uw doel aanpassen", + help_text="The message when a user edits a goal.", + max_length=255, + verbose_name="Edit goal message", + ), + ), + migrations.AddField( + model_name="siteconfiguration", + name="plans_intro", + field=models.TextField( + default="Hier werkt u aan uw doelen. Dit doet u samen met uw contactpersoon bij de gemeente. ", + help_text="The sub-title for the plan page.", + verbose_name="Plan pages intro", + ), + ), + migrations.AddField( + model_name="siteconfiguration", + name="plans_no_plans_message", + field=models.CharField( + default="U heeft nog geen plan gemaakt.", + help_text="The message in the plans listing when user has no plans.", + max_length=255, + verbose_name="No plans message", + ), + ), + ] diff --git a/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py new file mode 100644 index 0000000000..80750db48d --- /dev/null +++ b/src/open_inwoner/configurations/migrations/0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.15 on 2022-11-16 11:41 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("configurations", "0022_siteconfiguration_more_text"), + ] + + operations = [ + migrations.RenameField( + model_name="siteconfiguration", + old_name="home_questionnaire_subtitle", + new_name="home_questionnaire_intro", + ), + ] diff --git a/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py new file mode 100644 index 0000000000..46322d989a --- /dev/null +++ b/src/open_inwoner/configurations/migrations/0024_alter_siteconfiguration_home_questionnaire_intro.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.15 on 2022-11-16 11:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "configurations", + "0023_rename_home_questionnaire_subtitle_siteconfiguration_home_questionnaire_intro", + ), + ] + + operations = [ + migrations.AlterField( + model_name="siteconfiguration", + name="home_questionnaire_intro", + field=models.TextField( + default="Test met een paar simpele vragen of u recht heeft op een product", + help_text="Questionnaire intro text on the home page.", + verbose_name="Home page questionaire intro", + ), + ), + ] diff --git a/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py new file mode 100644 index 0000000000..82101698cc --- /dev/null +++ b/src/open_inwoner/configurations/migrations/0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.15 on 2022-11-16 11:48 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ("configurations", "0024_alter_siteconfiguration_home_questionnaire_intro"), + ] + + operations = [ + migrations.RenameField( + model_name="siteconfiguration", + old_name="select_questionnaire_subtitle", + new_name="select_questionnaire_intro", + ), + ] diff --git a/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py b/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py new file mode 100644 index 0000000000..7968cd795a --- /dev/null +++ b/src/open_inwoner/configurations/migrations/0026_alter_siteconfiguration_select_questionnaire_intro.py @@ -0,0 +1,25 @@ +# Generated by Django 3.2.15 on 2022-11-16 11:49 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "configurations", + "0025_rename_select_questionnaire_subtitle_siteconfiguration_select_questionnaire_intro", + ), + ] + + operations = [ + migrations.AlterField( + model_name="siteconfiguration", + name="select_questionnaire_intro", + field=models.TextField( + default="Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten.", + help_text="Questionaire selector intro on the theme and profile pages.", + verbose_name="Questionaire selector widget intro", + ), + ), + ] diff --git a/src/open_inwoner/configurations/models.py b/src/open_inwoner/configurations/models.py index d2a73c4586..c7f0fa2639 100644 --- a/src/open_inwoner/configurations/models.py +++ b/src/open_inwoner/configurations/models.py @@ -138,11 +138,24 @@ class SiteConfiguration(SingletonModel): verbose_name=_("Home page questionaire title"), help_text=_("Questionnaire title on the home page."), ) - home_questionnaire_subtitle = models.CharField( - max_length=255, + home_questionnaire_intro = models.TextField( default=_("Test met een paar simpele vragen of u recht heeft op een product"), - verbose_name=_("Home page questionaire sub-title"), - help_text=_("Questionnaire sub-title on the home page."), + verbose_name=_("Home page questionaire intro"), + help_text=_("Questionnaire intro text on the home page."), + ) + home_product_finder_title = models.CharField( + max_length=255, + default=_("Productzoeker"), + verbose_name=_("Product finder title"), + help_text=_("Product finder's title on the home page."), + ) + home_product_finder_intro = models.TextField( + default=_( + "Met een paar simpele vragen ziet u welke producten passen bij uw situatie" + ), + verbose_name=_("Home product finder intro"), + blank=True, + help_text=_("Product finder's intro text on the home page."), ) select_questionnaire_title = models.CharField( max_length=255, @@ -150,14 +163,33 @@ class SiteConfiguration(SingletonModel): verbose_name=_("Questionaire selector widget title"), help_text=_("Questionaire selector title on the theme and profile pages."), ) - select_questionnaire_subtitle = models.CharField( - max_length=255, + select_questionnaire_intro = models.TextField( default=_( "Kies hieronder één van de volgende vragenlijsten om de zelfdiagnose te starten." ), - verbose_name=_("Questionaire selector widget sub-title"), - help_text=_("Questionaire selector sub-title on the theme and profile pages."), + verbose_name=_("Questionaire selector widget intro"), + help_text=_("Questionaire selector intro on the theme and profile pages."), ) + plans_intro = models.TextField( + default=_( + "Hier werkt u aan uw doelen. Dit doet u samen met uw contactpersoon bij de gemeente. " + ), + verbose_name=_("Plan pages intro"), + help_text=_("The sub-title for the plan page."), + ) + plans_no_plans_message = models.CharField( + max_length=255, + default=_("U heeft nog geen plan gemaakt."), + verbose_name=_("No plans message"), + help_text=_("The message in the plans listing when user has no plans."), + ) + plans_edit_message = models.CharField( + max_length=255, + default=_("Hier kunt u uw doel aanpassen"), + verbose_name=_("Edit goal message"), + help_text=_("The message when a user edits a goal."), + ) + footer_visiting_title = models.CharField( max_length=255, default="", diff --git a/src/open_inwoner/templates/pages/category/detail.html b/src/open_inwoner/templates/pages/category/detail.html index a58eabda2e..07564c745d 100644 --- a/src/open_inwoner/templates/pages/category/detail.html +++ b/src/open_inwoner/templates/pages/category/detail.html @@ -39,7 +39,7 @@

diff --git a/src/open_inwoner/templates/pages/home.html b/src/open_inwoner/templates/pages/home.html index 789aaa4a81..aceaff8f9b 100644 --- a/src/open_inwoner/templates/pages/home.html +++ b/src/open_inwoner/templates/pages/home.html @@ -31,7 +31,7 @@

{% if questionnaire_roots.exists %}

{{configurable_text.home_page.home_questionnaire_title}}

-

{{configurable_text.home_page.home_questionnaire_subtitle}}

+

{{configurable_text.home_page.home_questionnaire_intro|linebreaksbr}}

{% questionnaire root_nodes=questionnaire_roots %} {% endif %} diff --git a/src/open_inwoner/templates/pages/plans/create.html b/src/open_inwoner/templates/pages/plans/create.html index eb6c3a7cb0..f177428f59 100644 --- a/src/open_inwoner/templates/pages/plans/create.html +++ b/src/open_inwoner/templates/pages/plans/create.html @@ -4,7 +4,7 @@ {% block content %}

{% trans "Samenwerken" %}

- {% trans "Hier werkt u samen met uw contactpersonen aan uw doelen." %} + {{configurable_text.plans_page.plans_intro|linebreaksbr}}

{% render_form id="plan-form" form=form method="POST" %} diff --git a/src/open_inwoner/templates/pages/plans/edit.html b/src/open_inwoner/templates/pages/plans/edit.html index c5a1bfc8d5..8c87e1a8c7 100644 --- a/src/open_inwoner/templates/pages/plans/edit.html +++ b/src/open_inwoner/templates/pages/plans/edit.html @@ -4,7 +4,7 @@ {% block content %}

{% trans "Samenwerken" %}

- {% trans "Hier werkt u samen met uw contactpersonen aan uw doelen." %} + {{configurable_text.plans_page.plans_intro|linebreaksbr}}

{% render_form id="plan-form" form=form method="POST" %} diff --git a/src/open_inwoner/templates/pages/plans/file.html b/src/open_inwoner/templates/pages/plans/file.html index 4daaf0bf4c..d5f4e2041c 100644 --- a/src/open_inwoner/templates/pages/plans/file.html +++ b/src/open_inwoner/templates/pages/plans/file.html @@ -4,7 +4,7 @@ {% block content %}

{% trans "Samenwerken" %}

- {% trans "Hier werkt u samen met uw contactpersonen aan uw doelen." %} + {{configurable_text.plans_page.plans_intro|linebreaksbr}}

{% form id="document-create" form_object=form method="POST" enctype="multipart/form-data" %} diff --git a/src/open_inwoner/templates/pages/plans/goal_edit.html b/src/open_inwoner/templates/pages/plans/goal_edit.html index b758e19199..62435c8a1e 100644 --- a/src/open_inwoner/templates/pages/plans/goal_edit.html +++ b/src/open_inwoner/templates/pages/plans/goal_edit.html @@ -4,7 +4,7 @@ {% block content %}

{% trans "Doel aanpassen" %}

- {% trans "Hier kunt u uw doel aanpassen" %} + {{configurable_text.plans_page.plans_edit_message}}

{% form id="goal-edit" form_object=form method="POST" %} diff --git a/src/open_inwoner/templates/pages/plans/list.html b/src/open_inwoner/templates/pages/plans/list.html index 99d6682ea1..9e64fb0336 100644 --- a/src/open_inwoner/templates/pages/plans/list.html +++ b/src/open_inwoner/templates/pages/plans/list.html @@ -7,7 +7,7 @@

{% button href="plans:plan_create" text=_("Start nieuwe samenwerking") primary=True icon="group" icon_outlined=True %}

- {% trans "Hier werkt u samen met uw contactpersonen aan uw doelen." %} + {{configurable_text.plans_page.plans_intro|linebreaksbr}}

{% card_container plans=object_list columns=2 %} diff --git a/src/open_inwoner/templates/pages/profile/questionnaire.html b/src/open_inwoner/templates/pages/profile/questionnaire.html index 68b3358731..eff9ab403d 100644 --- a/src/open_inwoner/templates/pages/profile/questionnaire.html +++ b/src/open_inwoner/templates/pages/profile/questionnaire.html @@ -3,7 +3,7 @@ {% block content %}

{{configurable_text.questionnaire_page.select_questionnaire_title}}

-

{{configurable_text.questionnaire_page.select_questionnaire_subtitle}}

+

{{configurable_text.questionnaire_page.select_questionnaire_intro|linebreaksbr}}

{% questionnaire root_nodes=root_nodes %} {% endblock content %} diff --git a/src/open_inwoner/templates/pages/user-home.html b/src/open_inwoner/templates/pages/user-home.html index 1d82a7b91b..74f8aa7d06 100644 --- a/src/open_inwoner/templates/pages/user-home.html +++ b/src/open_inwoner/templates/pages/user-home.html @@ -30,6 +30,6 @@

{{ plan.title }}

{% endfor %}
{% else %} -

{% trans "U heeft nog geen plan gemaakt." %}

+

{{configurable_text.plans_page.plans_no_plans_message}}

{% endif %} {% endblock user_content %} diff --git a/src/open_inwoner/utils/context_processors.py b/src/open_inwoner/utils/context_processors.py index 31fc637419..620e5fca13 100644 --- a/src/open_inwoner/utils/context_processors.py +++ b/src/open_inwoner/utils/context_processors.py @@ -35,15 +35,22 @@ def settings(request): "home_map_title": config.home_map_title, "home_map_intro": config.home_map_intro, "home_questionnaire_title": config.home_questionnaire_title, - "home_questionnaire_subtitle": config.home_questionnaire_subtitle, + "home_questionnaire_intro": config.home_questionnaire_intro, + "home_product_finder_title": config.home_product_finder_title, + "home_product_finder_intro": config.home_product_finder_intro, }, "theme_page": { "theme_title": config.theme_title, "theme_intro": config.theme_intro, }, + "plans_page": { + "plans_intro": config.plans_intro, + "plans_no_plans_message": config.plans_no_plans_message, + "plans_edit_message": config.plans_edit_message, + }, "questionnaire_page": { "select_questionnaire_title": config.select_questionnaire_title, - "select_questionnaire_subtitle": config.select_questionnaire_subtitle, + "select_questionnaire_intro": config.select_questionnaire_intro, }, "footer": { "footer_visiting_title": config.footer_visiting_title,