Files
kredits-web/app/templates/index.hbs
T
bumi f0f82a96fb Adjust for latest naming conventions
expept the renaming of ipfsHash to hashDigest all are already reflected
in the contracts
2018-04-17 11:43:44 +02:00

78 lines
2.0 KiB
Handlebars

{{#if kredits.hasAccounts }}
<section id="user-account">
{{#if kredits.currentUser }}
{{ kredits.currentUser.name }}
{{#if kredits.currentUserIsCore }}
(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
confirmAction="confirmProposal"
contractInteractionEnabled=kredits.hasAccounts}}
{{!-- 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
confirmAction="confirmProposal"}}
{{!-- 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>