{t('User')} {#if user.name}
{t('logged in as: {user}',{user:user.name})}
{:else} {/if}
{#if poll}
{t('poll')}: {poll.name}
{@html poll.description.rendered}
{#each Object.entries(poll.weights).sort((a,b) => a[0] - b[0]) as [weight,name]} {/each} {#each Object.entries(poll.options) as [option_id,option]} {#each Object.entries(poll.weights) as [weight,name]} {/each} {/each}
{t('option')} {weight} {name}
{option.name} {@html option.description.rendered} select(option,weight)} title={t('click to select')} > {#if selection[option_id] == weight} X {/if}
TODO: add notes
TODO: load previous selection for logged-in user
{/if}