diff --git a/wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/workflow.html b/wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/workflow.html index ac38d59b8c..cb889226bd 100644 --- a/wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/workflow.html +++ b/wagtail/admin/templates/wagtailadmin/shared/side_panels/includes/status/workflow.html @@ -42,15 +42,15 @@
{% icon name='calendar-check' classname='w-w-4 w-h-4 w-text-info-100' %}
-
+
- {% trans 'Expiry:' %} + {% trans 'Expiry:' %} {{ live_expire_at }}
{% if show_schedule_publishing_toggle and not has_draft_publishing_schedule and not lock_context.locked %} {% trans 'Edit schedule' as edit_schedule_text %} - {% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-text-link-default hover:w-text-text-link-hover w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %} + {% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-secondary hover:w-text-secondary-400 w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %} {% endif %}
@@ -140,26 +140,26 @@ {% icon name='calendar' classname='w-w-4 w-h-4 w-text-info-100' %} {% endif %}
-
+
{% if scheduled_go_live_at %} -
{% trans 'Go-live:' %} {{ scheduled_go_live_at }}
+
{% trans 'Go-live:' %} {{ scheduled_go_live_at }}
{% endif %} {% if scheduled_expire_at %} -
{% trans 'Expiry:' %} {{ scheduled_expire_at }}
+
{% trans 'Expiry:' %} {{ scheduled_expire_at }}
{% endif %} {% if draft_go_live_at or draft_expire_at %} -
{% trans 'Once published:' %}
+
{% trans 'Once published:' %}
{% if draft_go_live_at %} -
{% trans 'Go-live:' %} {{ draft_go_live_at }}
+
{% trans 'Go-live:' %} {{ draft_go_live_at }}
{% endif %} {% if draft_expire_at %} -
{% trans 'Expiry:' %} {{ draft_expire_at }}
+
{% trans 'Expiry:' %} {{ draft_expire_at }}
{% endif %} {% endif %}
{% if show_schedule_publishing_toggle and not lock_context.locked %} {% trans 'Edit schedule' as edit_schedule_text %} - {% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-text-link-default hover:w-text-text-link-hover w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %} + {% dialog_toggle classname='w-bg-transparent w-text-14 w-p-0 w-text-secondary hover:w-text-secondary-400 w-inline-flex w-justify-center w-transition' dialog_id="schedule-publishing-dialog" text=edit_schedule_text %} {% endif %}
diff --git a/wagtail/admin/tests/pages/test_edit_page.py b/wagtail/admin/tests/pages/test_edit_page.py index e082820e85..a4ccc0815d 100644 --- a/wagtail/admin/tests/pages/test_edit_page.py +++ b/wagtail/admin/tests/pages/test_edit_page.py @@ -405,19 +405,19 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should show the draft go_live_at and expire_at under the "Once published" label self.assertContains( response, - '
Once published:
', + '
Once published:
', html=True, count=1, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -498,13 +498,13 @@ class TestPageEdit(WagtailTestUtils, TestCase): # and should be in the user's timezone self.assertContains( response, - '
Once published:
', + '
Once published:
', html=True, count=1, ) self.assertContains( response, - 'Go-live: March 20, 2022, 6 a.m.', + 'Go-live: March 20, 2022, 6 a.m.', html=True, count=1, ) @@ -760,18 +760,18 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -924,18 +924,18 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -1099,7 +1099,7 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should still show the active expire_at in the live object self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -1107,19 +1107,19 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should also show the draft go_live_at and expire_at under the "Once published" label self.assertContains( response, - '
Once published:
', + '
Once published:
', html=True, count=1, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) @@ -1210,25 +1210,25 @@ class TestPageEdit(WagtailTestUtils, TestCase): # override the existing expire_at when it goes live self.assertNotContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, ) # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) @@ -1313,7 +1313,7 @@ class TestPageEdit(WagtailTestUtils, TestCase): # unpublished (expired) -> published (scheduled) -> unpublished (expired again) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -1321,18 +1321,18 @@ class TestPageEdit(WagtailTestUtils, TestCase): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) diff --git a/wagtail/snippets/tests/test_snippets.py b/wagtail/snippets/tests/test_snippets.py index 8ae68e837a..4e8878b7eb 100644 --- a/wagtail/snippets/tests/test_snippets.py +++ b/wagtail/snippets/tests/test_snippets.py @@ -2095,19 +2095,19 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should show the draft go_live_at and expire_at under the "Once published" label self.assertContains( response, - '
Once published:
', + '
Once published:
', html=True, count=1, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -2240,18 +2240,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -2415,18 +2415,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -2597,7 +2597,7 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should still show the active expire_at in the live object self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -2605,19 +2605,19 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should also show the draft go_live_at and expire_at under the "Once published" label self.assertContains( response, - '
Once published:
', + '
Once published:
', html=True, count=1, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) @@ -2711,25 +2711,25 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # override the existing expire_at when it goes live self.assertNotContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, ) # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) @@ -2825,7 +2825,7 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # unpublished (expired) -> published (scheduled) -> unpublished (expired again) self.assertContains( response, - f'Expiry: {rendered_timestamp(expire_at)}', + f'Expiry: {rendered_timestamp(expire_at)}', html=True, count=1, ) @@ -2833,18 +2833,18 @@ class TestEditDraftStateSnippet(BaseTestSnippetEditView): # Should show the go_live_at and expire_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(go_live_at)}', + f'Go-live: {rendered_timestamp(go_live_at)}', html=True, count=1, ) self.assertContains( response, - f'Expiry: {rendered_timestamp(new_expire_at)}', + f'Expiry: {rendered_timestamp(new_expire_at)}', html=True, count=1, ) @@ -2905,13 +2905,13 @@ class TestScheduledForPublishLock(BaseTestSnippetEditView): # Should show the go_live_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(self.go_live_at)}', + f'Go-live: {rendered_timestamp(self.go_live_at)}', html=True, count=1, ) @@ -2972,13 +2972,13 @@ class TestScheduledForPublishLock(BaseTestSnippetEditView): # Should show the go_live_at without the "Once published" label self.assertNotContains( response, - '
Once published:
', + '
Once published:
', html=True, ) self.assertContains( response, - f'Go-live: {rendered_timestamp(self.go_live_at)}', + f'Go-live: {rendered_timestamp(self.go_live_at)}', html=True, count=1, )