decide.nolog.cz/app/templates/components/poll-evaluation-participants-table.hbs

76 lines
2.1 KiB
Handlebars
Raw Normal View History

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