Skip to content

Commit

Permalink
Fix status colours
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Oct 4, 2024
1 parent 67c999a commit a5cc293
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
3 changes: 2 additions & 1 deletion src/templates/sendouts/_includes/fields.twig
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
}) }}
{% else %}
{% if sendout.campaign %}
<span class="status {{ sendout.campaign.status }}"></span>
{% set status = sendout.campaign.statuses[sendout.status] %}
<span class="status {{ status.color.value }}"></span>
<a href="{{ sendout.campaign.cpEditUrl }}" class="go" target="_blank">{{ sendout.campaign.title }}</a>
{% else %}
{{ 'Campaign not found.'|t('campaign') }}
Expand Down
5 changes: 3 additions & 2 deletions src/templates/sendouts/_preview.twig
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,9 @@
<h5 class="heading">{{ 'Status'|t('app') }}</h5>
<div class="value flex">
<div class="flex-grow">
<span class="status {{ sendout.status }}"></span>
{{ sendout.statuses[sendout.status].label ?? '' }}
{% set status = sendout.statuses[sendout.status] %}
<span class="status {{ status.color.value }}"></span>
{{ status.label }}
</div>
{% include 'campaign/_includes/actions' %}
</div>
Expand Down

0 comments on commit a5cc293

Please sign in to comment.