From 384069a773e76b578350793955906b8d0f279806 Mon Sep 17 00:00:00 2001 From: bencroker Date: Thu, 4 Jul 2024 17:38:11 +0200 Subject: [PATCH 1/3] 2.17.0 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b81d8d8b..27d23bf0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Campaign -## 2.17.0 - Unreleased +## 2.17.0 - 2024-07-04 ### Added From 8fbe759954348b2b59cc85477013e82fbf9c22f6 Mon Sep 17 00:00:00 2001 From: bencroker Date: Sun, 14 Jul 2024 20:28:42 +0200 Subject: [PATCH 2/3] Added number formatting to counts --- CHANGELOG.md | 6 ++++++ composer.json | 2 +- src/elements/MailingListElement.php | 8 ++++---- src/elements/SegmentElement.php | 4 ++-- src/elements/SendoutElement.php | 2 +- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27d23bf0..ba2c2105 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Release Notes for Campaign +## 2.17.1 - Unreleased + +### Changed + +- Improved the number formatting of counts on element index pages. + ## 2.17.0 - 2024-07-04 ### Added diff --git a/composer.json b/composer.json index 017d024b..0f010a92 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": "2.17.0", + "version": "2.17.1", "type": "craft-plugin", "homepage": "https://putyourlightson.com/plugins/campaign", "license": "proprietary", diff --git a/src/elements/MailingListElement.php b/src/elements/MailingListElement.php index e1aaa8b1..fc7df21e 100755 --- a/src/elements/MailingListElement.php +++ b/src/elements/MailingListElement.php @@ -587,10 +587,10 @@ protected function tableAttributeHtml(string $attribute): string { return match ($attribute) { 'mailingListType' => $this->getMailingListType()->name, - 'subscribed' => (string)$this->getSubscribedCount(), - 'unsubscribed' => (string)$this->getUnsubscribedCount(), - 'complained' => (string)$this->getComplainedCount(), - 'bounced' => (string)$this->getBouncedCount(), + 'subscribed' => number_format($this->getSubscribedCount()), + 'unsubscribed' => number_format($this->getUnsubscribedCount()), + 'complained' => number_format($this->getComplainedCount()), + 'bounced' => number_format($this->getBouncedCount()), default => parent::tableAttributeHtml($attribute), }; } diff --git a/src/elements/SegmentElement.php b/src/elements/SegmentElement.php index a928d374..26a4e1aa 100755 --- a/src/elements/SegmentElement.php +++ b/src/elements/SegmentElement.php @@ -262,8 +262,8 @@ protected function tableAttributeHtml(string $attribute): string { return match ($attribute) { 'segmentType' => $this->getSegmentTypeLabel(), - 'conditions' => (string)$this->getConditionCount(), - 'contacts' => (string)$this->getContactCount(), + 'conditions' => number_format($this->getConditionCount()), + 'contacts' => number_format($this->getContactCount()), default => parent::tableAttributeHtml($attribute), }; } diff --git a/src/elements/SendoutElement.php b/src/elements/SendoutElement.php index 2076f03c..f7e04ed4 100755 --- a/src/elements/SendoutElement.php +++ b/src/elements/SendoutElement.php @@ -1191,7 +1191,7 @@ protected function tableAttributeHtml(string $attribute): string return $sender ? Craft::$app->getView()->renderTemplate('_elements/element', ['element' => $sender]) : ''; case 'mailingListIds': - return (string)$this->getMailingListCount(); + return number_format($this->getMailingListCount()); case 'recipients': return number_format($this->recipients); From 91714fc6abeeb42fb5d53eca89a37f442ff5e3ac Mon Sep 17 00:00:00 2001 From: bencroker Date: Mon, 15 Jul 2024 22:30:09 +0200 Subject: [PATCH 3/3] 2.17.1 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ba2c2105..e82bfcaa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Campaign -## 2.17.1 - Unreleased +## 2.17.1 - 2024-07-15 ### Changed