diff --git a/rca/guides/migrations/0028_guidepage_related_staff_title.py b/rca/guides/migrations/0028_guidepage_related_staff_title.py new file mode 100644 index 000000000..087dba324 --- /dev/null +++ b/rca/guides/migrations/0028_guidepage_related_staff_title.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.11 on 2024-10-15 02:23 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("guides", "0027_link_block_url_label"), + ] + + operations = [ + migrations.AddField( + model_name="guidepage", + name="related_staff_title", + field=models.CharField(blank=True, default="Staff", max_length=120), + ), + ] diff --git a/rca/guides/models.py b/rca/guides/models.py index 171d5b46d..50691702c 100644 --- a/rca/guides/models.py +++ b/rca/guides/models.py @@ -42,6 +42,7 @@ class GuidePage( blank=True, verbose_name=_("Further information"), ) + related_staff_title = models.CharField(blank=True, max_length=120, default="Staff") related_pages_title = models.CharField(blank=True, max_length=120) search_fields = ShorthandContentMixin.search_fields + [ @@ -57,7 +58,10 @@ class GuidePage( FieldPanel("introduction"), FieldPanel("shorthand_story_url"), FieldPanel("body"), - MultiFieldPanel([InlinePanel("related_staff")], heading=_("Related staff")), + MultiFieldPanel( + [FieldPanel("related_staff_title"), InlinePanel("related_staff")], + heading=_("Related staff"), + ), MultiFieldPanel( [ FieldPanel("further_information_title"), @@ -93,7 +97,7 @@ def anchor_nav(self): if block.block_type == "anchor_heading": items.append({"title": block.value, "link": f"#{slugify(block.value)}"}) if self.related_staff.first(): - items.append({"title": "Staff", "link": "#staff"}) + items.append({"title": self.related_staff_title, "link": "#staff"}) if self.further_information_title: items.append( { diff --git a/rca/project_styleguide/templates/patterns/pages/guide/guide.html b/rca/project_styleguide/templates/patterns/pages/guide/guide.html index 40cf9b331..e492a96c2 100644 --- a/rca/project_styleguide/templates/patterns/pages/guide/guide.html +++ b/rca/project_styleguide/templates/patterns/pages/guide/guide.html @@ -70,7 +70,7 @@

{% if related_staff %}
- {% include "patterns/organisms/people-module/people-module.html" with people=related_staff title="Staff" anchor_heading=True %} + {% include "patterns/organisms/people-module/people-module.html" with people=related_staff title=page.related_staff_title anchor_heading=True %}
{% endif %}