diff --git a/src/open_inwoner/accounts/models.py b/src/open_inwoner/accounts/models.py index 6148293b04..ee08c74f7d 100644 --- a/src/open_inwoner/accounts/models.py +++ b/src/open_inwoner/accounts/models.py @@ -346,7 +346,7 @@ def get_all_files(self): def get_interests(self) -> str: if not self.selected_categories.exists(): - return _("U heeft geen interessegebieden aangegeven.") + return _("U heeft geen interesses gekozen.") return ", ".join(list(self.selected_categories.values_list("name", flat=True))) diff --git a/src/open_inwoner/accounts/tests/test_profile_views.py b/src/open_inwoner/accounts/tests/test_profile_views.py index 719c0ca8a6..3a3174028b 100644 --- a/src/open_inwoner/accounts/tests/test_profile_views.py +++ b/src/open_inwoner/accounts/tests/test_profile_views.py @@ -69,7 +69,7 @@ def test_get_empty_profile_page(self): response = self.app.get(self.url, user=self.user) self.assertEquals(response.status_code, 200) - self.assertContains(response, _("U heeft geen interessegebieden aangegeven.")) + self.assertContains(response, _("U heeft geen interesses gekozen.")) self.assertContains(response, _("U heeft nog geen contacten.")) self.assertContains(response, "0 acties staan open.") self.assertNotContains(response, reverse("products:questionnaire_list")) @@ -99,23 +99,6 @@ def test_only_open_actions(self): self.assertEquals(response.status_code, 200) self.assertContains(response, "0 acties staan open.") - def test_get_documents_sorted(self): - """ - check that the new document is shown first - """ - doc_old = DocumentFactory.create(name="some-old", owner=self.user) - doc_new = DocumentFactory.create(name="some-new", owner=self.user) - - response = self.app.get(self.url, user=self.user) - self.assertEquals(response.status_code, 200) - - file_tags = response.html.find(class_="file-list").find_all( - class_="file-list__list-item" - ) - self.assertEquals(len(file_tags), 2) - self.assertTrue(doc_new.name in file_tags[0].prettify()) - self.assertTrue(doc_old.name in file_tags[1].prettify()) - def test_mydata_shown_with_digid_and_brp(self): user = UserFactory( bsn="999993847", @@ -125,7 +108,7 @@ def test_mydata_shown_with_digid_and_brp(self): login_type=LoginTypeChoices.digid, ) response = self.app.get(self.url, user=user) - self.assertContains(response, _("Mijn gegevens")) + self.assertContains(response, _("My details")) def test_mydata_not_shown_with_digid_and_no_brp(self): user = UserFactory( @@ -136,11 +119,11 @@ def test_mydata_not_shown_with_digid_and_no_brp(self): login_type=LoginTypeChoices.digid, ) response = self.app.get(self.url, user=user) - self.assertNotContains(response, _("Mijn gegevens")) + self.assertNotContains(response, _("My details")) def test_mydata_not_shown_without_digid(self): response = self.app.get(self.url, user=self.user) - self.assertNotContains(response, _("Mijn gegevens")) + self.assertNotContains(response, _("My details")) def test_active_user_notifications_are_shown(self): response = self.app.get(self.url, user=self.user) diff --git a/src/open_inwoner/accounts/views/profile.py b/src/open_inwoner/accounts/views/profile.py index 4d98b1bf64..dfc857165a 100644 --- a/src/open_inwoner/accounts/views/profile.py +++ b/src/open_inwoner/accounts/views/profile.py @@ -59,8 +59,6 @@ def get_context_data(self, **kwargs): ] user_files = user.get_all_files() - if user_files: - context["anchors"].append(("#files", _("Bestanden"))) # List of names of 'mentor' users that are a contact of me mentor_contacts = [ @@ -256,7 +254,7 @@ class MyNotificationsView( def crumbs(self): return [ (_("Mijn profiel"), reverse("profile:detail")), - (_("Communicatievoorkeuren"), reverse("profile:notifications")), + (_("Ontvang berichten over"), reverse("profile:notifications")), ] def get_object(self): diff --git a/src/open_inwoner/cms/profile/cms_appconfig.py b/src/open_inwoner/cms/profile/cms_appconfig.py index ed50cee7eb..42b5a680f9 100644 --- a/src/open_inwoner/cms/profile/cms_appconfig.py +++ b/src/open_inwoner/cms/profile/cms_appconfig.py @@ -13,7 +13,7 @@ class ProfileConfig(AppHookConfig): ), ) selected_categories = models.BooleanField( - verbose_name=_("Interessegebieden"), + verbose_name=_("Gekozen onderwerpen"), default=True, help_text=_( "Designates whether 'selected categories' section is rendered or not." @@ -43,7 +43,7 @@ class ProfileConfig(AppHookConfig): ), ) notifications = models.BooleanField( - verbose_name=_("Communicatievoorkeuren"), + verbose_name=_("Mijn meldingen"), default=True, help_text=_("Designates whether 'notifications' section is rendered or not."), ) diff --git a/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py b/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py new file mode 100644 index 0000000000..4e4e686618 --- /dev/null +++ b/src/open_inwoner/cms/profile/migrations/0004_profile_texts.py @@ -0,0 +1,31 @@ +# Generated by Django 3.2.20 on 2023-10-02 13:15 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("profile", "0003_profileconfig_ssd"), + ] + + operations = [ + migrations.AlterField( + model_name="profileconfig", + name="notifications", + field=models.BooleanField( + default=True, + help_text="Designates whether 'notifications' section is rendered or not.", + verbose_name="Mijn meldingen", + ), + ), + migrations.AlterField( + model_name="profileconfig", + name="selected_categories", + field=models.BooleanField( + default=True, + help_text="Designates whether 'selected categories' section is rendered or not.", + verbose_name="Gekozen onderwerpen", + ), + ), + ] diff --git a/src/open_inwoner/scss/components/Profile/_personal-overview.scss b/src/open_inwoner/scss/components/Profile/_personal-overview.scss new file mode 100644 index 0000000000..0a6e7f6a36 --- /dev/null +++ b/src/open_inwoner/scss/components/Profile/_personal-overview.scss @@ -0,0 +1,6 @@ +.personal-overview { + h2, + .h2 { + margin: var(--row-height) 0 0 0; + } +} diff --git a/src/open_inwoner/scss/components/_index.scss b/src/open_inwoner/scss/components/_index.scss index e979115af2..ad000d1856 100644 --- a/src/open_inwoner/scss/components/_index.scss +++ b/src/open_inwoner/scss/components/_index.scss @@ -97,5 +97,6 @@ @import './modal/modal'; @import './Emoji/Emoji.scss'; @import './Profile/personal-information'; +@import './Profile/personal-overview'; @import './Profile/edit.scss'; @import './WarningHeader/WarningHeader.scss'; diff --git a/src/open_inwoner/templates/export/profile/profile_export.html b/src/open_inwoner/templates/export/profile/profile_export.html index 8010563f29..d6620fe4b1 100644 --- a/src/open_inwoner/templates/export/profile/profile_export.html +++ b/src/open_inwoner/templates/export/profile/profile_export.html @@ -31,11 +31,11 @@

{{ object.get_full_name }}

{% endif %} - {% trans "Interessegebieden" %} + {% trans "Mijn onderwerpen" %} {{ object.get_interests }} - {% trans "Communicatievoorkeuren" %} + {% trans "Ontvang berichten over" %} {{ object.get_active_notifications }} diff --git a/src/open_inwoner/templates/pages/profile/categories.html b/src/open_inwoner/templates/pages/profile/categories.html index cb53c0fe73..44d34a9480 100644 --- a/src/open_inwoner/templates/pages/profile/categories.html +++ b/src/open_inwoner/templates/pages/profile/categories.html @@ -6,7 +6,7 @@

{% trans "Mijn Onderwerpen" %}

- {% trans "Selecteer hier uw interessegebieden om op maat gemaakte content voorgeschoteld te krijgen en nog beter te kunnen zoeken en vinden" %} + {% trans "Selecteer hier welke onderwerpen u interesseren, om op maat gemaakte inhoud voorgeschoteld te krijgen en nog beter te kunnen zoeken en vinden" %}

{% form form_object=form method="POST" id="change-categories" submit_text=_("Opslaan") secondary_href='profile:contact_list' secondary_text=_('Terug') secondary_icon='arrow_backward' secondary_icon_position="before" extra_classes="select-grid" %} diff --git a/src/open_inwoner/templates/pages/profile/me.html b/src/open_inwoner/templates/pages/profile/me.html index eef3d3bac7..a6e9d939da 100644 --- a/src/open_inwoner/templates/pages/profile/me.html +++ b/src/open_inwoner/templates/pages/profile/me.html @@ -49,12 +49,11 @@

-

{% trans "Persoonlijk overzicht" %}

-
+

{% trans "Overzicht" %}

{% if request.user.is_digid_and_brp and view.config.my_data %}
-
{% trans "Mijn gegevens" %}
+
{% link href="profile:categories" text=_('My details') %}
{{request.user.get_full_name}}{% if request.user.get_address %}, {{ request.user.get_address }}{% endif %}
{% link href="profile:data" text="Bekijken" icon="arrow_forward" icon_position="after" primary=True %}
@@ -62,7 +61,7 @@

{% trans "Persoonlijk overzicht" %}

{% if view.config.selected_categories %}
-
{% trans "Interessegebieden" %}
+
{% link href="profile:categories" text=_('My categories') %}
{{ category_text }}
{% link href="profile:categories" text="Aanpassen" icon="arrow_forward" icon_position="after" secondary=True %}
@@ -70,7 +69,14 @@

{% trans "Persoonlijk overzicht" %}

{% if view.config.mentors %}
-
{% trans "Begeleider(s)" %}
+
+ {% if mentor_contacts %} + {% url 'profile:contact_list' as mentor_url %} + {% link href=mentor_url|add:"?type=begeleider" text=_('My mentor(s)') %} + {% else %} + {% trans "Begeleider(s)" %} + {% endif %} +
{% if mentor_contacts %}
{{ mentor_contacts|join:", " }}
{% url 'profile:contact_list' as mentor_url %} @@ -86,7 +92,7 @@

{% trans "Persoonlijk overzicht" %}

{% if view.config.my_contacts %}
-
{% trans "Mijn netwerkcontacten" %}
+
{% link href="profile:contact_list" text=_('My contacts') %}
{{ contact_text }}
{% link href="profile:contact_list" text=_("Beheer contacten") icon="arrow_forward" icon_position="after" secondary=True %}
@@ -94,7 +100,7 @@

{% trans "Persoonlijk overzicht" %}

{% if questionnaire_exists and view.config.selfdiagnose %}
-
{% trans "Zelfdiagnose" %}
+
{% link href="products:questionnaire_list" text=_('Zelftest') %}
{% link href='products:questionnaire_list' text=_('Start zelfdiagnose') icon="arrow_forward" icon_position="after" secondary=True %}
@@ -102,7 +108,7 @@

{% trans "Persoonlijk overzicht" %}

{% if view.config.actions %}
-
{% trans "Acties" %}
+
{% link href="profile:action_list" text=_('Actions') %}
{{ action_text }}
{% link href="profile:action_list" text="Aanpassen" icon="arrow_forward" icon_position="after" secondary=True %}
@@ -110,21 +116,21 @@

{% trans "Persoonlijk overzicht" %}

{% if view.config.notifications %}
-
{% trans "Communicatievoorkeuren" %}
+
{% link href="profile:notifications" text=_('Receive notifications for') %}
{{ request.user.get_active_notifications }}
{% link href="profile:notifications" text="Aanpassen" icon="arrow_forward" icon_position="after" secondary=True %}
{% endif %} {% if view.config.questions %}
-
{% trans "Mijn vragen" %}
+
{% link href="cases:contactmoment_list" text=_('My questions') %}
{% link href="cases:contactmoment_list" text=_('Bekijken') icon="arrow_forward" icon_position="after" secondary=True %}
{% endif %} {% if view.config.ssd %}
-
{% trans "Mijn uitkeringen" %}
+
{% link href="profile:monthly_benefits_index" text=_('My benefits') %}
Jaaropgaven, Maandspecificaties
{% link href="ssd:monthly_benefits_index" text=_("Bekijken") icon="arrow_forward" icon_position="after" secondary=True %}
@@ -146,8 +152,4 @@

{% trans "Persoonlijk overzicht" %}

{% endrender_form %} -{% if files %} -{% file_list h1=True files=files allow_delete=True title=_("Bestanden") download_view="profile:documents_download" %} -{% endif %} - {% endblock content %} diff --git a/src/open_inwoner/templates/pages/profile/notifications.html b/src/open_inwoner/templates/pages/profile/notifications.html index 971614f333..f949b9356f 100644 --- a/src/open_inwoner/templates/pages/profile/notifications.html +++ b/src/open_inwoner/templates/pages/profile/notifications.html @@ -3,10 +3,10 @@ {% block content %}

- {% trans "Communicatievoorkeuren" %} + {% trans "Ontvang berichten over" %}

- {% trans "Kies voor welke categorie je communicatievoorkeuren wil ontvangen" %} + {% trans "Kies voor welk onderwerp je meldingen wilt ontvangen" %}

{% form form_object=form method="POST" id="change-notifications" submit_text=_("Opslaan") secondary_href='profile:detail' secondary_text=_('Terug') secondary_icon='arrow_backward' secondary_icon_position="before" %}