Skip to content

Commit

Permalink
[#1788] Make title text for Mijn aanvragen configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
pi-sigma committed Oct 11, 2023
1 parent 347f098 commit f17002b
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/open_inwoner/cms/cases/views/cases.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

from open_inwoner.htmx.mixins import RequiresHtmxMixin
from open_inwoner.openzaak.formapi import fetch_open_submissions
from open_inwoner.openzaak.models import OpenZaakConfig
from open_inwoner.utils.views import CommonPageMixin

from .mixins import CaseAccessMixin, CaseListMixin, OuterCaseAccessMixin
Expand Down Expand Up @@ -55,6 +56,8 @@ def get_cases(self):

def get_context_data(self, **kwargs):
context = super().get_context_data(**kwargs)
config = OpenZaakConfig.get_solo()

context["hxget"] = reverse("cases:cases_content")
context["title_text"] = config.title_text
return context
1 change: 1 addition & 0 deletions src/open_inwoner/openzaak/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class OpenZaakConfigAdmin(SingletonModelAdmin):
"document_max_confidentiality",
"max_upload_size",
"allowed_file_extensions",
"title_text",
],
},
),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 3.2.20 on 2023-10-11 07:57

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
("openzaak", "0024_zaaktypeconfig_contact_subject_code"),
]

operations = [
migrations.AddField(
model_name="openzaakconfig",
name="title_text",
field=models.TextField(
default="Hier vindt u een overzicht van al uw lopende an afgeronde aanvragen.",
help_text="The title/introductory text shown on the list view of 'Mijn aanvragen'.",
verbose_name="Title text",
),
),
]
10 changes: 10 additions & 0 deletions src/open_inwoner/openzaak/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,16 @@ class OpenZaakConfig(SingletonModel):
default=False,
)

title_text = models.TextField(
verbose_name=_("Title text"),
help_text=_(
"The title/introductory text shown on the list view of 'Mijn aanvragen'."
),
default=_(
"Hier vindt u een overzicht van al uw lopende an afgeronde aanvragen."
),
)

class Meta:
verbose_name = _("Open Zaak configuration")

Expand Down
5 changes: 5 additions & 0 deletions src/open_inwoner/scss/components/Cases/Cases.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@
a:hover {
cursor: pointer;
}

&__title_text {
padding-top: var(--spacing-medium);
padding-bottom: var(--spacing-extra-large);
}
}

#document-upload {
Expand Down
1 change: 1 addition & 0 deletions src/open_inwoner/templates/pages/cases/list_inner.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
</div>

<h2 class="h2" id="cases">{{ page_title }} ({{ paginator.count }})</h2>
<p class="cases__title_text">{{ title_text }}</p>
{% render_grid %}

{% for case in cases %}
Expand Down

0 comments on commit f17002b

Please sign in to comment.