-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #140 from 67P/feature/contribution_details
Contribution details
- Loading branch information
Showing
17 changed files
with
433 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { inject as service } from '@ember/service'; | ||
import Route from '@ember/routing/route'; | ||
import { alias } from '@ember/object/computed'; | ||
|
||
export default Route.extend({ | ||
|
||
kredits: service(), | ||
contributions: alias('kredits.contributions'), | ||
|
||
model (params) { | ||
return this.contributions.findBy('id', parseInt(params.id)); | ||
}, | ||
|
||
setupController (controller, model) { | ||
this._super(controller, model); | ||
|
||
this.controllerFor('dashboard') | ||
.setProperties({ | ||
showDetailsPane: true, | ||
selectedContributionId: model.id | ||
}); | ||
}, | ||
|
||
deactivate () { | ||
this.controllerFor('dashboard') | ||
.setProperties({ | ||
showDetailsPane: false, | ||
selectedContributionId: null | ||
}); | ||
} | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
section#contribution-details { | ||
header { | ||
nav { | ||
.amount { | ||
font-size: 1.5rem; | ||
} | ||
|
||
.symbol { | ||
padding-left: 0.2rem; | ||
} | ||
} | ||
} | ||
|
||
.content { | ||
width: 100%; | ||
margin: 0 0 1.5rem; | ||
padding: 2rem 2rem; | ||
|
||
border-top: 1px solid rgba(255,255,255,0.2); | ||
border-bottom: 1px solid rgba(255,255,255,0.2); | ||
background-color: rgba(255,255,255,0.1); | ||
|
||
h3 { | ||
font-size: 1.5rem; | ||
margin-bottom: 2rem; | ||
} | ||
|
||
p { | ||
margin-bottom: 2rem; | ||
|
||
span { | ||
font-size: inherit; | ||
} | ||
|
||
&.who-what-when { | ||
font-size: 1.2rem; | ||
margin-bottom: 1.2rem; | ||
} | ||
|
||
&:last-of-type { | ||
margin-bottom: 0; | ||
} | ||
} | ||
|
||
a { | ||
color: $primary-color; | ||
text-decoration: none; | ||
font-size: inherit; | ||
|
||
&:hover { | ||
text-decoration: underline; | ||
} | ||
} | ||
} | ||
|
||
.actions { | ||
text-align: center; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
<section id="contribution-details"> | ||
<header class="with-nav"> | ||
<h2>Contribution #{{model.id}}</h2> | ||
<nav> | ||
<span class="amount">{{model.amount}}</span> | ||
<span class="symbol">₭S</span> | ||
</nav> | ||
</header> | ||
|
||
<div class="content"> | ||
<p class="who-what-when"> | ||
<span class="contributor"> | ||
{{user-avatar contributor=model.contributor}} | ||
{{link-to model.contributor.name "dashboard.contributors.show" model.contributor}} | ||
</span> | ||
contributed | ||
<span class="date" title={{model.iso8601Date}}>{{moment-from model.iso8601Date}}</span>: | ||
</p> | ||
<h3>{{model.description}}</h3> | ||
<p> | ||
Kind: {{model.kind}} | ||
<br>Status: {{contribution-status model}} | ||
</p> | ||
{{#if model.url}} | ||
<p> | ||
<a href={{model.url}} | ||
title={{model.description}} | ||
class="button" | ||
target="_blank" | ||
rel="noopener"> | ||
Open URL | ||
</a> | ||
</p> | ||
{{/if}} | ||
</div> | ||
|
||
<div class="actions"> | ||
<p> | ||
{{#if model.ipfsHash}} | ||
<a href="https://ipfs.io/ipfs/{{model.ipfsHash}}" | ||
class="button small" target="_blank" rel="noopener"> | ||
Inspect IPFS data | ||
</a> | ||
{{/if}} | ||
</p> | ||
</div> | ||
</section> |
Oops, something went wrong.