Show contribution history from events
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
import Ember from 'ember';
|
||||||
|
|
||||||
|
export default Ember.Component.extend({
|
||||||
|
|
||||||
|
tagName: 'ul',
|
||||||
|
classNames: ['contribution-list'],
|
||||||
|
|
||||||
|
contributionsWithContributors: function() {
|
||||||
|
return this.get('contributions').map((c) => {
|
||||||
|
c.set('contributor', this.get('contributors')
|
||||||
|
.findBy('address', c.get('recipientAddress')));
|
||||||
|
return c;
|
||||||
|
});
|
||||||
|
}.property('contributions.@each')
|
||||||
|
|
||||||
|
});
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
{{#each contributionsWithContributors as |contribution|}}
|
||||||
|
<li title="({{contribution.kind}}) {{contribution.description}}">
|
||||||
|
<span class="category {{contribution.kind}}">♥</span>
|
||||||
|
<span class="amount">{{contribution.amount}}</span><span class="symbol">₭S</span>
|
||||||
|
for <span class="recipient">{{contribution.contributor.name}}</span>
|
||||||
|
</li>
|
||||||
|
{{/each}}
|
||||||
@@ -10,6 +10,7 @@ export default Ember.Object.extend({
|
|||||||
ipfsHash: null,
|
ipfsHash: null,
|
||||||
amount: null,
|
amount: null,
|
||||||
|
|
||||||
|
contributor: null,
|
||||||
contribution: null,
|
contribution: null,
|
||||||
kind: null,
|
kind: null,
|
||||||
description: null,
|
description: null,
|
||||||
|
|||||||
@@ -104,3 +104,4 @@ button, input[type=submit] {
|
|||||||
@import "components/contributor-list";
|
@import "components/contributor-list";
|
||||||
@import "components/add-contributor";
|
@import "components/add-contributor";
|
||||||
@import "components/proposal-list";
|
@import "components/proposal-list";
|
||||||
|
@import "components/contribution-list";
|
||||||
|
|||||||
@@ -0,0 +1,39 @@
|
|||||||
|
ul.contribution-list {
|
||||||
|
clear: both;
|
||||||
|
width: 100%;
|
||||||
|
list-style: none;
|
||||||
|
|
||||||
|
li {
|
||||||
|
// display: block;
|
||||||
|
padding: 0 1.2rem;
|
||||||
|
line-height: 4.2rem;
|
||||||
|
background-color: rgba(255,255,255,0.1);
|
||||||
|
font-size: 1.4rem;
|
||||||
|
border-bottom: 1px solid rgba(255,255,255,0.2);
|
||||||
|
&:first-of-type {
|
||||||
|
border-top: 1px solid rgba(255,255,255,0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
.category {
|
||||||
|
color: $blue;
|
||||||
|
padding-right: 0.2rem;
|
||||||
|
&.community { color: $red; }
|
||||||
|
&.dev { color: $pink; }
|
||||||
|
&.design { color: $yellow; }
|
||||||
|
&.docs { color: $green; }
|
||||||
|
&.ops { color: $purple; }
|
||||||
|
}
|
||||||
|
.amount {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.symbol {
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
padding-left: 0.2rem;
|
||||||
|
}
|
||||||
|
.recipient {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
+4
-10
@@ -32,19 +32,13 @@
|
|||||||
</section>
|
</section>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<section id="proposals-closed">
|
<section id="contributions">
|
||||||
<header>
|
<header>
|
||||||
<h2>Closed Proposals</h2>
|
<h2>Contributions</h2>
|
||||||
</header>
|
</header>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
{{proposal-list proposals=proposalsClosedSorted
|
{{contribution-list contributions=model.contributions
|
||||||
confirmAction="confirmProposal"}}
|
contributors=model.contributors}}
|
||||||
|
|
||||||
{{#if contractInteractionEnabled}}
|
|
||||||
<p class="actions">
|
|
||||||
{{#link-to 'proposals.new'}}Create new proposal{{/link-to}}
|
|
||||||
</p>
|
|
||||||
{{/if}}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user