Implement batch voting

This commit is contained in:
2018-04-24 15:29:10 +02:00
committed by Sebastian Kippe
parent 1945074db6
commit cb4d20cf81
6 changed files with 60 additions and 34 deletions
+16 -10
View File
@@ -1,12 +1,18 @@
{{#each proposals as |proposal|}}
<li data-proposal-id={{proposal.id}} title="({{proposal.kind}}) {{proposal.description}}">
<span class="category {{proposal.kind}}">♥</span>
<span class="amount">{{proposal.amount}}</span><span class="symbol">₭S</span>
for <span class="recipient">{{proposal.contributor.name}}</span>
<span class="votes">({{proposal.votesCount}}/{{proposal.votesNeeded}} votes)</span>
{{#unless proposal.isExecuted}}
<button {{action "confirm" proposal.id}}>+1</button>
{{/unless}}
</li>
{{proposal-list/item
proposal=proposal
selectedProposals=selectedProposals
toggleSelect=(action 'toggleSelect')
}}
{{/each}}
{{#if confirmProposals}}
<center>
<button
disabled={{submitButtonDisabled}}
{{action confirmProposals selectedProposals}}
>
Submit selected
</button>
</center>
{{/if}}