alpaca
Version:
Alpaca provides the easiest and fastest way to generate interactive forms for the web and mobile devices. It runs simply as HTML5 or more elaborately using Bootstrap, jQuery Mobile or jQuery UI. Alpaca uses Handlebars to process JSON schema and provide
43 lines (30 loc) • 1.08 kB
HTML
<script type="text/x-handlebars-template">
<div>
{{#arrayToolbar}}{{/arrayToolbar}}
<table>
<!-- table headers -->
<thead>
<tr>
{{#if options.dragRows}}
<!-- hidden column storing sort order -->
<th class="alpaca-table-reorder-index-header"></th>
<!-- draggable -->
<th class="alpaca-table-reorder-draggable-header"></th>
{{/if}}
{{#each headers}}
<th data-header-id="{{id}}" {{#if hidden}}class="alpaca-table-column-hidden"{{/if}}>{{{title}}}</th>
{{/each}}
{{#if options.showActionsColumn}}
<th>Actions</th>
{{/if}}
</tr>
</thead>
<!-- table body -->
<tbody>
{{#each items}}
{{#item "tr"}}{{/item}}
{{/each}}
</tbody>
</table>
</div>
</script>