Files
kredits-web/app/templates/index.hbs
T
2018-06-15 09:07:13 +02:00

76 lines
1.9 KiB
Handlebars

{{#if kredits.hasAccounts }}
<section id="user-account">
{{#if kredits.currentUser }}
{{ kredits.currentUser.name }}
{{#if kredits.currentUser.isCore }}
(core)
{{/if}}
Account: {{kredits.currentUser.account}}
{{/if}}
</section>
{{/if}}
<section id="contributors">
<header>
<h2>Kosmos Contributors</h2>
</header>
<div class="content">
{{contributor-list contributors=contributorsSorted}}
<p class="stats">
<span class="number">{{await kredits.totalSupply}}</span> kredits issued and distributed among
<span class="number">{{contributorsWithKredits.length}}</span> contributors.
</p>
</div>
</section>
{{#if proposalsOpen}}
<section id="proposals-open">
<header>
<h2>Open Proposals</h2>
</header>
<div class="content">
{{!-- TODO: We need a better naming for kredits.hasAccounts --}}
{{proposal-list proposals=proposalsOpenSorted
confirmProposals=(action 'confirmProposals')}}
{{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}}
<p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
</p>
{{/if}}
</div>
</section>
{{/if}}
<section id="proposals-closed">
<header>
<h2>Closed Proposals</h2>
</header>
<div class="content">
{{proposal-list proposals=proposalsClosedSorted}}
{{!-- TODO: We need a better naming --}}
{{#if kredits.hasAccounts}}
<p class="actions">
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
</p>
{{/if}}
</div>
</section>
<section id="add-contributor">
<header>
<h2>Add Contributor</h2>
</header>
<div class="content">
{{#if kredits.currentUser.isCore}}
{{add-contributor contributors=contributors save=(action 'save')}}
{{else}}
Only core team members can add new contributors. Please ask someone to set you up.
{{/if}}
</div>
</section>