From 1de2e002bb602e7fa704bb75fab5453a8e362c94 Mon Sep 17 00:00:00 2001 From: Sebastian Kippe Date: Wed, 8 Feb 2017 13:22:19 +0800 Subject: [PATCH] Show proposals to everyone, with warning for non-members --- app/components/proposal-list/component.js | 6 ++- app/templates/index.hbs | 51 ++++++++++++----------- 2 files changed, 31 insertions(+), 26 deletions(-) diff --git a/app/components/proposal-list/component.js b/app/components/proposal-list/component.js index aaafa49..41abcd2 100644 --- a/app/components/proposal-list/component.js +++ b/app/components/proposal-list/component.js @@ -8,7 +8,11 @@ export default Ember.Component.extend({ actions: { 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.'); + } } } diff --git a/app/templates/index.hbs b/app/templates/index.hbs index c365322..adf4053 100644 --- a/app/templates/index.hbs +++ b/app/templates/index.hbs @@ -13,34 +13,35 @@ -{{#if contractInteractionEnabled}} - {{#if proposalsOpen}} -
-
-

Open Proposals

-
-
- {{proposal-list proposals=proposalsOpenSorted confirmAction="confirmProposal"}} -
-
- {{/if}} - -
+{{#if proposalsOpen}} +
-

Closed Proposals

+

Open Proposals

- {{proposal-list proposals=proposalsClosedSorted confirmAction="confirmProposal"}} -
-
- -
-
-

Add Contributor

-
- -
- {{add-contributor kredits=kredits}} + {{proposal-list proposals=proposalsOpenSorted + confirmAction="confirmProposal" + contractInteractionEnabled=contractInteractionEnabled}}
{{/if}} + +
+
+

Closed Proposals

+
+
+ {{proposal-list proposals=proposalsClosedSorted + confirmAction="confirmProposal"}} +
+
+ +
+
+

Add Contributor

+
+ +
+ {{add-contributor kredits=kredits}} +
+