show paper statuses
This commit is contained in:
parent
9665653234
commit
48955b9cfd
@ -39,24 +39,30 @@ import java.util.Set;
|
|||||||
@DiscriminatorValue("PAPER")
|
@DiscriminatorValue("PAPER")
|
||||||
public class Paper extends BaseEntity implements UserActivity, EventSource {
|
public class Paper extends BaseEntity implements UserActivity, EventSource {
|
||||||
public enum PaperStatus {
|
public enum PaperStatus {
|
||||||
ATTENTION("Обратить внимание"),
|
ATTENTION("Обратить внимание", "text-warning"),
|
||||||
ON_PREPARATION("На подготовке"),
|
ON_PREPARATION("На подготовке", "text-primary"),
|
||||||
ON_REVIEW("Отправлена на проверку"),
|
ON_REVIEW("Отправлена на проверку", "text-review"),
|
||||||
ACCEPTED("Принята"),
|
ACCEPTED("Принята", "text-accepted"),
|
||||||
NOT_ACCEPTED("Не принята"),
|
NOT_ACCEPTED("Не принята", "text-not-accepted"),
|
||||||
COMPLETED("Завершена (опубликована)"),
|
COMPLETED("Завершена (опубликована)", "text-success"),
|
||||||
DRAFT("Черновик"),
|
DRAFT("Черновик", "text-draft"),
|
||||||
FAILED("Провалены сроки");
|
FAILED("Провалены сроки", "text-failed");
|
||||||
|
|
||||||
private final String statusName;
|
private final String statusName;
|
||||||
|
private final String elementClass;
|
||||||
|
|
||||||
PaperStatus(String name) {
|
PaperStatus(String name, String elementClass) {
|
||||||
this.statusName = name;
|
this.statusName = name;
|
||||||
|
this.elementClass = elementClass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getStatusName() {
|
public String getStatusName() {
|
||||||
return statusName;
|
return statusName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getElementClass() {
|
||||||
|
return elementClass;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PaperType {
|
public enum PaperType {
|
||||||
|
@ -5,3 +5,36 @@
|
|||||||
.ui-picklist-list {
|
.ui-picklist-list {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
.text-draft {
|
||||||
|
color: rgba(0, 0, 0, 0.48) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-primary {
|
||||||
|
color: #228bba !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-warning {
|
||||||
|
color: #940000 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-review {
|
||||||
|
color: #94028d !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-success {
|
||||||
|
color: #007741 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-accepted {
|
||||||
|
color: #fec503 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-not-accepted {
|
||||||
|
color: #A38831 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.text-failed {
|
||||||
|
color: #A38831 !important;
|
||||||
|
}
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://xmlns.jcp.org/jsf/html"
|
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
|
||||||
xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
|
xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:p="http://java.sun.com/jsf/html">
|
||||||
|
<span class="fa-stack fa-1x big-icon" title="#{paper.status.statusName}">
|
||||||
<h:outputText value="#{paper.status}"/>
|
<i class="fa fa-circle #{paper.status.elementClass} fa-stack-2x"></i>
|
||||||
|
<i class="fa fa-file-text-o fa-stack-1x fa-inverse"></i>
|
||||||
|
</span>
|
||||||
|
<p:outputText value="#{paper.status.statusName}"/>
|
||||||
</ui:composition>
|
</ui:composition>
|
||||||
|
Loading…
Reference in New Issue
Block a user