#fix paper status

pull/244/head
Anton Romanov 5 years ago
parent 9c5c107c58
commit 181b14d2e7

@ -40,7 +40,7 @@ import static ru.ulstu.paper.model.ReferenceDto.ReferenceType.BOOK;
@Service @Service
public class PaperService { public class PaperService {
private final static int MAX_DISPLAY_SIZE = 40; private final static int MAX_DISPLAY_SIZE = 50;
private final static String PAPER_FORMATTED_TEMPLATE = "%s %s"; private final static String PAPER_FORMATTED_TEMPLATE = "%s %s";
private final PaperNotificationService paperNotificationService; private final PaperNotificationService paperNotificationService;

@ -1,22 +1,34 @@
<template> <template>
<div class="row text-left paper-row" style="background-color: white;"> <div class="row text-left paper-row" style="background-color: white;">
<div class="col"> <div class="col-sm-12">
<span class="fa-stack fa-1x"> <paper-status :status="paper.status"
<div> :key="paper.id">
<i class="fa fa-circle fa-stack-2x text-warning"></i> </paper-status>
</div>
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
</span>
<router-link :to="{ path: 'papers/paper', query: { id: paper.id }}" class="portfolio-link"> <router-link :to="{ path: 'papers/paper', query: { id: paper.id }}" class="portfolio-link">
<span class="h6">{{ paper.title }}</span> <span class="h6">{{ paper.title }}</span>
<!-- <span class="text-muted">{{ paper.authors }}</span>-->
</router-link> </router-link>
</div> </div>
<div class="col-sm-11 col">
<span class="text-muted" v-for="author in getAuthors"
:key="author.id">{{ author }}</span>
</div>
</div> </div>
</template> </template>
<script> <script>
module.exports = { module.exports = {
props: ['paper'] 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(', ')
}
}
} }
</script> </script>

@ -0,0 +1,35 @@
<template>
<span class="fa-stack fa-1x">
<div v-if="status === 'ATTENTION'">
<i class="fa fa-circle fa-stack-2x text-warning"></i>
</div>
<div v-if="status === 'DRAFT'">
<i class="fa fa-circle fa-stack-2x text-draft"></i>
</div>
<div v-if="status === 'ON_PREPARATION'">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
</div>
<div v-if="status === 'ON_REVIEW'">
<i class="fa fa-circle fa-stack-2x text-review"></i>
</div>
<div v-if="status === 'COMPLETED'">
<i class="fa fa-circle fa-stack-2x text-success"></i>
</div>
<div v-if="status === 'FAILED'">
<i class="fa fa-circle fa-stack-2x text-failed"></i>
</div>
<div v-if="status === 'ACCEPTED'">
<i class="fa fa-circle fa-stack-2x text-accepted"></i>
</div>
<div v-if="status === 'NOT_ACCEPTED'">
<i class="fa fa-circle fa-stack-2x text-not-accepted"></i>
</div>
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
</span>
</template>
<script>
module.exports = {
props: ['status'],
}
</script>
Loading…
Cancel
Save