mailtrain/views/campaigns/view.hbs
2017-03-11 09:52:12 +01:00

455 lines
24 KiB
Handlebars
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<ol class="breadcrumb">
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
<li><a href="/campaigns">{{#translate}}Campaigns{{/translate}}</a></li>
{{#if parent}}
<li><a href="/campaigns/view/{{parent.id}}">{{parent.name}}</a></li>
{{/if}}
<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> {{#translate}}Edit Campaign{{/translate}}</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">{{#translate}}Overview{{/translate}}</a></li>
{{#if links}}
<li role="presentation" class="{{#if showLinks}}active{{/if}}"><a href="#links" aria-controls="links" role="tab" data-toggle="tab">{{#translate}}Links{{/translate}}</a></li>
{{/if}}
</ul>
<div class="tab-content">
<div role="tabpanel" class="tab-pane {{#if showOverview}}active{{/if}}" id="overview">
<p></p>
<dl class="dl-horizontal">
{{#if list}}
<dt>{{#translate}}List{{/translate}}</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>
<dt>List subscribers</dt>
<dd>
{{#if segment}}
{{segment.subscribers}}
{{else}}
{{list.subscribers}}
{{/if}}
</dd>
{{/if}}
{{#if isRss}}
<dt>{{#translate}}Feed URL{{/translate}}</dt>
<dd><a href="{{sourceUrl}}">{{sourceUrl}}</a></dd>
<dt>{{#translate}}Last check{{/translate}}</dt>
<dd>
{{#if lastCheck}}<span class="datestring" data-date="{{lastCheck}}" title="{{lastCheck}}">{{lastCheck}}</span>{{else}}
{{#translate}}Not yet checked{{/translate}}{{/if}}
{{#unless isActive}}<span class="text-muted">({{#translate}}activate campaign to start checking feed for new messages{{/translate}})</span>{{/unless}}
</dd>
{{#if checkStatus}}
<dt>{{#translate}}RSS status{{/translate}}</dt>
<dd>{{checkStatus}}</dd>
{{/if}}
{{/if}}
{{#if from}}
<dt>{{#translate}}Email "from name"{{/translate}}</dt>
<dd>{{from}}</dd>
{{/if}}
{{#if address}}
<dt>{{#translate}}Email "from" address{{/translate}}</dt>
<dd>{{address}}</dd>
{{/if}}
{{#if replyTo}}
<dt>{{#translate}}Email "reply-to" address{{/translate}}</dt>
<dd>{{replyTo}}</dd>
{{/if}}
{{#if subject}}
<dt>{{#translate}}Email "subject line"{{/translate}}</dt>
<dd>{{subject}}</dd>
{{/if}}
{{#unless isRss}}
<dt>{{#translate}}Preview campaign as{{/translate}}</dt>
<dd>
<form method="post" action="/campaigns/preview/{{id}}" class="form-inline">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="campaign" value="{{cid}}">
<input type="hidden" name="list" value="{{list.cid}}">
<input type="hidden" name="listId" value="{{list.id}}">
<div class="form-group">
<select name="subscriber" class="form-control" required>
{{#each testUsers}}
<option value="{{cid}}">{{displayName}}</option>
{{/each}}
{{#if testUsers}}
<optgroup label="Actions">
<option value="_create">{{#translate}}Add new test user{{/translate}}…</option>
</optgroup>
{{else}}
<option value="_create">{{#translate}}No test users yet, create one here{{/translate}}…</option>
{{/if}}
</select>
</div>
<button type="submit" class="btn btn-default">{{#translate}}Go{{/translate}}</button>
</form>
</dd>
{{/unless}}
</dl>
<hr />
<dl class="dl-horizontal">
{{#unless isIdling}}
<dt>{{#translate}}Delivered{{/translate}} <a href="/campaigns/status/{{id}}/delivered" title="{{#translate}}List subscribers who received this message{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
<dd>
<div style="margin-bottom: 20px;">
{{delivered}}
</div>
</dd>
<dt>{{#translate}}Bounced{{/translate}} <a href="/campaigns/status/{{id}}/bounced" title="{{#translate}}List subscribers who bounced{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
<dd>
<div class="progress">
<div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="{{bounceRate}}" aria-valuemin="0" aria-valuemax="100" style="min-width: 6em; width: {{bounceRate}}%;">
{{bounced}}&nbsp;({{bounceRate}}%)
</div>
</div>
</dd>
<dt>{{#translate}}Complaints{{/translate}} <a href="/campaigns/status/{{id}}/complained" title="{{#translate}}List subscribers who complained for this message{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
<dd>
<div class="progress">
<div class="progress-bar progress-bar-danger" role="progressbar" aria-valuenow="{{complaintRate}}" aria-valuemin="0" aria-valuemax="100" style="min-width: 6em; width: {{complaintRate}}%;">
{{complained}}&nbsp;({{complaintRate}}%)
</div>
</div>
</dd>
<dt>{{#translate}}Unsubscribed{{/translate}} <a href="/campaigns/status/{{id}}/unsubscribed" title="{{#translate}}List subscribers who unsubscribed after this message{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a></dt>
<dd>
<div class="progress">
<div class="progress-bar progress-bar-warning" role="progressbar" aria-valuenow="{{unsubscribeRate}}" aria-valuemin="0" aria-valuemax="100" style="min-width: 6em; width: {{unsubscribeRate}}%;">
{{unsubscribed}}&nbsp;({{unsubscribeRate}}%)
</div>
</div>
</dd>
{{#unless trackingDisabled}}
<dt>{{#translate}}Opened{{/translate}} <a href="/campaigns/opened/{{id}}" title="{{#translate}}List subscribers who opened this message{{/translate}}"><span class="glyphicon glyphicon-zoom-in" 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: 6em; width: {{openRate}}%;">
{{opened}}&nbsp;({{openRate}}%)
</div>
</div>
</dd>
<dt>{{#translate}}Clicked{{/translate}} <a href="/campaigns/clicked/{{id}}/all" title="{{#translate}}List subscribers who clicked on a link{{/translate}}"> <span class="glyphicon glyphicon-zoom-in" 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: 6em; width: {{clicksRate}}%;">
{{clicks}}&nbsp;({{clicksRate}}%)
</div>
</div>
</dd>
{{/unless}}
{{/unless}}
</dl>
{{#if isNormal}}
<div class="panel panel-default">
<div class="panel-body">
{{#if isIdling}}
<form class="form-inline confirm-submit" data-confirm-message="{{#translate}}Are you sure? This action would start sending messages to the selected list{{/translate}}" method="post" action="/campaigns/send">
<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">{{#translate}}Delay sending{{/translate}}</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"> {{#translate}}hours{{/translate}}</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"> {{#translate}}minutes{{/translate}}</div>
</div>
</div>
</div>
<button type="submit" class="btn btn-success"><span class="glyphicon glyphicon-send" aria-hidden="true"></span> {{#translate}}Send to subscribers:{{/translate}}
{{#if segment}}
{{segment.subscribers}}
{{else}}
{{list.subscribers}}
{{/if}}</button>
</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="{{#translate}}Are you sure? This action would reset scheduling{{/translate}}" 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> {{#translate}}Cancel{{/translate}}
</button>
</form>
</div>
<h4>{{#translate}}Sending scheduled{{/translate}} <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> {{#translate}}Pause{{/translate}}
</button>
</form>
</div>
<h4><span class="glyphicon glyphicon-refresh spinning"></span> {{#translate}}Sending{{/translate}}…</h4>
{{/if}}
{{/if}}
{{#if isPaused}}
<div class="pull-right">
<form id="resume-sending" class="form-horizontal confirm-submit" data-confirm-message="{{#translate}}Are you sure? This action would resume sending messages to the selected list{{/translate}}" method="post" action="/campaigns/resume">
<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="{{#translate}}Are you sure? This action would reset all stats about current progress{{/translate}}" method="post" action="/campaigns/reset">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
<button type="submit" form="resume-sending" class="btn btn-info"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> {{#translate}}Resume{{/translate}}
</button>
<button type="submit" form="reset-sending" class="btn btn-danger"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> {{#translate}}Reset{{/translate}}
</button>
</div>
<h4>Sending paused</h4>
{{/if}}
{{#if isFinished}}
<div class="pull-right">
<form id="continue-sending" class="confirm-submit" data-confirm-message="{{#translate}}Are you sure? This action would resume sending messages to the selected list{{/translate}}" 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="{{#translate}}Are you sure? This action would reset all stats about current progress{{/translate}}" 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> {{#translate}}Continue{{/translate}}
</button>
<button type="submit" form="reset-sending" class="btn btn-danger"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> {{#translate}}Reset{{/translate}}
</button>
</div>
<h4>{{#translate}}All messages sent! Hit "Continue" if you you want to send this campaign to new subscribers{{/translate}}</h4>
{{/if}}
</div>
</div>
{{/if}}
{{#if isRss}}
<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="{{#translate}}Are you sure? This action would pause sending new entries in RSS feed as email messages to the selected list{{/translate}}" method="post" action="/campaigns/inactivate">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
<button type="submit" form="inactivate-sending" class="btn btn-warning"><span class="glyphicon glyphicon-pause" aria-hidden="true"></span> {{#translate}}Pause{{/translate}}
</button>
</div>
{{#translate}}Campaign status:{{/translate}} <span class="label label-primary">{{#translate}}ACTIVE{{/translate}}</span>
{{else}}
<div class="pull-right">
<form id="activate-sending" class="confirm-submit" data-confirm-message="{{#translate}}Are you sure? This action would start sending new entries in RSS feed as email messages to the selected list{{/translate}}" method="post" action="/campaigns/activate">
<input type="hidden" name="_csrf" value="{{csrfToken}}">
<input type="hidden" name="id" value="{{id}}" />
</form>
<button type="submit" form="activate-sending" class="btn btn-info"><span class="glyphicon glyphicon-play" aria-hidden="true"></span> {{#translate}}Activate{{/translate}}
</button>
</div>
{{#translate}}Campaign status:{{/translate}} <span class="label label-default">{{#translate}}INACTIVE{{/translate}}</span>
{{/if}}
</div>
</div>
{{/if}}
{{#if isTriggered}}
<div class="panel panel-default">
<div class="panel-body">
{{#translate}}This is a triggered campaign. Messages are only sent to subscribers that hit some trigger that invokes this campaign{{/translate}} (<a href="/triggers">{{#translate}}see more{{/translate}}</a>)
</div>
</div>
{{/if}}
</div>
{{#if links}}
{{#unless trackingDisabled}}
<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>
{{#translate}}URL{{/translate}}
</th>
<th class="col-md-1">
{{#translate}}Clicks{{/translate}}
</th>
<th class="col-md-1">
{{#translate}}% of clicks{{/translate}}
</th>
<th class="col-md-1">
{{#translate}}% of messages{{/translate}}
</th>
</thead>
<tbody>
{{#if links}}
{{#each links}}
<tr>
<td>
{{index}}
</td>
<td>
<a href="{{url}}">{{short}}</a>
</td>
<td>
<div class="pull-right">
<a href="/campaigns/clicked/{{../id}}/{{id}}" title="{{#translate}}List subscribers who clicked this link{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a>
</div>
{{clicks}}
</td>
<td>
{{relPercentage}}
</td>
<td>
{{totalPercentage}}
</td>
</tr>
{{/each}}
{{else}}
<tr>
<td colspan="5">
{{#translate}}No data available in table{{/translate}}
</td>
</tr>
{{/if}}
</tbody>
<tfoot>
<tr>
<th></th>
<th>
{{#translate}}Aggregated clicks{{/translate}}
</th>
<th>
<div class="pull-right">
<a href="/campaigns/clicked/{{id}}/all" title="{{#translate}}List subscribers who clicked on a link{{/translate}}"><span class="glyphicon glyphicon-zoom-in" aria-hidden="true"></span></a>
</div>
{{clicks}}
</th>
<th>
</th>
<th>
CTR {{clicksRate}}%
</th>
</tr>
</tfoot>
</table>
<p class="text-muted">
{{#translate}}Clicks are counted as unique subscribers that clicked on a specific link or on any link (in aggregated view){{/translate}}
</p>
</div>
</div>
{{/unless}}
{{/if}}
</div>
{{#if isRss}}
<div class="table-responsive">
<div class="well text-info">
{{#translate}}If a new entry is found from campaign feed a new subcampaign is created of that entry and it will be listed here{{/translate}}
</div>
<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>
{{#translate}}Name{{/translate}}
</th>
<th>
{{#translate}}Description{{/translate}}
</th>
<th>
{{#translate}}Status{{/translate}}
</th>
<th>
{{#translate}}Created{{/translate}}
</th>
<th class="col-md-1">
&nbsp;
</th>
</thead>
</table>
</div>
{{/if}}