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
+5 -1
View File
@@ -8,7 +8,11 @@ export default Ember.Component.extend({
actions: { actions: {
confirm(proposalId) { confirm(proposalId) {
this.sendAction('confirmAction', proposalId); if (this.get('contractInteractionEnabled')) {
this.sendAction('confirmAction', proposalId);
} else {
window.alert('Only members can vote on proposals. Please ask someone to set you up.');
}
} }
} }
+26 -25
View File
@@ -13,34 +13,35 @@
</div> </div>
</section> </section>
{{#if contractInteractionEnabled}} {{#if proposalsOpen}}
{{#if proposalsOpen}} <section id="proposals-open">
<section id="proposals-open">
<header>
<h2>Open Proposals</h2>
</header>
<div class="content">
{{proposal-list proposals=proposalsOpenSorted confirmAction="confirmProposal"}}
</div>
</section>
{{/if}}
<section id="proposals-closed">
<header> <header>
<h2>Closed Proposals</h2> <h2>Open Proposals</h2>
</header> </header>
<div class="content"> <div class="content">
{{proposal-list proposals=proposalsClosedSorted confirmAction="confirmProposal"}} {{proposal-list proposals=proposalsOpenSorted
</div> confirmAction="confirmProposal"
</section> contractInteractionEnabled=contractInteractionEnabled}}
<section id="add-contributor">
<header>
<h2>Add Contributor</h2>
</header>
<div class="content">
{{add-contributor kredits=kredits}}
</div> </div>
</section> </section>
{{/if}} {{/if}}
<section id="proposals-closed">
<header>
<h2>Closed Proposals</h2>
</header>
<div class="content">
{{proposal-list proposals=proposalsClosedSorted
confirmAction="confirmProposal"}}
</div>
</section>
<section id="add-contributor">
<header>
<h2>Add Contributor</h2>
</header>
<div class="content">
{{add-contributor kredits=kredits}}
</div>
</section>