fix dashboard
parent
4d7777831f
commit
8906214f52
@ -0,0 +1,46 @@
|
|||||||
|
<template>
|
||||||
|
<div class="col-12 col-sm-12 col-md-12 col-lg-4 col-xl-3 dashboard-card">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-2">
|
||||||
|
<paper-status :status="paper.status"
|
||||||
|
:key="paper.id">
|
||||||
|
</paper-status>
|
||||||
|
</div>
|
||||||
|
<div class="col col-10 text-right">
|
||||||
|
<p v-if="hasUrl">
|
||||||
|
<a target="_blank" v-bind:href="paper.url"><i
|
||||||
|
class="fa fa-external-link fa-1x"
|
||||||
|
aria-hidden="true"></i></a>
|
||||||
|
</p>
|
||||||
|
<p v-else>
|
||||||
|
<i class="fa fa-fw fa-2x" aria-hidden="true"></i>
|
||||||
|
</p>
|
||||||
|
<router-link :to="{ path: 'papers/paper', query: { id: paper.id }}" class="portfolio-link">
|
||||||
|
<span class="h6">{{ paper.title }}</span>
|
||||||
|
</router-link>
|
||||||
|
<p class="text-muted"> {{ getAuthors }}</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
module.exports = {
|
||||||
|
props: ['paper'],
|
||||||
|
components: {
|
||||||
|
"paper-status": httpVueLoaderEx("/papers/paper-status.vue")
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
getAuthors: function () {
|
||||||
|
var authorsResult = [];
|
||||||
|
this.paper.authors.forEach(function (author) {
|
||||||
|
authorsResult.push(author.lastName + " " + author.firstName);
|
||||||
|
});
|
||||||
|
return authorsResult.join(',')
|
||||||
|
},
|
||||||
|
hasUrl: function () {
|
||||||
|
return this.paper.url !== null && this.paper.url !== '';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
Loading…
Reference in New Issue