From a5cc293dee3f1b523b55e9ff85f291af5d1b056f Mon Sep 17 00:00:00 2001 From: bencroker Date: Fri, 4 Oct 2024 22:34:10 +0200 Subject: [PATCH] Fix status colours --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/templates/sendouts/_includes/fields.twig | 3 ++- src/templates/sendouts/_preview.twig | 5 +++-- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 831e7619..af3d328a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes for Campaign +## 3.5.3 - Unreleased + +### Fixed + +- Fixed the sendout status colour indicators on sendout preview pages. + ## 3.5.2 - 2024-10-04 ### Fixed diff --git a/composer.json b/composer.json index b00a4189..a16322ed 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "putyourlightson/craft-campaign", "description": "Send and manage email campaigns, contacts and mailing lists.", - "version": "3.5.2", + "version": "3.5.3", "type": "craft-plugin", "homepage": "https://putyourlightson.com/plugins/campaign", "license": "proprietary", diff --git a/src/templates/sendouts/_includes/fields.twig b/src/templates/sendouts/_includes/fields.twig index 930f9b9d..516ae2eb 100644 --- a/src/templates/sendouts/_includes/fields.twig +++ b/src/templates/sendouts/_includes/fields.twig @@ -15,7 +15,8 @@ }) }} {% else %} {% if sendout.campaign %} - + {% set status = sendout.campaign.statuses[sendout.status] %} + {{ sendout.campaign.title }} {% else %} {{ 'Campaign not found.'|t('campaign') }} diff --git a/src/templates/sendouts/_preview.twig b/src/templates/sendouts/_preview.twig index d925aebe..7437d2f7 100644 --- a/src/templates/sendouts/_preview.twig +++ b/src/templates/sendouts/_preview.twig @@ -92,8 +92,9 @@
{{ 'Status'|t('app') }}
- - {{ sendout.statuses[sendout.status].label ?? '' }} + {% set status = sendout.statuses[sendout.status] %} + + {{ status.label }}
{% include 'campaign/_includes/actions' %}