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