mailtrain/views/lists/fields/fields.hbs
2017-03-07 16:30:56 +02:00

95 lines
3.5 KiB
Handlebars

<ol class="breadcrumb">
<li><a href="/">{{#translate}}Home{{/translate}}</a></li>
<li><a href="/lists/">{{#translate}}Lists{{/translate}}</a></li>
<li><a href="/lists/view/{{list.id}}">{{list.name}}</a></li>
<li class="active">{{#translate}}Custom Fields{{/translate}}</li>
</ol>
<div class="pull-right">
<a class="btn btn-primary" href="/fields/{{list.id}}/create" role="button"><i class="glyphicon glyphicon-plus"></i> {{#translate}}Create Custom Field{{/translate}}</a>
</div>
<h2>{{list.name}} <small>{{#translate}}Custom Fields{{/translate}}</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>
{{#translate}}Name{{/translate}}
</th>
<th class="col-md-2">
{{#translate}}Type{{/translate}}
</th>
<th class="col-md-2">
{{#translate}}Merge tag{{/translate}}
</th>
<th class="col-md-2">
{{#translate}}Default merge tag value{{/translate}}
</th>
<th class="col-md-1">
&nbsp;
</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}}">
{{#translate}}Edit{{/translate}}
</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}}">{{#translate}}Edit{{/translate}}</a>
</td>
</tr>
{{/each}}
{{/if}}
{{/each}}
{{#unless rows}}
<tr>
<td colspan="6">
{{#translate}}No data available in table{{/translate}}
</td>
</tr>
{{/unless}}
</tbody>
</table>
</div>