decide.nolog.cz/app/templates/components/poll-evaluation-participants-table.hbs
2018-12-31 10:17:03 +01:00

75 lines
2.1 KiB
Handlebars

<div class="table-scroll">
<table class="user-selections-table table table-striped table-condensed">
<thead>
{{#if hasTimes}}
<tr class="dateGroups">
<th>&nbsp;</th>
{{#each optionsGroupedByDates as |optionGroup|}}
<th colspan={{optionGroup.items.length}}>
{{moment-format
optionGroup.value
momentLongDayFormat
locale=currentLocale
timeZone=timezone
}}
</th>
{{/each}}
<th>&nbsp;</th>
</tr>
{{/if}}
<tr>
<th>&nbsp;</th>
{{#each options as |option|}}
<th>
{{#if isFindADate}}
{{#if hasTimes}}
{{#if option.hasTime}}
{{moment-format
option.title
"LT"
locale=currentLocale
timeZone=timezone
}}
{{/if}}
{{else}}
{{moment-format
option.title
momentLongDayFormat
locale=currentLocale
timeZone=timezone
}}
{{/if}}
{{else}}
{{option.title}}
{{/if}}
</th>
{{/each}}
</tr>
</thead>
<tbody>
{{#each sortedUsers as |user|}}
<tr class="user">
<td>{{user.name}}</td>
{{#each user.selections as |selection|}}
<td>
{{#if selection.label}}
{{#if isFreeText}}
{{selection.label}}
{{/if}}
{{/if}}
{{#if selection.labelTranslation}}
{{#unless isFreeText}}
<span class={{selection.type}}>
<span class={{selection.icon}}></span>
{{t selection.labelTranslation}}
</span>
{{/unless}}
{{/if}}
</td>
{{/each}}
</tr>
{{/each}}
</tbody>
</table>
</div>