From 1bf3a9d37aae54c19d0dbea7d63c176f783e907a Mon Sep 17 00:00:00 2001 From: Bernard Siebens Date: Fri, 21 Aug 2026 16:16:16 +0200 Subject: [PATCH] Merge the News page's title into the shared navy header too Same header_extra treatment Calendar and Me just got -- a "News" title in the app-header instead of no page heading at all. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9 --- mobile/templates/mobile/news_list.html | 9 ++++++++- mobile/tests.py | 7 +++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/mobile/templates/mobile/news_list.html b/mobile/templates/mobile/news_list.html index c75d440..1cb88d1 100644 --- a/mobile/templates/mobile/news_list.html +++ b/mobile/templates/mobile/news_list.html @@ -6,9 +6,16 @@ member-visible (internal or both) news item, newest first, full-width like Calendar's own agenda rows (see NewsListView's docstring for why this isn't filtered to just this account's teams the way Home's own - teaser is). + teaser is). The "News" title lives in header_extra, merged into the + shared navy app-header the same way Calendar's/Me's own titles are. {% endcomment %} +{% block header_extra %} +
+ {% trans "News" %} +
+{% endblock header_extra %} + {% block content %}
{% if page.object_list %} diff --git a/mobile/tests.py b/mobile/tests.py index fb2109d..448ae59 100644 --- a/mobile/tests.py +++ b/mobile/tests.py @@ -929,6 +929,13 @@ class NewsListViewTests(TestCase): self.assertEqual(response.status_code, 302) + def test_header_shows_a_news_title_merged_into_the_shared_header(self): + self.client.force_login(self.user) + + response = self._get() + + self.assertContains(response, 'News') + def test_lists_every_internal_or_both_item_regardless_of_team(self): team_item = News.objects.create(club=self.club, title="Team news", body="Body.", status=News.Status.PUBLISHED, published_at=timezone.now()) team = Team.objects.create(club=self.club, name="U16", short_name="U16")