show label for paper status

This commit is contained in:
Anton Romanov 2019-11-24 22:54:55 +04:00
parent e7061f4545
commit ac6bd13c6c
3 changed files with 29 additions and 9 deletions

View File

@ -13,7 +13,7 @@
</h:head>
<h:body>
<h:form>
<h:form id="mainForm">
<p:growl id="messages"/>
<div class="ui-g">

View File

@ -8,19 +8,37 @@
Редактирование статьи
</ui:define>
<ui:define name="content">
<style>
#mainForm\:paperStatus > tbody > tr {
border: none;
}
#mainForm\:paperStatus > tbody > tr > td {
border: none;
padding: 0px;
}
</style>
<p:panel id="panel" header="Статья" style="margin-bottom:10px;">
<h:panelGrid columns="2" cellpadding="5">
<h:outputLabel for="name" value="Название:"/>
<p:inputText id="name" required="true" value="#{paperView.paper.title}"/>
<p:outputLabel for="@next" value="Статус:"/>
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
converter="paperStatusConverter">
<f:selectItems value="#{paperView.paperStatuses}"
var="status"
itemLabel="#{status.statusName}"
itemValue="#{status}"/>
</p:selectOneMenu>
<p:panelGrid columns="2" id="paperStatus">
<p:selectOneMenu id="status" required="true" value="#{paperView.paper.status}"
converter="paperStatusConverter">
<p:ajax update="mainForm:paperStatus" process="@this"/>
<f:selectItems value="#{paperView.paperStatuses}"
var="status"
itemLabel="#{status.statusName}"
itemValue="#{status}"/>
</p:selectOneMenu>
<ui:include src="paperStatusFragment.xhtml">
<ui:param name="paper" value="#{paperView.paper}"/>
<ui:param name="shortMode" value="true"/>
</ui:include>
</p:panelGrid>
<p:outputLabel for="@next" value="Тип:"/>
<p:selectOneMenu id="type" value="#{paperView.paper.type}"
converter="paperTypeConverter">

View File

@ -4,5 +4,7 @@
<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:fragment rendered="#{shortMode != true}">
<p:outputText value="#{paper.status.statusName}"/>
</ui:fragment>
</ui:composition>