150 lines
No EOL
4.5 KiB
Handlebars
150 lines
No EOL
4.5 KiB
Handlebars
<div id="poll">
|
|
<div class="row">
|
|
<div class="col-sm-6 col-lg-5">
|
|
<div class="box meta-data">
|
|
<h2 class="title">{{title}}</h2>
|
|
<p class="description">{{description}}</p>
|
|
<p class="creationDate">{{t "poll.created-time" creationDateBinding="creationDate"}}</p>
|
|
</div>
|
|
</div>
|
|
<div class="col-sm-6 col-lg-5 col-lg-offset-2">
|
|
<div class="box share-link">
|
|
<p>{{t "poll.share"}}</p>
|
|
<p class="link"><a {{bind-attr href=pollUrl}}>{{pollUrl}}</a></p>
|
|
<p class="notice">
|
|
{{t "poll.share.notice"}}
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="box">
|
|
<div class="table-scroll">
|
|
<table class="user-selections-table table table-striped table-condensed">
|
|
<thead>
|
|
{{#if isDateTime}}
|
|
<tr>
|
|
<th> </th>
|
|
{{#each dateGroup in dateGroups}}
|
|
<th {{bind-attr colspan="dateGroup.colspan"}}>
|
|
{{formattedDate dateGroup.value}}
|
|
</th>
|
|
{{/each}}
|
|
<th> </th>
|
|
</tr>
|
|
{{/if}}
|
|
<tr>
|
|
<th> </th>
|
|
{{#each option in options}}
|
|
<th>
|
|
{{#if isFindADate}}
|
|
{{#if isDateTime}}
|
|
{{formattedDate option.title format="LT"}}
|
|
{{/if}}
|
|
{{#unless isDateTime}}
|
|
{{formattedDate option.title}}
|
|
{{/unless}}
|
|
{{/if}}
|
|
|
|
{{#if isMakeAPoll}}
|
|
{{option.title}}
|
|
{{/if}}
|
|
</th>
|
|
{{/each}}
|
|
<th> </th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<tr class='newUser'>
|
|
<td>
|
|
{{#form-for controller}}
|
|
{{#input newUserName}}
|
|
{{input-field newUserName
|
|
placeholderTranslation="poll.input.newUserName.placeholder"
|
|
}}
|
|
{{#if view.showError}}
|
|
{{error-field newUserName}}
|
|
{{/if}}
|
|
{{/input}}
|
|
{{/form-for}}
|
|
</td>
|
|
{{#each newUserSelection in controller.newUserSelections}}
|
|
<td>
|
|
{{#form-for newUserSelection}}
|
|
{{#if isFreeText}}
|
|
{{input value label=" "}}
|
|
{{else}}
|
|
{{#each answer in answers}}
|
|
<div class="radio">
|
|
<label>
|
|
{{radio-button checked=newUserSelection.value value=answer}}
|
|
<span {{bind-attr class="answer.id"}}>
|
|
<span {{bind-attr class="answer.icon"}}></span>
|
|
{{answer.label}}
|
|
</span>
|
|
</label>
|
|
</div>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{/form-for}}
|
|
</td>
|
|
{{/each}}
|
|
<td>
|
|
<button {{action "addNewUser"}} class="btn btn-default btn-primary" {{bind-attr disabled=isNotValid}}>
|
|
{{t "poll.save"}}
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
|
|
{{#each user in users}}
|
|
<tr>
|
|
<td>{{user.name}}</td>
|
|
{{#each selection in user.selections}}
|
|
<td>
|
|
{{#if isFreeText}}
|
|
{{selection.value}}
|
|
{{else}}
|
|
<span {{bind-attr class="selection.value.id"}}>
|
|
<span {{bind-attr class="selection.value.icon"}}></span>
|
|
{{selection.value.label}}
|
|
</span>
|
|
{{/if}}
|
|
</td>
|
|
{{/each}}
|
|
<td> </td>
|
|
</tr>
|
|
{{/each}}
|
|
|
|
{{#unless isFreeText}}
|
|
<tr class='evaluation evaluation-header'>
|
|
<td {{bind-attr colspan=fullRowColspan}}>
|
|
{{t "poll.evaluation.label"}}
|
|
<button {{action "switchEvaluationVisibility" target="view"}} class="btn btn-default">
|
|
{{view.showEvaluationLabel}}
|
|
</button>
|
|
</td>
|
|
</tr>
|
|
|
|
{{#if view.showEvaluation}}
|
|
{{#each answer in evaluation}}
|
|
<tr class='evaluation'>
|
|
<td>
|
|
{{answer.label}}
|
|
</td>
|
|
|
|
{{#each option in answer.options}}
|
|
<td>
|
|
{{option}}
|
|
</td>
|
|
{{/each}}
|
|
|
|
<td> </td>
|
|
</tr>
|
|
{{/each}}
|
|
{{/if}}
|
|
{{/unless}}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div> |