Started adding support for RSS campaigns
This commit is contained in:
parent
b0d36be790
commit
09103ac58b
8 changed files with 308 additions and 6 deletions
|
@ -4,7 +4,15 @@
|
|||
</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 class="btn-group">
|
||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
|
||||
Create Campaign <span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu">
|
||||
<li><a href="/campaigns/create"><i class="glyphicon glyphicon-plus"></i> Normal Campaign</a></li>
|
||||
<li><a href="/campaigns/create?type=rss"><i class="glyphicon glyphicon-signal"></i> RSS Campaign</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h2>Campaigns</h2>
|
||||
|
|
96
views/campaigns/create-rss.hbs
Normal file
96
views/campaigns/create-rss.hbs
Normal file
|
@ -0,0 +1,96 @@
|
|||
<ol class="breadcrumb">
|
||||
<li><a href="/">Home</a></li>
|
||||
<li><a href="/campaigns">Campaigns</a></li>
|
||||
<li class="active">Create RSS Campaign</li>
|
||||
</ol>
|
||||
|
||||
<h2>Create RSS Campaign</h2>
|
||||
|
||||
<hr>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
RSS campaign sets up a tracker against selected RSS feed address. Whenever a new entry is found from this feed it is sent to selected list as an email message.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form class="form-horizontal" method="post" action="/campaigns/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="type" value="rss">
|
||||
|
||||
<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">RSS Feed Url</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="url" class="form-control" name="source-url" id="source-url" value="{{sourceUrl}}" placeholder="http://example.com/rss.php">
|
||||
<span class="help-block">New entries from this RSS URL are sent out to list subscribers as email messages</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 RSS Campaign</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -10,6 +10,7 @@
|
|||
|
||||
<form class="form-horizontal" method="post" action="/campaigns/create">
|
||||
<input type="hidden" name="_csrf" value="{{csrfToken}}">
|
||||
<input type="hidden" name="type" value="normal">
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name" class="col-sm-2 control-label">Name</label>
|
||||
|
|
111
views/campaigns/edit-rss.hbs
Normal file
111
views/campaigns/edit-rss.hbs
Normal file
|
@ -0,0 +1,111 @@
|
|||
<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 RSS Campaign</li>
|
||||
</ol>
|
||||
|
||||
<h2>Edit RSS 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>
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-body">
|
||||
RSS campaign sets up a tracker against selected RSS feed address. Whenever a new entry is found from this feed it is sent to selected list as an email message.
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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}}" />
|
||||
|
||||
<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>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="template" class="col-sm-2 control-label">RSS Feed Url</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="url" class="form-control" name="source-url" id="source-url" value="{{sourceUrl}}" placeholder="http://example.com/rss.php">
|
||||
<span class="help-block">New entries from this RSS URL are sent out to list subscribers as email messages</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>
|
||||
</fieldset>
|
||||
|
||||
<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>
|
Loading…
Add table
Add a link
Reference in a new issue