Manage subscriptions
- make use of the SubscriberSegment::status column to keep track of unsubscriptions - unsubscribed segments now appear grayed out in the Subscribers listing - added unsubscribed_at after segment names when editing a subscriber - added date() method for Twig (uses WP's date format / date_offset) - fixed typo in Form iframe export - fixed unit test for Newsletters - updated selection component (JSX) to allow more customization
This commit is contained in:
@@ -52,6 +52,11 @@ class Newsletter extends Model {
|
||||
);
|
||||
}
|
||||
|
||||
function withSegments() {
|
||||
$this->segments = $this->segments()->findArray();
|
||||
return $this;
|
||||
}
|
||||
|
||||
function options() {
|
||||
return $this->has_many_through(
|
||||
__NAMESPACE__.'\NewsletterOptionField',
|
||||
@@ -67,6 +72,12 @@ class Newsletter extends Model {
|
||||
->findOne();
|
||||
}
|
||||
|
||||
function withSendingQueue() {
|
||||
$this->queue = $this->getQueue();
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
static function search($orm, $search = '') {
|
||||
return $orm->where_like('subject', '%' . $search . '%');
|
||||
}
|
||||
|
Reference in New Issue
Block a user