Initial import

This commit is contained in:
Andris Reinman 2016-04-04 15:36:30 +03:00
commit 54fa30701e
278 changed files with 37868 additions and 0 deletions

View 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
View 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>

View 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">
&nbsp;
</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>