Initial import
This commit is contained in:
commit
54fa30701e
278 changed files with 37868 additions and 0 deletions
44
views/archive/layout.hbs
Normal file
44
views/archive/layout.hbs
Normal file
|
@ -0,0 +1,44 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="Self hosted email newsletter app">
|
||||
<meta name="author" content="Andris Reinman">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
<title>Mailtrain</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css" integrity="sha384-1q8mTJOASx8j1Au+a5WDVnPi2lkFfwwEAa8hDDdjZlpLegxhjVME1fgjWPGmkzs7" crossorigin="anonymous">
|
||||
-->
|
||||
|
||||
<!-- -->
|
||||
<link rel="stylesheet" href="/bootstrap/themes/flatly.min.css" integrity="sha384-GtWr4mgKIG0HYWHu8/xcLo4DnouVrY7hPd7ZH6T3dobUR8XyHwF1VFWZ1yOVT8wi" crossorigin="anonymous">
|
||||
<!-- -->
|
||||
|
||||
<link rel="stylesheet" href="/css/narrow.css">
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="header clearfix">
|
||||
<h3 class="text-muted">{{campaign.subject}}</h3>
|
||||
</div>
|
||||
|
||||
{{flash_messages}} {{{body}}}
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/javascript/jquery-2.2.1.min.js" integrity="sha384-8C+3bW/ArbXinsJduAjm9O7WNnuOcO+Bok/VScRYikawtvz4ZPrpXtGfKIewM9dK" crossorigin="anonymous"></script>
|
||||
<script src="/bootstrap/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
2
views/archive/view.hbs
Normal file
2
views/archive/view.hbs
Normal file
|
@ -0,0 +1,2 @@
|
|||
|
||||
{{{message}}}
|
69
views/campaigns/campaigns.hbs
Normal file
69
views/campaigns/campaigns.hbs
Normal file
|
@ -0,0 +1,69 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Campaigns</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/campaigns/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create Campaign</a>
|
||||
</div>
|
||||
|
||||
<h2>Campaigns</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover data-table display nowrap" 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">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
{{#if rows}}
|
||||
<tbody>
|
||||
{{#each rows}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-inbox" aria-hidden="true"></span>
|
||||
<a href="/campaigns/view/{{id}}">
|
||||
{{name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<p class="text-muted">{{description}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p>{{statusText}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<span class="datestring" data-date="{{created}}" title="{{created}}">{{createdTimestamp}}</span>
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/campaigns/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
95
views/campaigns/create.hbs
Normal file
95
views/campaigns/create.hbs
Normal file
|
@ -0,0 +1,95 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/campaigns">Campaigns</a></li>
|
||||
<li class="active">Create Campaign</li>
|
||||
</ol>
|
||||
|
||||
<h2>Create Campaign</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/campaigns/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="Campaign Name" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="3" name="description" id="description">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="list" class="col-sm-2 control-label">List</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="list" name="list" required>
|
||||
<option value=""> –– Select –– </option>
|
||||
{{#each listItems}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>
|
||||
{{name}} <span class="text-muted"> — {{subscribers}} subscribers</span>
|
||||
</option>
|
||||
|
||||
{{#if segments}}
|
||||
<optgroup label="{{name}} segments">
|
||||
{{#each segments}}
|
||||
<option value="{{../id}}:{{id}}" {{#if selected}} selected {{/if}}>
|
||||
{{../name}}: {{name}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template" class="col-sm-2 control-label">Template</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="template" name="template">
|
||||
<option value=""> –– Select –– </option>
|
||||
{{#each templateItems}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>
|
||||
{{name}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<span class="help-block">Not required. Creates a campaign specific copy from a template that you can later edit</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="from" class="col-sm-2 control-label">Email "from name"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="from" id="from" value="{{from}}" placeholder="This is the name your emails will come from" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address" class="col-sm-2 control-label">Email "from" address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="address" id="address" value="{{address}}" placeholder="This is the address people will send replies to" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">Email "subject line"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="subject" id="subject" value="{{subject}}" placeholder="Keep it relevant and non-spammy" required>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Create Campaign</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
173
views/campaigns/edit.hbs
Normal file
173
views/campaigns/edit.hbs
Normal file
|
@ -0,0 +1,173 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/campaigns">Campaigns</a></li>
|
||||
<li><a href="/campaigns/view/{{id}}">{{name}}</a></li>
|
||||
<li class="active">Edit Campaign</li>
|
||||
</ol>
|
||||
|
||||
<h2>Edit Campaign <a class="btn btn-default btn-xs" href="/campaigns/view/{{id}}" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> View campaign</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="campaigns-delete" action="/campaigns/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/campaigns/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
|
||||
<div>
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="{{#if showGeneral}}active{{/if}}"><a href="#general" aria-controls="general" role="tab" data-toggle="tab">General</a></li>
|
||||
<li role="presentation" class="{{#if showTemplate}}active{{/if}}"><a href="#template" aria-controls="template" role="tab" data-toggle="tab">Template</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane {{#if showGeneral}}active{{/if}}" id="general">
|
||||
|
||||
<p></p>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
General Settings
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="Campaign Name" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="3" name="description" id="description">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="list" class="col-sm-2 control-label">List</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="list" name="list" required>
|
||||
<option value=""> –– Select –– </option>
|
||||
{{#each listItems}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>
|
||||
{{name}} <span class="text-muted"> — {{subscribers}} subscribers</span>
|
||||
</option>
|
||||
|
||||
{{#if segments}}
|
||||
<optgroup label="{{name}} segments">
|
||||
{{#each segments}}
|
||||
<option value="{{../id}}:{{id}}" {{#if selected}} selected {{/if}}>
|
||||
{{../name}}: {{name}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="from" class="col-sm-2 control-label">Email "from name"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="from" id="from" value="{{from}}" placeholder="This is the name your emails will come from" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="address" class="col-sm-2 control-label">Email "from" address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="address" id="address" value="{{address}}" placeholder="This is the address people will send replies to" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="subject" class="col-sm-2 control-label">Email "subject line"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="subject" id="subject" value="{{subject}}" placeholder="Keep it relevant and non-spammy" required>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane {{#if showTemplate}}active{{/if}}" id="template">
|
||||
|
||||
<p></p>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
Template Settings
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<a class="btn btn-default" role="button" data-toggle="collapse" href="#mergeReference" aria-expanded="false" aria-controls="mergeReference">Merge tag reference</a>
|
||||
<div class="collapse" id="mergeReference">
|
||||
<p>
|
||||
Merge tags are tags that are replaced before sending out the message. The format of the merge tag is the following: <code>[TAG_NAME]</code> or <code>[TAG_NAME/fallback]</code> where <code>fallback</code> is an optional
|
||||
text value used when <code>TAG_NAME</code> is empty.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<code>[FIRST_NAME]</code> – first name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LAST_NAME]</code> – last name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[FULL_NAME]</code> – first and last names of the subcriber joined
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_UNSUBSCRIBE]</code> – URL that points to the preferences page of the subscriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_PREFERENCES]</code> – URL that points to the unsubscribe page
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_BROWSER]</code> – URL to preview the message in a browser
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
In addition to that any custom field can have its own merge tag.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="campaigns-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Campaign</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
150
views/campaigns/view.hbs
Normal file
150
views/campaigns/view.hbs
Normal file
|
@ -0,0 +1,150 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/campaigns">Campaigns</a></li>
|
||||
<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}}
|
||||
|
||||
<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>
|
||||
|
||||
<dt>List subscribers</dt>
|
||||
<dd>
|
||||
{{#if segment}}
|
||||
{{segment.subscribers}}
|
||||
{{else}}
|
||||
{{list.subscribers}}
|
||||
{{/if}}
|
||||
</dd>
|
||||
|
||||
<dt>Email "from name"</dt>
|
||||
<dd>{{from}}</dd>
|
||||
|
||||
<dt>Email "from" address</dt>
|
||||
<dd>{{address}}</dd>
|
||||
|
||||
<dt>Email "subject line"</dt>
|
||||
<dd>{{subject}}</dd>
|
||||
|
||||
{{#unless isIdling}}
|
||||
<dt>Delivered</dt>
|
||||
<dd>{{delivered}}</dd>
|
||||
|
||||
<dt>Bounced</dt>
|
||||
<dd>{{bounced}}</dd>
|
||||
|
||||
<dt>Complaints</dt>
|
||||
<dd>{{complained}}</dd>
|
||||
|
||||
<dt>Unsubscribed</dt>
|
||||
<dd>{{unsubscribed}}</dd>
|
||||
|
||||
<dt>Opened</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}}%
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
<dt>Clicked</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}}%
|
||||
</div>
|
||||
</div>
|
||||
</dd>
|
||||
|
||||
{{/unless}}
|
||||
</dl>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
{{#if isIdling}}
|
||||
<form class="form-horizontal confirm-submit" data-confirm-message="Are you sure? This action would start 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}}" />
|
||||
|
||||
<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>
|
||||
</form>
|
||||
{{/if}}
|
||||
|
||||
{{#if isSending}}
|
||||
<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</a>
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
<h4>Sending…</h4>
|
||||
{{/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/send">
|
||||
<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</a>
|
||||
</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</a>
|
||||
</button>
|
||||
|
||||
<button type="submit" form="reset-sending" class="btn btn-danger"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Reset</a>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<h4>All messages sent! Hit "Continue" if you you want to send this campaign to new subscribers</h4>
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
</div>
|
18
views/emails/confirm-mail.hbs
Normal file
18
views/emails/confirm-mail.hbs
Normal file
|
@ -0,0 +1,18 @@
|
|||
<h1>{{title}}</h1>
|
||||
|
||||
<h2>Please Confirm Subscription</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
<a href="{{confirmUrl}}" class="btn-primary" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #348eda; margin: 0; border-color: #348eda; border-style: solid; border-width: 10px 20px;">Yes, subscribe me to this list</a>
|
||||
</p>
|
||||
<p>
|
||||
|
||||
If you received this email by mistake, simply delete it. You won't be subscribed if you don't click the confirmation link above.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
For questions about this list, please contact:
|
||||
<br/>{{contactAddress}}
|
||||
</p>
|
14
views/emails/password-reset.hbs
Normal file
14
views/emails/password-reset.hbs
Normal file
|
@ -0,0 +1,14 @@
|
|||
<h2>Change your password</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>
|
||||
We have received a password change request for your Mailtrain account ({{username}}).
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<a href="{{confirmUrl}}" class="btn-primary" itemprop="url" style="font-family: 'Helvetica Neue',Helvetica,Arial,sans-serif; box-sizing: border-box; font-size: 14px; color: #FFF; text-decoration: none; line-height: 2em; font-weight: bold; text-align: center; cursor: pointer; display: inline-block; border-radius: 5px; text-transform: capitalize; background-color: #348eda; margin: 0; border-color: #348eda; border-style: solid; border-width: 10px 20px;">Reset password</a>
|
||||
</p>
|
||||
<p>
|
||||
If you did not ask to change your password, then you can ignore this email and your password will not be changed.
|
||||
</p>
|
19
views/emails/stationery-html.hbs
Normal file
19
views/emails/stationery-html.hbs
Normal file
|
@ -0,0 +1,19 @@
|
|||
<p>Hey [FIRST_NAME/Customer],</p>
|
||||
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est.</p>
|
||||
|
||||
<p>Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus
|
||||
libero lacus a est.</p>
|
||||
|
||||
<p>Cheers,
|
||||
<br/> {{defaultSender}}
|
||||
</p>
|
||||
<p>
|
||||
{{defaultPostaddress}}
|
||||
<br/>
|
||||
<a href="[LINK_PREFERENCES]" style="color: #666666; text-decoration: none;">Preferences</a>
|
||||
<span style="color: #444444;"> | </span>
|
||||
<a href="[LINK_UNSUBSCRIBE]" style="color: #666666; text-decoration: none;">Unsubscribe</a>
|
||||
<span style="color: #444444;"> | </span>
|
||||
<a href="[LINK_BROWSER]" style="color: #666666; text-decoration: none;">View this email in your browser</a>
|
||||
</p>
|
14
views/emails/stationery-text.hbs
Normal file
14
views/emails/stationery-text.hbs
Normal file
|
@ -0,0 +1,14 @@
|
|||
Hey [FIRST_NAME/Customer],
|
||||
|
||||
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est.
|
||||
|
||||
Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est. Aenean at mollis ipsum. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed varius, leo a ullamcorper feugiat, ante purus sodales justo, a faucibus libero lacus a est.
|
||||
|
||||
Cheers,
|
||||
{{defaultSender}}
|
||||
|
||||
{{defaultPostaddress}}
|
||||
|
||||
Preferences: [LINK_PREFERENCES]
|
||||
Unsubscribe: [LINK_UNSUBSCRIBE]
|
||||
View this email in your browser: [LINK_BROWSER]
|
6
views/error.hbs
Normal file
6
views/error.hbs
Normal file
|
@ -0,0 +1,6 @@
|
|||
<h1>{{message}}</h1>
|
||||
|
||||
<h2>{{error.status}}</h2>
|
||||
{{#if error.stack}}
|
||||
<pre>{{error.stack}}</pre>
|
||||
{{/if}}
|
29
views/index.hbs
Normal file
29
views/index.hbs
Normal file
|
@ -0,0 +1,29 @@
|
|||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2>List management</h2>
|
||||
<p>Mailtrain allows you to easily manage even very large lists. Million subscribers? Not a problem. You can add subscribers manually or import from a CSV file. All lists come with support for custom fields and merge tags as well.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>Custom fields</h2>
|
||||
<p>Text fields, numbers, drop downs or checkboxes, Mailtrain has them all. Every custom field can be included in the generated newsletters through merge tags.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>List segmentation</h2>
|
||||
<p>Send messages only to list subscribers that match predefined segmentation rules. No need to create separate lists with small differences.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h2>Open source</h2>
|
||||
<p>Mailtrain is available under <a href="http://www.gnu.org/licenses/gpl-3.0.en.html">GPLv3</a> license and completely open source.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>Send via any provider</h2>
|
||||
<p>Amazon SES, SparkPost, SendGrid, Mailgun – you name it. You can use any provider that supports SMTP protocol to send out your newsletters.</p>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h2>On the roadmap</h2>
|
||||
<p>Automatic bounce and complaint handling for other providers besides AWS SES, reports, API access and more…</p>
|
||||
</div>
|
||||
</div>
|
176
views/layout.hbs
Normal file
176
views/layout.hbs
Normal file
|
@ -0,0 +1,176 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="Self hosted email newsletter app">
|
||||
<meta name="author" content="Andris Reinman">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
<title>Mailtrain
|
||||
{{#if title}} | {{title}}{{/if}}
|
||||
</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
|
||||
-->
|
||||
<link rel="stylesheet" href="/datatables/datatables.min.css">
|
||||
|
||||
<!-- Bootswatch themes -->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/united.min.css">
|
||||
-->
|
||||
|
||||
<!-- -->
|
||||
<link rel="stylesheet" href="/bootstrap/themes/flatly.min.css">
|
||||
<!-- -->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/slate.min.css">
|
||||
-->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/paper.min.css">
|
||||
-->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/superhero.min.css">
|
||||
-->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/yeti.min.css">
|
||||
-->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/simplex.min.css">
|
||||
-->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/themes/cosmo.min.css">
|
||||
-->
|
||||
|
||||
<link rel="stylesheet" href="/datepicker/css/bootstrap-datepicker3.css">
|
||||
<link rel="stylesheet" href="/css/footer.css">
|
||||
|
||||
{{#if useEditor}}
|
||||
<link rel="stylesheet" href="/summernote/summernote.css">
|
||||
{{/if}}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<nav class="navbar navbar-inverse navbar-static-top">
|
||||
<div class="container">
|
||||
<!-- Brand and toggle get grouped for better mobile display -->
|
||||
<div class="navbar-header">
|
||||
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
|
||||
<span class="sr-only">Toggle navigation</span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="/"><i class="glyphicon glyphicon-envelope"></i> Mailtrain</a>
|
||||
</div>
|
||||
|
||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
||||
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
|
||||
<ul class="nav navbar-nav">
|
||||
{{#each menu}}
|
||||
{{#if selected}}
|
||||
<li class="active"><a href="{{url}}">{{title}} <span class="sr-only">(current)</span></a></li>
|
||||
{{else}}
|
||||
<li><a href="{{url}}">{{title}}</a></li>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
</ul>
|
||||
|
||||
{{#if user }}
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li class="dropdown">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> {{user.username}} <span class="caret"></span>
|
||||
</a>
|
||||
<ul class="dropdown-menu">
|
||||
<li>
|
||||
<a href="/users/account">
|
||||
<span class="glyphicon glyphicon-user" aria-hidden="true"></span> Account
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/settings">
|
||||
<span class="glyphicon glyphicon-cog" aria-hidden="true"></span> Settings
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/users/logout">
|
||||
<span class="glyphicon glyphicon-log-out" aria-hidden="true"></span> Log out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{else}}
|
||||
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
<li>
|
||||
<a href="/users/login" role="button" aria-haspopup="true" aria-expanded="false">
|
||||
<span class="glyphicon glyphicon-log-in" aria-hidden="true"></span> Sign in
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<!-- Main jumbotron for a primary marketing message or call to action -->
|
||||
|
||||
{{#if indexPage}}
|
||||
<div class="jumbotron">
|
||||
<div class="container">
|
||||
<div class="pull-right hidden-xs">
|
||||
<img class="img-responsive" src="/mailtrain.png">
|
||||
</div>
|
||||
|
||||
<h1>Mailtrain</h1>
|
||||
<p>Self hosted newsletter app built on top of <a href="http://nodemailer.com">Nodemailer</a></p>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<div class="visible-xs-block ">
|
||||
<img class="img-responsive" src="/mailtrain.png">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="container">
|
||||
|
||||
{{flash_messages}} {{{body}}}
|
||||
|
||||
</div>
|
||||
|
||||
<footer class="footer">
|
||||
<div class="container">
|
||||
<p class="text-muted">© 2016 Andris Reinman <a href="https://mailtrain.org">Mailtrain.org</a>, <a href="mailto:info@mailtrain.org">info@mailtrain.org</a>. Source at <a href="https://github.com/andris9/mailtrain">GitHub</a></p>
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script src="/javascript/jquery-2.2.1.min.js"></script>
|
||||
<script src="/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="/datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="/datatables/datatables.min.js"></script>
|
||||
<script src="/moment/moment.min.js"></script>
|
||||
<script src="/javascript/tables.js"></script>
|
||||
|
||||
{{#if useEditor}}
|
||||
<script src="/summernote/summernote.min.js"></script>
|
||||
<script src="/javascript/editor.js"></script>
|
||||
{{/if}}
|
||||
</body>
|
||||
|
||||
</html>
|
34
views/lists/create.hbs
Normal file
34
views/lists/create.hbs
Normal file
|
@ -0,0 +1,34 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li class="active">Create List</li>
|
||||
</ol>
|
||||
|
||||
<h2>Create List</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="List Name" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="3" name="description" id="description">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Create List</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
51
views/lists/edit.hbs
Normal file
51
views/lists/edit.hbs
Normal file
|
@ -0,0 +1,51 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{id}}">{{name}}</a></li>
|
||||
<li class="active">Edit List</li>
|
||||
</ol>
|
||||
|
||||
<h2>Edit List <a class="btn btn-default btn-xs" href="/lists/view/{{id}}" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> View list</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="lists-delete" action="/lists/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}">
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="List Name" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">List ID</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" id="cid" value="{{cid}}" readonly>
|
||||
<span class="help-block">This is the list ID displayed to the subscribers</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" rows="3" name="description" id="description">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="lists-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete List</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
82
views/lists/fields/create.hbs
Normal file
82
views/lists/fields/create.hbs
Normal file
|
@ -0,0 +1,82 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/fields/{{list.id}}">Custom Fields</a></li>
|
||||
<li class="active">Create Field</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Create Custom Field</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/fields/{{list.id}}/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Field Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="Field Name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">Field Type</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="type">
|
||||
<option value="text" {{#if selectedText}} selected {{/if}}>Text</option>
|
||||
<option value="number" {{#if selectedNumber}} selected {{/if}}>Number</option>
|
||||
<option value="website" {{#if selectedWebsite}} selected {{/if}}>Website</option>
|
||||
<optgroup label="Date">
|
||||
<option value="date-us" {{#if selectedDateUs}} selected {{/if}}>Date (MM/DD/YYYY)</option>
|
||||
<option value="date-eur" {{#if selectedDateEur}} selected {{/if}}>Date (DD/MM/YYYY)</option>
|
||||
</optgroup>
|
||||
<optgroup label="Birthday">
|
||||
<option value="birthday-us" {{#if selectedBirthdayUs}} selected {{/if}}>Birthday (MM/DD)</option>
|
||||
<option value="birthday-eur" {{#if selectedBirthdayEur}} selected {{/if}}>Birthday (DD/MM)</option>
|
||||
</optgroup>
|
||||
<optgroup label="Grouped">
|
||||
<option value="dropdown" {{#if selectedDropdown}} selected {{/if}}>Drop Downs</option>
|
||||
<option value="radio" {{#if selectedRadio}} selected {{/if}}>Radio Buttons</option>
|
||||
<option value="checkbox" {{#if selectedCheckbox}} selected {{/if}}>Checkboxes</option>
|
||||
</optgroup>
|
||||
<option value="option" {{#if selectedOption}} selected {{/if}}>Option for a group value</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group" class="col-sm-2 control-label">Group</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="group">
|
||||
<option value=""> –– Select ––</option>
|
||||
{{#each groups}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<span class="help-block">Required for group options</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default-value" class="col-sm-2 control-label">Default merge tag value</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-value" id="default-value" value="{{field.defaultValue}}" placeholder="Default merge tag value">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="visible" {{#if visible}} checked {{/if}}> Visible
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Add Field</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
104
views/lists/fields/edit.hbs
Normal file
104
views/lists/fields/edit.hbs
Normal file
|
@ -0,0 +1,104 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/fields/{{list.id}}">Custom Fields</a></li>
|
||||
<li class="active">Edit Field</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Edit Custom Field</small> <a class="btn btn-default btn-xs" href="/fields/{{list.id}}" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Back to fields</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="fields-delete" action="/fields/{{list.id}}/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{field.id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/fields/{{list.id}}/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{field.id}}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Field Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{field.name}}" placeholder="Field Name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="type" class="col-sm-2 control-label">Field Type</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" disabled>
|
||||
<option value="text" {{#if selectedText}} selected {{/if}}>Text</option>
|
||||
<option value="number" {{#if selectedNumber}} selected {{/if}}>Number</option>
|
||||
<option value="website" {{#if selectedWebsite}} selected {{/if}}>Website</option>
|
||||
<optgroup label="Date">
|
||||
<option value="date-us" {{#if selectedDateUs}} selected {{/if}}>Date (MM/DD/YYYY)</option>
|
||||
<option value="date-eur" {{#if selectedDateEur}} selected {{/if}}>Date (DD/MM/YYYY)</option>
|
||||
</optgroup>
|
||||
<optgroup label="Birthday">
|
||||
<option value="birthday-us" {{#if selectedBirthdayUs}} selected {{/if}}>Birthday (MM/DD)</option>
|
||||
<option value="birthday-eur" {{#if selectedBirthdayEur}} selected {{/if}}>Birthday (DD/MM)</option>
|
||||
</optgroup>
|
||||
<optgroup label="Grouped">
|
||||
<option value="dropdown" {{#if selectedDropdown}} selected {{/if}}>Drop Downs</option>
|
||||
<option value="radio" {{#if selectedRadio}} selected {{/if}}>Radio Buttons</option>
|
||||
<option value="checkbox" {{#if selectedCheckbox}} selected {{/if}}>Checkboxes</option>
|
||||
</optgroup>
|
||||
<option value="option" {{#if selectedOption}} selected {{/if}}>Option for a group value</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if groups}}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group" class="col-sm-2 control-label">Group</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="group">
|
||||
<option value=""> –– Select ––</option>
|
||||
{{#each groups}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
<span class="help-block">Required for group options)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="key" class="col-sm-2 control-label">Merge tag</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control text-uppercase" name="key" id="key" value="{{field.key}}" placeholder="Merge Tag">
|
||||
<span class="help-block">Put this tag in your content: <strong>[{{#if field.key}}{{field.key}}{{else}}TAG_VALUE{{/if}}]</strong></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default-value" class="col-sm-2 control-label">Default merge tag value</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-value" id="default-value" value="{{field.defaultValue}}" placeholder="Default merge tag value">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="visible" {{#if field.visible}} checked {{/if}}> Visible
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="fields-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Field</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
95
views/lists/fields/fields.hbs
Normal file
95
views/lists/fields/fields.hbs
Normal file
|
@ -0,0 +1,95 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Custom Fields</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/fields/{{list.id}}/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create Custom Field</a>
|
||||
</div>
|
||||
|
||||
<h2>{{list.name}} <small>Custom Fields</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover" data-row-sort="0,1,1,1,0,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th class="col-md-2">
|
||||
Type
|
||||
</th>
|
||||
<th class="col-md-2">
|
||||
Merge tag
|
||||
</th>
|
||||
<th class="col-md-2">
|
||||
Default merge tag value
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#each rows}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> {{name}}
|
||||
</td>
|
||||
<td>
|
||||
{{type}}
|
||||
</td>
|
||||
<td>
|
||||
<strong>[{{key}}]</strong>
|
||||
</td>
|
||||
<td class="text-muted">
|
||||
{{defaultValue}}
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/fields/{{../list.id}}/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{#if options}}
|
||||
{{#each options}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td colspan="2">
|
||||
<span class="glyphicon glyphicon-record" aria-hidden="true"></span> {{name}}
|
||||
</td>
|
||||
<td>
|
||||
<strong>[{{key}}]</strong>
|
||||
</td>
|
||||
<td class="text-muted">
|
||||
{{defaultValue}}
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/fields/{{../../list.id}}/edit/{{id}}">Edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{#unless rows}}
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
No data available in table
|
||||
</td>
|
||||
</tr>
|
||||
{{/unless}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
64
views/lists/lists.hbs
Normal file
64
views/lists/lists.hbs
Normal file
|
@ -0,0 +1,64 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Lists</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/lists/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create List</a>
|
||||
</div>
|
||||
|
||||
<h2>Lists</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover data-table display nowrap" width="100%" data-row-sort="0,1,1,0,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
Subscribers
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
{{#if rows}}
|
||||
<tbody>
|
||||
|
||||
{{#each rows}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span>
|
||||
<a href="/lists/view/{{id}}">
|
||||
{{name}}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<p class="text-center">{{subscribers}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<p class="text-muted">{{description}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/lists/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
38
views/lists/segments/create.hbs
Normal file
38
views/lists/segments/create.hbs
Normal file
|
@ -0,0 +1,38 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li class="active">Create Segment</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Create Segment</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/segments/{{list.id}}/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Segment Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="Segment Name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group" class="col-sm-2 control-label">Rule match</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="type">
|
||||
<option value=""> –– Select ––</option>
|
||||
<option value="1" {{#if matchAll}} selected {{/if}}>All rules must match</option>
|
||||
<option value="2" {{#if matchAny}} selected {{/if}}>Any rule can match</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Add Segment</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
48
views/lists/segments/edit.hbs
Normal file
48
views/lists/segments/edit.hbs
Normal file
|
@ -0,0 +1,48 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li class="active">Edit Segment</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Edit Segment</small> <a class="btn btn-default btn-xs" href="/segments/{{list.id}}" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Back to segments</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="segments-delete" action="/segments/{{list.id}}/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/segments/{{list.id}}/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Segment Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="name" value="{{name}}" placeholder="Segment Name" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="group" class="col-sm-2 control-label">Rule match</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" name="type">
|
||||
<option value=""> –– Select ––</option>
|
||||
<option value="1" {{#if matchAll}} selected {{/if}}>All rules must match</option>
|
||||
<option value="2" {{#if matchAny}} selected {{/if}}>Any rule can match</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="segments-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Segment</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
201
views/lists/segments/rule-configure.hbs
Normal file
201
views/lists/segments/rule-configure.hbs
Normal file
|
@ -0,0 +1,201 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li><a href="/segments/{{list.id}}/view/{{id}}">{{name}}</a></li>
|
||||
<li class="active">Create Segment</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Create Rule</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/segments/{{list.id}}/rules/{{id}}/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="column" value="{{column.column}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="column" class="col-sm-2 control-label">Rule</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"><strong>{{column.name}}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if columnTypeString}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="value" id="value" value="{{value.value}}" placeholder="Value">
|
||||
<span class="help-block">Use % for wildcard character, eg. "%test" to match all values that end with "test"</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeNumber}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless value.range}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<input type="number" class="form-control" name="value" id="value" value="{{value.value}}" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if value.range}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="number" class="form-control" name="start" value="{{value.start}}" placeholder="0">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="number" class="form-control" name="end" value="{{value.end}}" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeDate}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless value.range}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="value" placeholder="YYYY-MM-DD" value="{{value.value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if value.range}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="start" placeholder="YYYY-MM-DD" value="{{value.start}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="end" placeholder="YYYY-MM-DD" value="{{value.end}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeBirthday}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless isRange}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="value" placeholder="MM-DD" value="{{value.value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if isRange}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="start" placeholder="MM-DD" value="{{value.start}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="end" placeholder="MM-DD" value="{{value.end}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeBoolean}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="value" value="yes" {{#if value.value}} checked {{/if}}> Selected
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="value" value="" {{#unless value.value}} checked {{/unless}}> Not selected
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Add Rule</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
34
views/lists/segments/rule-create.hbs
Normal file
34
views/lists/segments/rule-create.hbs
Normal file
|
@ -0,0 +1,34 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li><a href="/segments/{{list.id}}/view/{{id}}">{{name}}</a></li>
|
||||
<li class="active">Create Segment</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Create Rule</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/segments/{{list.id}}/rules/{{id}}/next">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="column" class="col-sm-2 control-label">Rule</label>
|
||||
<div class="col-sm-10">
|
||||
<select id="column" class="form-control" name="column" required>
|
||||
<option value=""> –– Select ––</option>
|
||||
{{#each columns}}
|
||||
<option value="{{column}}" {{#if selected}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
209
views/lists/segments/rule-edit.hbs
Normal file
209
views/lists/segments/rule-edit.hbs
Normal file
|
@ -0,0 +1,209 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li><a href="/segments/{{list.id}}/view/{{segment.id}}">{{name}}</a></li>
|
||||
<li class="active">Create Segment</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Create Rule</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="rule-delete" action="/segments/{{list.id}}/rules/{{segment.id}}/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/segments/{{list.id}}/rules/{{segment.id}}/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="column" class="col-sm-2 control-label">Rule</label>
|
||||
<div class="col-sm-10">
|
||||
<p class="form-control-static"><strong>{{column.name}}</strong></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#if columnTypeString}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="value" id="value" value="{{value.value}}" placeholder="Value">
|
||||
<span class="help-block">Use % for wildcard character, eg. "%test" to match all values that end with "test"</span>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeNumber}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless value.range}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<input type="number" class="form-control" name="value" id="value" value="{{value.value}}" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if value.range}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="number" class="form-control" name="start" value="{{value.start}}" placeholder="0">
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<input type="number" class="form-control" name="end" value="{{value.end}}" placeholder="0">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeDate}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless value.range}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="value" placeholder="YYYY-MM-DD" value="{{value.value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if value.range}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="start" placeholder="YYYY-MM-DD" value="{{value.start}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-date-generic">
|
||||
<input type="text" class="form-control" name="end" placeholder="YYYY-MM-DD" value="{{value.end}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeBirthday}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="" {{#unless isRange}} checked {{/unless}}> Use exact match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-5">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="value" placeholder="MM-DD" value="{{value.value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<label>
|
||||
<input type="radio" name="range" value="yes" {{#if isRange}} checked {{/if}}> Use range match
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10 radio">
|
||||
<div class="row">
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static">From</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="start" placeholder="MM-DD" value="{{value.start}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<p class="form-control-static text-center">to</p>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="input-group date fm-birthday-generic">
|
||||
<input type="text" class="form-control" name="end" placeholder="MM-DD" value="{{value.end}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if columnTypeBoolean}}
|
||||
<div class="form-group">
|
||||
<label for="value" class="col-sm-2 control-label">Value</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="value" value="yes" {{#if value.value}} checked {{/if}}> Selected
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="value" value="" {{#unless value.value}} checked {{/unless}}> Not selected
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/if}}
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="rule-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Rule</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
57
views/lists/segments/segments.hbs
Normal file
57
views/lists/segments/segments.hbs
Normal file
|
@ -0,0 +1,57 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Segments</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/segments/{{list.id}}/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create Segment</a>
|
||||
</div>
|
||||
|
||||
<h2>{{list.name}} <small>Segments</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover data-table display nowrap" width="100%" data-row-sort="0,1,1,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th class="col-md-2">
|
||||
Match
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
{{#if rows}}
|
||||
<tbody>
|
||||
{{#each rows}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-filter" aria-hidden="true"></span>
|
||||
<a href="/segments/{{../list.id}}/view/{{id}}">{{name}}</a>
|
||||
</td>
|
||||
<td>
|
||||
{{type}}
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/segments/{{../list.id}}/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
68
views/lists/segments/view.hbs
Normal file
68
views/lists/segments/view.hbs
Normal file
|
@ -0,0 +1,68 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li><a href="/segments/{{list.id}}">Segments</a></li>
|
||||
<li class="active">{{name}}</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/segments/{{list.id}}/rules/{{id}}/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create Rule</a>
|
||||
</div>
|
||||
|
||||
<h2>{{list.name}} <small><span class="glyphicon glyphicon-filter" aria-hidden="true"></span> Segment {{name}}</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="well well-sm">
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary btn-sm" href="/segments/{{list.id}}/edit/{{id}}" role="button"><i class="glyphicon glyphicon-wrench"></i> Edit Segment</a>
|
||||
</div>
|
||||
Match rules: <span class="label label-default">{{type}}</span>
|
||||
<br /> Matching subscribers: <span class="label label-default">{{subscribers}}</span> (
|
||||
<a href="/lists/view/{{list.id}}?segment={{id}}">show</a>)
|
||||
<br />
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover data-table display nowrap" width="100%" data-row-sort="0,1,0,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Rule
|
||||
</th>
|
||||
<th class="col-md-2">
|
||||
Value
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
{{#if rules}}
|
||||
<tbody>
|
||||
{{#each rules}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
{{name}}
|
||||
</td>
|
||||
<td>
|
||||
{{formatted}}
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/segments/{{../list.id}}/rules/{{../id}}/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
122
views/lists/subscription/add.hbs
Normal file
122
views/lists/subscription/add.hbs
Normal file
|
@ -0,0 +1,122 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Add subscriber</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Add subscriber</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/subscription/add">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control input-lg" name="email" id="email" placeholder="" value="{{email}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="first-name" class="col-sm-2 control-label">First Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="first-name" id="first-name" placeholder="" value="{{firstName}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="last-name" class="col-sm-2 control-label">Last Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="last-name" id="last-name" placeholder="" value="{{lastName}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each customFields}}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{name}}</label>
|
||||
<div class="col-sm-10">
|
||||
{{#if typeText}}
|
||||
<input type="text" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeNumber}}
|
||||
<input type="number" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeWebsite}}
|
||||
<input type="url" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateUs}}
|
||||
<div class="input-group date fm-date-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateEur}}
|
||||
<div class="input-group date fm-date-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayUs}}
|
||||
<div class="input-group date fm-birthday-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayEur}}
|
||||
<div class="input-group date fm-birthday-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDropdown}}
|
||||
<select name="{{key}}" class="form-control">
|
||||
<option value="">
|
||||
–– Select ––
|
||||
</option>
|
||||
{{#each options}}
|
||||
<option value="{{column}}" {{#if value}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeRadio}}
|
||||
{{#each options}}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="{{../key}}" value="{{column}}" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeCheckbox}}
|
||||
{{#each options}}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{column}}" value="1" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<p class="text-warning">
|
||||
This person will not receive a confirmation email so make sure you have a permission to email them
|
||||
</p>
|
||||
|
||||
<button type="submit" class="btn btn-primary">Subscribe</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
138
views/lists/subscription/edit.hbs
Normal file
138
views/lists/subscription/edit.hbs
Normal file
|
@ -0,0 +1,138 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Edit subscriber</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Edit subscriber</small> <a class="btn btn-default btn-xs" href="/lists/view/{{list.id}}" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Back to list</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="subscriber-unsubscribe" action="/lists/subscription/unsubscribe">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
<input type="hidden" name="cid" value="{{cid}}">
|
||||
</form>
|
||||
|
||||
<form method="post" class="delete-form" id="subscriber-delete" action="/lists/subscription/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
<input type="hidden" name="cid" value="{{cid}}">
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/subscription/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
<input type="hidden" name="cid" value="{{cid}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control input-lg" name="email" id="email" placeholder="" value="{{email}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="first-name" class="col-sm-2 control-label">First Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="first-name" id="first-name" placeholder="" value="{{firstName}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="last-name" class="col-sm-2 control-label">Last Name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="last-name" id="last-name" placeholder="" value="{{lastName}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{#each customFields}}
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">{{name}}</label>
|
||||
<div class="col-sm-10">
|
||||
{{#if typeText}}
|
||||
<input type="text" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeNumber}}
|
||||
<input type="number" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeWebsite}}
|
||||
<input type="url" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateUs}}
|
||||
<div class="input-group date fm-date-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateEur}}
|
||||
<div class="input-group date fm-date-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayUs}}
|
||||
<div class="input-group date fm-birthday-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayEur}}
|
||||
<div class="input-group date fm-birthday-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDropdown}}
|
||||
<select name="{{key}}" class="form-control">
|
||||
<option value="">
|
||||
–– Select ––
|
||||
</option>
|
||||
{{#each options}}
|
||||
<option value="{{column}}" {{#if value}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeRadio}}
|
||||
{{#each options}}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="{{../key}}" value="{{column}}" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeCheckbox}}
|
||||
{{#each options}}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{column}}" value="1" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
</div>
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
{{#if isSubscribed}}
|
||||
<button type="submit" form="subscriber-unsubscribe" class="btn btn-default"><i class="glyphicon glyphicon-ban-circle"></i> Unsubscribe</button>
|
||||
{{/if}}
|
||||
<button type="submit" form="subscriber-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Subscription</button>
|
||||
</div>
|
||||
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
54
views/lists/subscription/import-preview.hbs
Normal file
54
views/lists/subscription/import-preview.hbs
Normal file
|
@ -0,0 +1,54 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Import subscribers</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Import subscribers</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/subscription/import-confirm">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
<input type="hidden" name="import" value="{{id}}">
|
||||
|
||||
{{#each mapping.columns}}
|
||||
|
||||
<div class="form-group">
|
||||
<label for="column-{{@index}}" class="col-sm-2 control-label">{{this}}</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="column-{{@index}}" name="column-{{@index}}">
|
||||
<option value=""> –– Select –– </option>
|
||||
<option value="email">Email address</option>
|
||||
<option value="first_name">First Name</option>
|
||||
<option value="last_name">Last Name</option>
|
||||
{{#each ../customFields}}
|
||||
{{#if column}}
|
||||
<option value="{{column}}">{{name}}</option>
|
||||
{{else}}
|
||||
<optgroup label="{{name}}">
|
||||
{{#each options}}
|
||||
<option value="{{column}}">{{name}}</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/if}}
|
||||
|
||||
{{/each}}
|
||||
</select>
|
||||
|
||||
<span id="helpBlock" class="help-block">Example: "{{lookup ../mapping.example @index}}"</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{/each}}
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary">Start import</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
53
views/lists/subscription/import.hbs
Normal file
53
views/lists/subscription/import.hbs
Normal file
|
@ -0,0 +1,53 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
|
||||
<li class="active">Import subscribers</li>
|
||||
</ol>
|
||||
|
||||
<h2>{{list.name}} <small>Import subscribers</small></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/lists/subscription/import" enctype="multipart/form-data">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list.id}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="listimport" class="col-sm-2 control-label">CSV File</label>
|
||||
<div class="col-sm-6">
|
||||
<input type="file" class="form-control" name="listimport" id="listimport" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="delimiter" class="col-sm-2 control-label">CSV delimiter</label>
|
||||
<div class="col-sm-1">
|
||||
<input type="text" class="form-control" name="delimiter" id="delimiter" placeholder="" value="{{delimiter}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-2 control-label">Categorize the imported subscribers as:</label>
|
||||
<div class="col-sm-6">
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="type" id="type" value="subscribed" checked> Subscribed – <span class="text-muted">Regular subscriber addresses</span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="type" id="type" value="unsubscribed"> Unsubscribed – <span class="text-muted">Suppressed emails that will be unsubscribed from your list</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span> Next</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
188
views/lists/view.hbs
Normal file
188
views/lists/view.hbs
Normal file
|
@ -0,0 +1,188 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/lists/">Lists</a></li>
|
||||
<li class="active">{{name}}</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
|
||||
<a class="btn btn-default" href="/subscription/{{cid}}" target="_blank" role="button"><span class="glyphicon glyphicon-share-alt" aria-hidden="true"></span> Subscription Form</a>
|
||||
|
||||
<div class="btn-group">
|
||||
<button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
List Actions <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/fields/{{id}}" role="button"><span class="glyphicon glyphicon-tasks" aria-hidden="true"></span> Custom Fields</a></li>
|
||||
<li><a href="/segments/{{id}}" role="button"><span class="glyphicon glyphicon-filter" aria-hidden="true"></span> Segments</a></li>
|
||||
<li><a href="/lists/edit/{{id}}" role="button"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> Edit List</a></li>
|
||||
<li role="separator" class="divider"></li>
|
||||
<li><a href="/lists/subscription/{{id}}/add" role="button"><span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span> Add subscriber</a></li>
|
||||
<li><a href="/lists/subscription/{{id}}/import" role="button"><span class="glyphicon glyphicon-cloud-upload" aria-hidden="true"></span> Import subscribers</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2><span class="glyphicon glyphicon-list-alt" aria-hidden="true"></span> {{name}}</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
{{#if description}}
|
||||
<div class="well well-sm">{{{description}}}</div>
|
||||
{{/if}}
|
||||
|
||||
<div class="well well-sm">
|
||||
{{#if useSegment}}
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary btn-sm" href="/segments/{{id}}/edit/{{segment}}" role="button"><span class="glyphicon glyphicon-wrench" aria-hidden="true"></span> Edit Segment</a>
|
||||
</div>
|
||||
{{/if}}
|
||||
<form class="form-inline" method="get">
|
||||
<div class="form-group">
|
||||
<label for="exampleInputName2">Segment</label>
|
||||
<select name="segment" class="form-control">
|
||||
<option value="0">All subscriptions</option>
|
||||
{{#if segments}}
|
||||
<optgroup label="Segments">
|
||||
{{#each segments}}
|
||||
<option value="{{id}}" {{#if selected}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</optgroup>
|
||||
{{/if}}
|
||||
<optgroup label="Actions">
|
||||
<option value="-1">Create new segment…</option>
|
||||
</optgroup>
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-default"><span class="glyphicon glyphicon-filter" aria-hidden="true"></span> Filter</button>
|
||||
</form>
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
|
||||
<!-- Nav tabs -->
|
||||
<ul class="nav nav-tabs" role="tablist">
|
||||
<li role="presentation" class="{{#if showSubscriptions}}active{{/if}}"><a href="#subscriptions" aria-controls="subscriptions" role="tab" data-toggle="tab">Subscriptions</a></li>
|
||||
<li role="presentation" class="{{#if showImports}}active{{/if}}"><a href="#imports" aria-controls="imports" role="tab" data-toggle="tab">Imports</a></li>
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
<div role="tabpanel" class="tab-pane {{#if showSubscriptions}}active{{/if}}" id="subscriptions">
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table data-list-id="{{id}}" {{#if useSegment}} data-list-args="segment={{useSegment}}" {{/if}} class="table table-bordered table-hover data-table-ajax display nowrap" width="100%" data-row-sort="0,1,1,1{{customSort}},1,0">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Address
|
||||
</th>
|
||||
<th>
|
||||
First Name
|
||||
</th>
|
||||
<th>
|
||||
Last Name
|
||||
</th>
|
||||
{{#each customFields}}
|
||||
<th>
|
||||
{{name}}
|
||||
</th>
|
||||
{{/each}}
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div role="tabpanel" class="tab-pane {{#if showImports}}active{{/if}}" id="imports">
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Created
|
||||
</th>
|
||||
<th>
|
||||
Finished
|
||||
</th>
|
||||
<th>
|
||||
Type
|
||||
</th>
|
||||
<th>
|
||||
Processed
|
||||
</th>
|
||||
<th>
|
||||
Status
|
||||
</th>
|
||||
<th>
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
<tbody>
|
||||
{{#if imports}}
|
||||
{{#each imports}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
|
||||
<td>
|
||||
<span class="datestring" data-date="{{created}}" title="{{created}}">{{created}}</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{#if finished}}
|
||||
<span class="datestring" data-date="{{finished}}" title="{{finished}}">{{finished}}</span>
|
||||
{{else}}
|
||||
No
|
||||
{{/if}}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{{importType}}
|
||||
</td>
|
||||
<td>
|
||||
{{processed}}
|
||||
</td>
|
||||
<td class="{{#if error}}text-danger{{/if}}">
|
||||
{{#if error}}
|
||||
<strong><span class="glyphicon glyphicon-exclamation-sign" aria-hidden="true"></span> {{importStatus}}</strong>
|
||||
{{else}}
|
||||
<strong>{{importStatus}}</strong>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td class="text-center">
|
||||
<form method="post" class="confirm-submit" data-confirm-message="Are you sure? This action should only be called to resolve stalled imports" action="/lists/subscription/import-restart">
|
||||
<input type="hidden" name="_csrf" value="{{../csrfToken}}">
|
||||
<input type="hidden" name="list" value="{{list}}">
|
||||
<input type="hidden" name="import" value="{{id}}">
|
||||
<button type="submit" class="btn btn-info btn-xs"><span class="glyphicon glyphicon-repeat" aria-hidden="true"></span> Restart</button>
|
||||
</form>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
No data available in table
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
183
views/settings.hbs
Normal file
183
views/settings.hbs
Normal file
|
@ -0,0 +1,183 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Settings</li>
|
||||
</ol>
|
||||
|
||||
<h2>Settings</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" id="smtp-verify" action="/settings/smtp-verify">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/settings/update">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
General Settings
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="service-url" class="col-sm-2 control-label">Service Address (URL)</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="url" class="form-control" name="service-url" id="service-url" placeholder="http://example.com/" value="{{serviceUrl}}" required>
|
||||
<span class="help-block">Enter the URL this service can be reached from</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="admin-email" class="col-sm-2 control-label">Admin Email</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="admin-email" id="admin-email" placeholder="admin@example.com" value="{{adminEmail}}" required>
|
||||
<span class="help-block">Enter the email address that will be used as "from" for system messages</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
Campaign defaults
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default-sender" class="col-sm-2 control-label">Sender name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-sender" id="default-sender" value="{{defaultSender}}" placeholder="Sender name, eg. "My Awesome Company Ltd."">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default-postaddress" class="col-sm-2 control-label">Default address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-postaddress" id="default-postaddress" value="{{defaultPostaddress}}" placeholder="Contact address to provide, eg. "1234 Main Street, Anywhere, MA 01234, USA"">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="default-from" class="col-sm-2 control-label">Default "from name"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-from" id="default-from" value="{{defaultFrom}}" placeholder="This is the name your emails will come from" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="default-address" class="col-sm-2 control-label">Default "from" email</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="default-address" id="default-address" value="{{defaultAddress}}" placeholder="This is the address people will send replies to" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="default-subject" class="col-sm-2 control-label">Default "subject line"</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="default-subject" id="default-subject" value="{{defaultSubject}}" placeholder="Keep it relevant and non-spammy">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="default-homepage" class="col-sm-2 control-label">Default homepage (URL)</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="url" class="form-control" name="default-homepage" id="default-homepage" value="{{defaultHomepage}}" placeholder="URL to redirect the subscribed users to, eg. http://example.com/">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
SMTP Settings
|
||||
</legend>
|
||||
|
||||
<p class="text-info">These settings are required to send out e-mail messages</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-hostname" class="col-sm-2 control-label">Hostname</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="smtp-hostname" id="smtp-hostname" placeholder="Hostname, eg. smtp.example.com" value="{{smtpHostname}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-port" class="col-sm-2 control-label">Port</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="number" class="form-control" name="smtp-port" id="smtp-port" placeholder="Port, eg. 465. Autodetected if left blank" value="{{smtpPort}}">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-encryption" class="col-sm-2 control-label">Encryption</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control" id="smtp-encryption" name="smtp-encryption">
|
||||
{{#each smtpEncryption}}
|
||||
<option value="{{key}}" {{#if checked}} selected {{/if}}>
|
||||
{{value}}
|
||||
{{#if description}} <span class="text-muted"> — {{description}}</span>{{/if}}
|
||||
</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-user" class="col-sm-2 control-label">Username</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control" name="smtp-user" id="smtp-port" placeholder="Username, eg. myaccount@example.com" value="{{smtpUser}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-pass" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="smtp-pass" id="smtp-pass" placeholder="Password" value="{{smtpPass}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="smtp-verify" class="btn btn-info"><span class="glyphicon glyphicon-refresh" aria-hidden="true"></span> Check SMTP config</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
Advanced SMTP settings
|
||||
</legend>
|
||||
<div class="form-group">
|
||||
<label for="smtp-max-connections" class="col-sm-2 control-label">Max connections</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" name="smtp-max-connections" id="smtp-port" placeholder="The count of max connections, eg. 10" value="{{smtpMaxConnections}}">
|
||||
<span class="help-block">The count of maximum simultaneous connections to make against the SMTP server (defaults to 5)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="smtp-max-messages" class="col-sm-2 control-label">Max messages</label>
|
||||
<div class="col-sm-4">
|
||||
<input type="number" class="form-control" name="smtp-max-messages" id="smtp-port" placeholder="The count of max messages, eg. 100" value="{{smtpMaxMessages}}">
|
||||
<span class="help-block">The count of messages to send through a single connection before the connection is recreated (defaults to 100)</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="smtp-log" {{#if smtpLog}} checked {{/if}}> Log SMTP transactions
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
<hr />
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
9
views/subscription/confirm-notice.hbs
Normal file
9
views/subscription/confirm-notice.hbs
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h2>Almost finished.</h2>
|
||||
|
||||
<p>We need to confirm your email address. To complete the subscription process, please click the link in the email we just sent you.</p>
|
||||
|
||||
<p>
|
||||
<a class="btn btn-primary" href="{{homepage}}" role="button">
|
||||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> return to our website
|
||||
</a>
|
||||
</p>
|
59
views/subscription/layout.hbs
Normal file
59
views/subscription/layout.hbs
Normal file
|
@ -0,0 +1,59 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
|
||||
<meta name="description" content="Self hosted email newsletter app">
|
||||
<meta name="author" content="Andris Reinman">
|
||||
<link rel="icon" href="/favicon.ico">
|
||||
|
||||
<title>Mailtrain</title>
|
||||
|
||||
<!-- Bootstrap core CSS -->
|
||||
<!--
|
||||
<link rel="stylesheet" href="/bootstrap/css/bootstrap.min.css">
|
||||
-->
|
||||
|
||||
<!-- -->
|
||||
<link rel="stylesheet" href="/bootstrap/themes/flatly.min.css">
|
||||
<!-- -->
|
||||
|
||||
<link rel="stylesheet" href="/css/narrow.css">
|
||||
|
||||
<link rel="stylesheet" href="/datepicker/css/bootstrap-datepicker3.css">
|
||||
{{#if useEditor}}
|
||||
<link rel="stylesheet" href="/summernote/summernote.css">
|
||||
{{/if}}
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<div class="header clearfix">
|
||||
<h1 class="text-muted">{{title}}</h1>
|
||||
</div>
|
||||
|
||||
{{flash_messages}} {{{body}}}
|
||||
|
||||
</div>
|
||||
|
||||
<script src="/javascript/jquery-2.2.1.min.js"></script>
|
||||
<script src="/bootstrap/js/bootstrap.min.js"></script>
|
||||
|
||||
<script src="/datepicker/js/bootstrap-datepicker.min.js"></script>
|
||||
<script src="/datatables/datatables.min.js"></script>
|
||||
<script src="/moment/moment.min.js"></script>
|
||||
<script src="/javascript/tables.js"></script>
|
||||
|
||||
{{#if useEditor}}
|
||||
<script src="/summernote/summernote.min.js"></script>
|
||||
<script src="/javascript/editor.js"></script>
|
||||
{{/if}}
|
||||
</body>
|
||||
|
||||
</html>
|
100
views/subscription/manage.hbs
Normal file
100
views/subscription/manage.hbs
Normal file
|
@ -0,0 +1,100 @@
|
|||
<h2>Update your preferences</h2>
|
||||
|
||||
<form method="post" action="/subscription/{{lcid}}/manage">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="cid" value="{{cid}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="" value="{{email}}" readonly>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="first-name">First Name</label>
|
||||
<input type="text" class="form-control" name="first-name" id="first-name" placeholder="" value="{{firstName}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="last-name">Last Name</label>
|
||||
<input type="text" class="form-control" name="last-name" id="last-name" placeholder="" value="{{lastName}}">
|
||||
</div>
|
||||
|
||||
{{#each customFields}}
|
||||
<div class="form-group">
|
||||
<label>{{name}}</label>
|
||||
|
||||
{{#if typeText}}
|
||||
<input type="text" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeNumber}}
|
||||
<input type="number" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeWebsite}}
|
||||
<input type="url" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateUs}}
|
||||
<div class="input-group date fm-date-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateEur}}
|
||||
<div class="input-group date fm-date-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayUs}}
|
||||
<div class="input-group date fm-birthday-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayEur}}
|
||||
<div class="input-group date fm-birthday-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDropdown}}
|
||||
<select name="{{key}}" class="form-control">
|
||||
<option value="">
|
||||
–– Select ––
|
||||
</option>
|
||||
{{#each options}}
|
||||
<option value="{{column}}" {{#if value}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeRadio}}
|
||||
{{#each options}}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="{{../key}}" value="{{column}}" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeCheckbox}}
|
||||
{{#each options}}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{column}}" value="1" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update Profile</button> or <a href="/subscription/{{lcid}}/unsubscribe/{{cid}}">Unsubscribe</a>
|
||||
</div>
|
||||
</form>
|
97
views/subscription/subscribe.hbs
Normal file
97
views/subscription/subscribe.hbs
Normal file
|
@ -0,0 +1,97 @@
|
|||
<form method="post" action="/subscription/{{cid}}/subscribe">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="" value="{{email}}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="first-name">First Name</label>
|
||||
<input type="text" class="form-control" name="first-name" id="first-name" placeholder="" value="{{firstName}}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="last-name">Last Name</label>
|
||||
<input type="text" class="form-control" name="last-name" id="last-name" placeholder="" value="{{lastName}}">
|
||||
</div>
|
||||
|
||||
{{#each customFields}}
|
||||
<div class="form-group">
|
||||
<label>{{name}}</label>
|
||||
|
||||
{{#if typeText}}
|
||||
<input type="text" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeNumber}}
|
||||
<input type="number" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeWebsite}}
|
||||
<input type="url" class="form-control" name="{{column}}" value="{{value}}">
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateUs}}
|
||||
<div class="input-group date fm-date-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDateEur}}
|
||||
<div class="input-group date fm-date-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM/YYYY" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayUs}}
|
||||
<div class="input-group date fm-birthday-us">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="MM/DD" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeBirthdayEur}}
|
||||
<div class="input-group date fm-birthday-eur">
|
||||
<input type="text" class="form-control" name="{{column}}" placeholder="DD/MM" value="{{value}}"><span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeDropdown}}
|
||||
<select name="{{key}}" class="form-control">
|
||||
<option value="">
|
||||
–– Select ––
|
||||
</option>
|
||||
{{#each options}}
|
||||
<option value="{{column}}" {{#if value}} selected {{/if}}>{{name}}</option>
|
||||
{{/each}}
|
||||
</select>
|
||||
{{/if}}
|
||||
|
||||
{{#if typeRadio}}
|
||||
{{#each options}}
|
||||
<div class="radio">
|
||||
<label>
|
||||
<input type="radio" name="{{../key}}" value="{{column}}" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
{{#if typeCheckbox}}
|
||||
{{#each options}}
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="{{column}}" value="1" {{#if value}} checked {{/if}}> {{name}}
|
||||
</label>
|
||||
</div>
|
||||
{{/each}}
|
||||
{{/if}}
|
||||
|
||||
</div>
|
||||
{{/each}}
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" class="btn btn-primary">Subscribe to list</button>
|
||||
</div>
|
||||
</form>
|
11
views/subscription/subscribed.hbs
Normal file
11
views/subscription/subscribed.hbs
Normal file
|
@ -0,0 +1,11 @@
|
|||
<h2>Subscription Confirmed</h2>
|
||||
|
||||
<p>Your subscription to our list has been confirmed.</p>
|
||||
|
||||
<p>Thank you for subscribing!</p>
|
||||
|
||||
<p>
|
||||
<a class="btn btn-primary" href="{{homepage}}" role="button">
|
||||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> return to our website
|
||||
</a>
|
||||
</p>
|
9
views/subscription/unsubscribe-notice.hbs
Normal file
9
views/subscription/unsubscribe-notice.hbs
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h2>Unsubscribe Successful</h2>
|
||||
|
||||
<p>You have been removed from {{title}}.</p>
|
||||
|
||||
<p>
|
||||
<a class="btn btn-primary" href="{{homepage}}" role="button">
|
||||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> return to our website
|
||||
</a>
|
||||
</p>
|
26
views/subscription/unsubscribe.hbs
Normal file
26
views/subscription/unsubscribe.hbs
Normal file
|
@ -0,0 +1,26 @@
|
|||
<h2>Unsubscribe</h2>
|
||||
|
||||
<p>
|
||||
Enter your email address to unsubscribe from {{title}}
|
||||
</p>
|
||||
|
||||
<form method="post" id="unsubscribe-form" action="/subscription/{{lcid}}/unsubscribe">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="campaign" value="{{campaign}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email">Email address</label>
|
||||
<input type="email" class="form-control" name="email" id="email" placeholder="" value="{{email}}" autofocus required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<button type="submit" id="unsubscribe-button" class="btn btn-primary">Unsubscribe</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{{#if email}}
|
||||
{{#if autosubmit}}
|
||||
<script src="/javascript/autosubmit.js"></script>
|
||||
{{/if}}
|
||||
{{/if}}
|
9
views/subscription/updated-notice.hbs
Normal file
9
views/subscription/updated-notice.hbs
Normal file
|
@ -0,0 +1,9 @@
|
|||
<h3>Profile Updated</h3>
|
||||
|
||||
<p>Your profile information has been updated.</p>
|
||||
|
||||
<p>
|
||||
<a class="btn btn-primary" href="{{homepage}}" role="button">
|
||||
<span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> return to our website
|
||||
</a>
|
||||
</p>
|
86
views/templates/create.hbs
Normal file
86
views/templates/create.hbs
Normal file
|
@ -0,0 +1,86 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/templates/">Templates</a></li>
|
||||
<li class="active">Create Template</li>
|
||||
</ol>
|
||||
|
||||
<h2>Create Template</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/templates/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-name" class="col-sm-2 control-label">Template name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="template-name" value="{{name}}" placeholder="Name for this template, eg. Newsletter">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<a class="btn btn-default" role="button" data-toggle="collapse" href="#mergeReference" aria-expanded="false" aria-controls="mergeReference">Merge tag reference</a>
|
||||
<div class="collapse" id="mergeReference">
|
||||
<p>
|
||||
Merge tags are tags that are replaced before sending out the message. The format of the merge tag is the following: <code>[TAG_NAME]</code> or <code>[TAG_NAME/fallback]</code> where <code>fallback</code> is an optional text value used
|
||||
when <code>TAG_NAME</code> is empty.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<code>[FIRST_NAME]</code> – first name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LAST_NAME]</code> – last name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[FULL_NAME]</code> – first and last names of the subcriber joined
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_UNSUBSCRIBE]</code> – URL that points to the preferences page of the subscriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_PREFERENCES]</code> – URL that points to the unsubscribe page
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_BROWSER]</code> – URL to preview the message in a browser
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
In addition to that any custom field can have its own merge tag.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" if="template-description" name="description" rows="3" placeholder="Optional comments about this template">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-plus"></i> Create Template</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
95
views/templates/edit.hbs
Normal file
95
views/templates/edit.hbs
Normal file
|
@ -0,0 +1,95 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/templates/">Templates</a></li>
|
||||
<li class="active">Edit Template</li>
|
||||
</ol>
|
||||
|
||||
<h2>Edit Template <a class="btn btn-default btn-xs" href="/templates/" role="button"><span class="glyphicon glyphicon-arrow-left" aria-hidden="true"></span> Back to templates</a></h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form method="post" class="delete-form" id="templates-delete" action="/templates/delete">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
</form>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/templates/edit">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="id" value="{{id}}" />
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-name" class="col-sm-2 control-label">Template name</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control input-lg" name="name" id="template-name" value="{{name}}" placeholder="Name for this template, eg. Newsletter">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<a class="btn btn-default" role="button" data-toggle="collapse" href="#mergeReference" aria-expanded="false" aria-controls="mergeReference">Merge tag reference</a>
|
||||
<div class="collapse" id="mergeReference">
|
||||
<p>
|
||||
Merge tags are tags that are replaced before sending out the message. The format of the merge tag is the following: <code>[TAG_NAME]</code> or <code>[TAG_NAME/fallback]</code> where <code>fallback</code> is an optional text value used
|
||||
when <code>TAG_NAME</code> is empty.
|
||||
</p>
|
||||
|
||||
<ul>
|
||||
<li>
|
||||
<code>[FIRST_NAME]</code> – first name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LAST_NAME]</code> – last name of the subcriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[FULL_NAME]</code> – first and last names of the subcriber joined
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_UNSUBSCRIBE]</code> – URL that points to the preferences page of the subscriber
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_PREFERENCES]</code> – URL that points to the unsubscribe page
|
||||
</li>
|
||||
<li>
|
||||
<code>[LINK_BROWSER]</code> – URL to preview the message in a browser
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
In addition to that any custom field can have its own merge tag.
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-html" class="col-sm-2 control-label">Template content (HTML)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control summernote" if="template-html" name="html" rows="8">{{html}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-text" class="col-sm-2 control-label">Template content (plaintext)</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" if="template-text" name="text" rows="10">{{text}}</textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template-description" class="col-sm-2 control-label">Description</label>
|
||||
<div class="col-sm-10">
|
||||
<textarea class="form-control" id="template-description" name="description" rows="3" placeholder="Optional comments about this template">{{description}}</textarea>
|
||||
<span class="help-block">HTML is allowed</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<div class="pull-right">
|
||||
<button type="submit" form="templates-delete" class="btn btn-danger"><i class="glyphicon glyphicon-remove"></i> Delete Template</button>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
54
views/templates/templates.hbs
Normal file
54
views/templates/templates.hbs
Normal file
|
@ -0,0 +1,54 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Templates</li>
|
||||
</ol>
|
||||
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-primary" href="/templates/create" role="button"><i class="glyphicon glyphicon-plus"></i> Create Template</a>
|
||||
</div>
|
||||
|
||||
<h2>Templates</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover data-table display nowrap" width="100%" data-row-sort="0,1,0,0">
|
||||
<thead>
|
||||
<th class="col-md-1">
|
||||
#
|
||||
</th>
|
||||
<th>
|
||||
Name
|
||||
</th>
|
||||
<th>
|
||||
Description
|
||||
</th>
|
||||
<th class="col-md-1">
|
||||
|
||||
</th>
|
||||
</thead>
|
||||
{{#if rows}}
|
||||
<tbody>
|
||||
{{#each rows}}
|
||||
<tr>
|
||||
<th scope="row">
|
||||
{{index}}
|
||||
</th>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-file" aria-hidden="true"></span> {{name}}
|
||||
</td>
|
||||
<td>
|
||||
<p class="text-muted">{{description}}</p>
|
||||
</td>
|
||||
<td>
|
||||
<span class="glyphicon glyphicon-wrench" aria-hidden="true"></span>
|
||||
<a href="/templates/edit/{{id}}">
|
||||
Edit
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
{{/each}}
|
||||
</tbody>
|
||||
{{/if}}
|
||||
</table>
|
||||
</div>
|
64
views/users/account.hbs
Normal file
64
views/users/account.hbs
Normal file
|
@ -0,0 +1,64 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Account</li>
|
||||
</ol>
|
||||
|
||||
<h2>Account</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/users/account">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<fieldset>
|
||||
<legend>
|
||||
General settings
|
||||
</legend>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-2 control-label">Email Address</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="email" class="form-control" name="email" id="email" value="{{email}}" placeholder="Your e-mail address" required>
|
||||
<span class="help-block">This address is used for account recovery in case you loose your password</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
Password change
|
||||
</legend>
|
||||
|
||||
<p>
|
||||
You only need to fill this part if you want to change your current password
|
||||
</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="currentPassword" class="col-sm-2 control-label">Current Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="currentPassword" id="currentPassword" placeholder="Current Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">New Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="New Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2" class="col-sm-2 control-label">Confirm Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password2" id="password2" placeholder="Confirm New Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary"><i class="glyphicon glyphicon-ok"></i> Update</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
29
views/users/forgot.hbs
Normal file
29
views/users/forgot.hbs
Normal file
|
@ -0,0 +1,29 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/users/login">Sign in</a></li>
|
||||
<li class="active">Password Reset</li>
|
||||
</ol>
|
||||
|
||||
<h2>Reset your password?</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<p>Please provide the username or email address that you used when you signed up for your Mailtrain account.</p>
|
||||
<p>We will send you an email that will allow you to reset your password.</p>
|
||||
|
||||
<form class="form-horizontal" role="login" method="post" action="/users/forgot">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="usernameMain" class="col-sm-2 control-label">Username</label>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" name="username" id="usernameMain" placeholder="Username or email address" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<button type="submit" class="btn btn-primary">Send verification email</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
38
views/users/login.hbs
Normal file
38
views/users/login.hbs
Normal file
|
@ -0,0 +1,38 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li class="active">Sign in</li>
|
||||
</ol>
|
||||
|
||||
<h2>Sign in</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" role="login" method="post" action="/users/login">
|
||||
<input type="hidden" name="next" value="{{next}}" />
|
||||
<div class="form-group">
|
||||
<label for="usernameMain" class="col-sm-2 control-label">Username</label>
|
||||
<div class="col-xs-4">
|
||||
<input type="text" class="form-control" name="username" id="usernameMain" placeholder="Username" autofocus required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="passwordMain" class="col-sm-2 control-label">Password</label>
|
||||
<div class="col-xs-4">
|
||||
<input type="password" class="form-control" name="password" id="passwordMain" placeholder="Password" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<div class="checkbox">
|
||||
<label>
|
||||
<input type="checkbox" name="remember"> Remember me
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-xs-4">
|
||||
<button type="submit" class="btn btn-primary">Sign in</button> or <a href="/users/forgot">Forgot password?</a>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
40
views/users/reset.hbs
Normal file
40
views/users/reset.hbs
Normal file
|
@ -0,0 +1,40 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/users/login">Sign in</a></li>
|
||||
<li class="active">Password Reset</li>
|
||||
</ol>
|
||||
|
||||
<h2>Choose your new password</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/users/reset">
|
||||
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="username" value="{{username}}">
|
||||
<input type="hidden" name="reset-token" value="{{resetToken}}">
|
||||
|
||||
<p>
|
||||
Please enter a new password.
|
||||
</p>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-2 control-label">New Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password" id="password" placeholder="New Password">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password2" class="col-sm-2 control-label">Confirm Password</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="password" class="form-control" name="password2" id="password2" placeholder="Confirm New Password">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-primary">Reset</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</form>
|
Loading…
Add table
Add a link
Reference in a new issue