Merge pull request #113 from 67P/feature/98-veto_unconfirmed_contributions
Veto contributions
This commit was merged in pull request #113.
This commit is contained in:
@@ -5,16 +5,16 @@ export default Component.extend({
|
||||
tagName: 'ul',
|
||||
classNames: ['contribution-list'],
|
||||
|
||||
// actions: {
|
||||
//
|
||||
// veto (contributionId) {
|
||||
// if (this.contractInteractionEnabled) {
|
||||
// this.vetoContribution(contributionId);
|
||||
// } else {
|
||||
// window.alert('Only members can veto contributions. Please ask someone to set you up.');
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// }
|
||||
actions: {
|
||||
|
||||
veto (contributionId) {
|
||||
if (this.contractInteractionEnabled) {
|
||||
this.vetoContribution(contributionId);
|
||||
} else {
|
||||
window.alert('Only members can veto contributions. Please ask someone to set you up.');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{{#each contributions as |contribution|}}
|
||||
<li data-contribution-id={{contribution.id}} class={{if contribution.confirmed "confirmed" "unconfirmed"}}>
|
||||
<li data-contribution-id={{contribution.id}} class="{{contribution-status contribution}} {{if contribution.vetoed "vetoed"}}">
|
||||
<p class="meta">
|
||||
<span class="recipient">{{user-avatar contributor=contribution.contributor}}</span>
|
||||
<span class="category {{contribution.kind}}">({{contribution.kind}})</span>
|
||||
@@ -14,5 +14,12 @@
|
||||
<p class="kredits-amount">
|
||||
<span class="amount">{{contribution.amount}}</span><span class="symbol">₭S</span>
|
||||
</p>
|
||||
{{#unless contribution.vetoed}}
|
||||
{{#unless (is-confirmed-contribution contribution)}}
|
||||
<p class="voting">
|
||||
<button {{action "veto" contribution.id}} class="small danger">veto</button>
|
||||
</p>
|
||||
{{/unless}}
|
||||
{{/unless}}
|
||||
</li>
|
||||
{{/each}}
|
||||
Reference in New Issue
Block a user