#fix paper status

This commit is contained in:
Anton Romanov 2019-04-30 19:04:37 +04:00
parent 9c5c107c58
commit 181b14d2e7
3 changed files with 57 additions and 10 deletions

View File

@ -40,7 +40,7 @@ import static ru.ulstu.paper.model.ReferenceDto.ReferenceType.BOOK;
@Service
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 PaperNotificationService paperNotificationService;

View File

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

View File

@ -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>