decide.nolog.cz/app/templates/poll/evaluation.hbs

69 lines
2.1 KiB
Handlebars

<div class="table-scroll">
<table class="user-selections-table table table-striped table-condensed">
<thead>
{{#if model.isDateTime}}
<tr class="dateGroups">
<th>&nbsp;</th>
{{#each dateGroups as |dateGroup|}}
<th colspan="{{dateGroup.colspan}}">
{{formattedDate dateGroup.value}}
</th>
{{/each}}
<th>&nbsp;</th>
</tr>
{{/if}}
<tr>
<th>&nbsp;</th>
{{#if model.isFindADate}}
{{#each dates as |date|}}
<th>
{{#if model.isDateTime}}
{{formattedDate date.title format="LT" times=true}}
{{else}}
{{formattedDate date.title}}
{{/if}}
</th>
{{/each}}
{{else}}
{{#each model.options as |option|}}
<th>
{{option.title}}
</th>
{{/each}}
{{/if}}
<th>&nbsp;</th>
</tr>
</thead>
<tbody>
{{#each sortedUsers as |user|}}
<tr class="user">
<td>{{user.name}}</td>
{{#each user.selections as |selection|}}
<td>
{{#if selection.label}}
{{#if model.isFreeText}}
{{selection.label}}
{{/if}}
{{/if}}
{{#if selection.labelTranslation}}
{{#unless model.isFreeText}}
<span class="{{selection.type}}">
<span class="{{selection.icon}}"></span>
{{t selection.labelTranslation}}
</span>
{{/unless}}
{{/if}}
</td>
{{/each}}
<td>&nbsp;</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{#if isEvaluable}}
{{poll-evaluation-summary poll=model dates=dates sortedUsers=sortedUsers}}
{{/if}}