mailtrain/views/campaigns/view.hbs

379 lines
17 KiB
Handlebars
Raw Normal View History

2016-04-04 12:36:30 +00:00
<ol class="breadcrumb">
<li><a href="/">Home</a></li>
<li><a href="/campaigns">Campaigns</a></li>
{{#if parent}}
<li><a href="/campaigns/view/{{parent.id}}">{{parent.name}}</a></li>
{{/if}}
2016-04-04 12:36:30 +00:00
<li class="active">{{name}}</li>
</ol>
<div class="pull-right">
<a class="btn btn-primary" href="/campaigns/edit/{{id}}" role="button"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> Edit Campaign</a>
</div>
<h2><span class="glyphicon glyphicon-inbox" aria-hidden="true"></span> {{name}}</h2>
<hr>
{{#if description}}
<div class="well well-sm">{{{description}}}</div>
{{/if}}
<!-- Nav tabs -->
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="{{#if showOverview}}active{{/if}}"><a href="#overview" aria-controls="overview" role="tab" data-toggle="tab">Overview</a></li>
{{#if links}}
<li role="presentation" class="{{#if showLinks}}active{{/if}}"><a href="#links" aria-controls="links" role="tab" data-toggle="tab">Links</a></li>
2016-05-03 09:36:06 +00:00
{{/if}}
</ul>
2016-05-03 09:36:06 +00:00
<div class="tab-content">
<div role="tabpanel" class="tab-pane {{#if showOverview}}active{{/if}}" id="overview">
2016-04-04 12:36:30 +00:00
<p></p>
2016-04-04 12:36:30 +00:00
<dl class="dl-horizontal">
<dt>List</dt>
<dd>
{{#if segment}}
<a href="/lists/view/{{list.id}}?segment={{segment.id}}">
{{list.name}}: {{segment.name}}
</a>
{{else}}
<a href="/lists/view/{{list.id}}">
{{list.name}}
</a>
{{/if}}
</dd>
2016-04-04 12:36:30 +00:00
<dt>List subscribers</dt>
<dd>
{{#if segment}}
{{segment.subscribers}}
{{else}}
{{list.subscribers}}
{{/if}}
</dd>
2016-05-03 09:36:06 +00:00
{{#if isRss}}
<dt>Feed URL</dt>
<dd><a href="{{sourceUrl}}">{{sourceUrl}}</a></dd>
<dt>Last check</dt>
<dd>
{{#if lastCheck}}<span class="datestring" data-date="{{lastCheck}}" title="{{lastCheck}}">{{lastCheck}}</span>{{else}}
Not yet checked{{/if}}
{{#unless isActive}}<span class="text-muted">(activate campaign to start checking feed for new messages)</span>{{/unless}}
</dd>
{{#if checkStatus}}
<dt>RSS status</dt>
<dd>{{checkStatus}}</dd>
{{/if}}
{{/if}}
2016-04-04 12:36:30 +00:00
{{#if from}}
<dt>Email "from name"</dt>
<dd>{{from}}</dd>
{{/if}}
2016-04-04 12:36:30 +00:00
{{#if address}}
<dt>Email "from" address</dt>
<dd>{{address}}</dd>
{{/if}}
2016-04-04 12:36:30 +00:00
{{#if subject}}
<dt>Email "subject line"</dt>
<dd>{{subject}}</dd>
{{/if}}
2016-04-04 12:36:30 +00:00
{{#if isNormal}}
2016-05-03 09:36:06 +00:00
{{#unless isIdling}}
<dt>Delivered</dt>
<dd>{{delivered}}</dd>
2016-04-04 12:36:30 +00:00
<dt>Bounced</dt>
<dd>{{bounced}}</dd>
2016-04-04 12:36:30 +00:00
<dt>Complaints</dt>
<dd>{{complained}}</dd>
2016-04-04 12:36:30 +00:00
<dt>Unsubscribed</dt>
<dd>{{unsubscribed}}</dd>
2016-05-03 09:36:06 +00:00
2016-05-13 19:51:40 +00:00
<dt><a href="/campaigns/opened/{{id}}" title="List subscribers who opened this message">Opened <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></dt>
<dd>
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{openRate}}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{openRate}}%;">
{{openRate}}%
2016-05-03 09:36:06 +00:00
</div>
</div>
</dd>
2016-05-13 19:51:40 +00:00
<dt><a href="/campaigns/clicked/{{id}}/all" title="List subscribers who clicked on a link">Clicked <span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a></dt>
<dd>
<div class="progress">
<div class="progress-bar progress-bar-success" role="progressbar" aria-valuenow="{{clicksRate}}" aria-valuemin="0" aria-valuemax="100" style="min-width: 2em; width: {{clicksRate}}%;">
{{clicksRate}}%
2016-05-03 09:36:06 +00:00
</div>
2016-04-26 12:18:41 +00:00
</div>
</dd>
2016-04-26 12:18:41 +00:00
{{/unless}}
2016-05-03 09:36:06 +00:00
{{/if}}
</dl>
2016-04-04 12:36:30 +00:00
{{#if isNormal}}
<div class="panel panel-default">
<div class="panel-body">
{{#if isIdling}}
<form class="form-inline confirm-submit" data-confirm-message="Are you sure? This action would start sending messages to the selected list" method="post" action="/campaigns/send">
2016-05-03 09:36:06 +00:00
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
<div class="pull-right">
<div class="form-group">
<p class="form-control-static">Delay sending</p>
</div>
<div class="form-group">
<div class="input-group">
<input type="number" class="form-control" name="delay-hours" id="delay-hours" placeholder="0">
<div class="input-group-addon"> hours</div>
</div>
</div>
<div class="form-group">
<div class="input-group">
<input type="number" class="form-control" name="delay-minutes" id="delay-minutes" placeholder="0">
<div class="input-group-addon"> minutes</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-send" aria-hidden="true"></span> Send to
{{#if segment}}
{{segment.subscribers}}
{{else}}
{{list.subscribers}}
{{/if}} subscribers</button>
2016-05-03 09:36:06 +00:00
</form>
{{/if}}
{{#if isSending}}
<!-- Indicate that this page needs refreshing after 20s. -->
<div class="page-refresh" data-interval="20"></div>
{{#if isScheduled}}
<div class="pull-right">
<form class="form-horizontal confirm-submit" data-confirm-message="Are you sure? This action would reset scheduling" method="post" action="/campaigns/reset">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
<button type="submit" class="btn btn-danger"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span> Cancel
</button>
</form>
</div>
<h4>Sending scheduled <span class="datestring text-info" data-date="{{scheduled}}" title="{{scheduled}}">{{scheduled}}</span></h4>
{{else}}
<div class="pull-right">
<form class="form-horizontal" method="post" action="/campaigns/pause">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
<button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-pause" aria-hidden="true"></span> Pause
</button>
</form>
</div>
<h4>Sending…</h4>
{{/if}}
{{/if}}
{{#if isPaused}}
<div class="pull-right">
<form class="form-horizontal confirm-submit" data-confirm-message="Are you sure? This action would resume sending messages to the selected list" method="post" action="/campaigns/resume">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
<button type="submit" class="btn btn-info"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Resume
</button>
</form>
</div>
<h4>Sending paused</h4>
{{/if}}
{{#if isFinished}}
<div class="pull-right">
<form id="continue-sending" class="confirm-submit" data-confirm-message="Are you sure? This action would resume sending messages to the selected list" method="post" action="/campaigns/send">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
<form id="reset-sending" class="confirm-submit" data-confirm-message="Are you sure? This action would reset all stats about current progress" method="post" action="/campaigns/reset">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
<button type="submit" form="continue-sending" class="btn btn-info"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Continue
</button>
2016-05-03 09:36:06 +00:00
<button type="submit" form="reset-sending" class="btn btn-danger"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Reset
2016-05-03 09:36:06 +00:00
</button>
</div>
<h4>All messages sent! Hit "Continue" if you you want to send this campaign to new subscribers</h4>
{{/if}}
2016-04-26 12:18:41 +00:00
</div>
</div>
{{/if}}
2016-05-03 09:36:06 +00:00
{{#if isRss}}
2016-05-03 09:36:06 +00:00
<div class="panel panel-default">
<div class="panel-body">
{{#if isActive}}
<div class="pull-right">
<form id="inactivate-sending" class="confirm-submit" data-confirm-message="Are you sure? This action would pause sending new entries in RSS feed as email messages to the selected list" method="post" action="/campaigns/inactivate">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
2016-05-03 09:36:06 +00:00
<button type="submit" form="inactivate-sending" class="btn btn-warning"><span class="glyphicon glyphicon-pause" aria-hidden="true"></span> Pause
</button>
</div>
2016-04-04 12:36:30 +00:00
Campaign status: <span class="label label-primary">ACTIVE</span>
{{else}}
<div class="pull-right">
<form id="activate-sending" class="confirm-submit" data-confirm-message="Are you sure? This action would start sending new entries in RSS feed as email messages to the selected list" method="post" action="/campaigns/activate">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
2016-04-04 12:36:30 +00:00
<button type="submit" form="activate-sending" class="btn btn-info"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> Activate
</button>
</div>
2016-04-04 12:36:30 +00:00
Campaign status: <span class="label label-default">INACTIVE</span>
{{/if}}
2016-05-03 09:36:06 +00:00
</div>
</div>
{{/if}}
2016-04-04 12:36:30 +00:00
</div>
{{#if links}}
<div role="tabpanel" class="tab-pane {{#if showLinks}}active{{/if}}" id="links">
<p></p>
<div class="table-responsive">
<table class="table table-bordered table-hover">
<thead>
<th class="col-md-1">
#
</th>
<th>
URL
</th>
2016-05-05 11:57:56 +00:00
<th class="col-md-1">
2016-05-05 12:31:41 +00:00
Clicks
</th>
2016-05-05 11:57:56 +00:00
<th class="col-md-1">
% of clicks
</th>
<th class="col-md-1">
% of messages
</th>
</thead>
<tbody>
{{#if links}}
{{#each links}}
<tr>
<td>
{{index}}
</td>
<td>
2016-05-05 11:57:56 +00:00
<a href="{{url}}">{{short}}</a>
</td>
<td>
2016-05-13 12:32:29 +00:00
<div class="pull-right">
2016-05-13 19:51:40 +00:00
<a href="/campaigns/clicked/{{../id}}/{{id}}" title="List subscribers who clicked this link"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a>
2016-05-13 12:32:29 +00:00
</div>
{{clicks}}
</td>
2016-05-05 11:57:56 +00:00
<td>
{{relPercentage}}
</td>
<td>
{{totalPercentage}}
</td>
</tr>
{{/each}}
{{else}}
<tr>
2016-05-05 11:57:56 +00:00
<td colspan="5">
No data available in table
</td>
</tr>
{{/if}}
</tbody>
2016-05-05 12:07:51 +00:00
<tfoot>
<tr>
<th></th>
<th>
2016-05-05 12:31:41 +00:00
Aggregated clicks
2016-05-05 12:07:51 +00:00
</th>
<th>
2016-05-13 18:08:44 +00:00
<div class="pull-right">
2016-05-13 19:51:40 +00:00
<a href="/campaigns/clicked/{{id}}/all" title="List subscribers who clicked on a link"><span class="glyphicon glyphicon-info-sign" aria-hidden="true"></span></a>
2016-05-13 18:08:44 +00:00
</div>
2016-05-05 12:07:51 +00:00
{{clicks}}
</th>
<th>
2016-05-05 12:31:41 +00:00
2016-05-05 12:07:51 +00:00
</th>
<th>
2016-05-05 12:23:12 +00:00
CTR {{clicksRate}}%
2016-05-05 12:07:51 +00:00
</th>
</tr>
</tfoot>
</table>
2016-04-04 12:36:30 +00:00
2016-05-05 12:31:41 +00:00
<p class="text-muted">
Clicks are counted as unique subscribers that clicked on a specific link or on any link (in aggregated view)
</p>
2016-04-04 12:36:30 +00:00
</div>
2016-05-03 09:36:06 +00:00
</div>
{{/if}}
2016-04-04 12:36:30 +00:00
2016-05-13 12:32:29 +00:00
</div>
{{#if isRss}}
<div class="table-responsive">
<div class="well text-info">
If a new entry is found from campaign feed a new subcampaign is created of that entry and it will be listed here
</div>
2016-05-13 12:32:29 +00:00
<table data-topic-url="/campaigns" data-sort-column="4" data-sort-order="desc" class="table table-bordered table-hover data-table-ajax display nowrap" data-topic-args="parent={{id}}" width="100%" data-row-sort="0,1,0,1,1,0">
<thead>
<th class="col-md-1">
#
</th>
<th>
Name
</th>
<th>
Description
</th>
<th>
Status
</th>
<th>
Created
</th>
<th class="col-md-1">
&nbsp;
</th>
</thead>
</table>
</div>
{{/if}}