Show proposals to everyone, with warning for non-members

This commit is contained in:
2017-02-08 13:22:19 +08:00
parent 7a072f2586
commit 1de2e002bb
2 changed files with 31 additions and 26 deletions
@@ -8,7 +8,11 @@ export default Ember.Component.extend({
actions: { actions: {
confirm(proposalId) { confirm(proposalId) {
if (this.get('contractInteractionEnabled')) {
this.sendAction('confirmAction', proposalId); this.sendAction('confirmAction', proposalId);
} else {
window.alert('Only members can vote on proposals. Please ask someone to set you up.');
}
} }
} }
+5 -4
View File
@@ -13,14 +13,15 @@
</div> </div>
</section> </section>
{{#if contractInteractionEnabled}}
{{#if proposalsOpen}} {{#if proposalsOpen}}
<section id="proposals-open"> <section id="proposals-open">
<header> <header>
<h2>Open Proposals</h2> <h2>Open Proposals</h2>
</header> </header>
<div class="content"> <div class="content">
{{proposal-list proposals=proposalsOpenSorted confirmAction="confirmProposal"}} {{proposal-list proposals=proposalsOpenSorted
confirmAction="confirmProposal"
contractInteractionEnabled=contractInteractionEnabled}}
</div> </div>
</section> </section>
{{/if}} {{/if}}
@@ -30,7 +31,8 @@
<h2>Closed Proposals</h2> <h2>Closed Proposals</h2>
</header> </header>
<div class="content"> <div class="content">
{{proposal-list proposals=proposalsClosedSorted confirmAction="confirmProposal"}} {{proposal-list proposals=proposalsClosedSorted
confirmAction="confirmProposal"}}
</div> </div>
</section> </section>
@@ -43,4 +45,3 @@
{{add-contributor kredits=kredits}} {{add-contributor kredits=kredits}}
</div> </div>
</section> </section>
{{/if}}