-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added campaign recipients in reports
- Loading branch information
Showing
11 changed files
with
138 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
{% import 'campaign/_macros' as macros %} | ||
|
||
{{ "Filter by sendout"|t('campaign') }}: | ||
<div class="select"> | ||
<select class="filter" data-type="sendout"> | ||
<option value="">{{ "All"|t('campaign') }}</option> | ||
{% for sendout in data.sendouts %} | ||
<option value="{{ sendout.id }}" {{ sendoutId == sendout.id ? 'selected' }}> | ||
{{ sendout.title }} | ||
</option> | ||
{% endfor %} | ||
</select> | ||
</div> | ||
<br/><br/> | ||
|
||
{% if recipients|length %} | ||
|
||
<table id="recipients" class="display responsive nowrap"> | ||
<thead> | ||
<th scope="col">{{ "Email"|t('campaign') }}</th> | ||
<th scope="col">{{ "Sendout"|t('campaign') }}</th> | ||
<th scope="col">{{ "Sent"|t('campaign') }}</th> | ||
</thead> | ||
<tbody> | ||
{% for recipient in recipients %} | ||
{% set contact = recipient.contact %} | ||
{% if contact %} | ||
<tr> | ||
<th scope="row" data-title="{{ 'Email'|t('campaign') }}"> | ||
<a href="{{ contact.reportUrl }}">{{ contact.email }}</a> | ||
</th> | ||
<td data-title="{{ 'Sendout'|t('campaign') }}"> | ||
{% set sendout = recipient.sendout %} | ||
{% if sendout %} | ||
<a href="{{ sendout.cpEditUrl }}">{{ sendout.title }}</a> | ||
{% endif %} | ||
</td> | ||
<td data-order="{{ recipient.sent|datetime('U') }}" data-title="{{ 'Sent'|t('campaign') }}"> | ||
{{ recipient.sent|datetime }} | ||
</td> | ||
</tr> | ||
{% endif %} | ||
{% endfor %} | ||
</tbody> | ||
</table> | ||
|
||
{% js %} | ||
new Campaign.DataTable({ | ||
id: 'recipients', | ||
itemName: 'recipients', | ||
options: { | ||
order: [[ 2, 'desc' ]], | ||
}, | ||
}); | ||
{% endjs %} | ||
|
||
{% else %} | ||
|
||
<p>{{ "No recipients for this campaign."|t('campaign') }}</p> | ||
|
||
{% endif %} | ||
|
||
<br/><br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{% extends 'campaign/reports/_layout' %} | ||
|
||
{% set campaign = craft.campaign.getCampaignById(campaignId) %} | ||
{% set title = 'Recipients'|t('campaign') %} | ||
|
||
{% set crumbs = [ | ||
{ label: 'Campaigns'|t('campaign'), url: url('campaign/reports/campaigns') }, | ||
{ label: campaign.title, url: campaign.reportUrl } | ||
] %} | ||
|
||
|
||
{% block content %} | ||
|
||
{% set sendoutId = craft.app.request.param('sendout') %} | ||
{% include 'campaign/reports/campaigns/_includes/recipients' with { | ||
recipients: craft.campaign.reports.getCampaignRecipients(campaignId, sendoutId), | ||
data: craft.campaign.reports.getCampaignReportData(campaignId), | ||
} %} | ||
|
||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters