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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -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 %}
|
||||
<div class="mt-3">
|
||||
<span class="font-display text-2xl font-extrabold text-white uppercase">{% trans "News" %}</span>
|
||||
</div>
|
||||
{% endblock header_extra %}
|
||||
|
||||
{% block content %}
|
||||
<div class="-mx-4">
|
||||
{% if page.object_list %}
|
||||
|
||||
@@ -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, '<span class="font-display text-2xl font-extrabold text-white uppercase">News</span>')
|
||||
|
||||
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")
|
||||
|
||||
Reference in New Issue
Block a user