some layout fixes
This commit is contained in:
parent
6adb3fec71
commit
751195bf96
@ -31,11 +31,7 @@
|
||||
background: white !important;
|
||||
}
|
||||
</style>
|
||||
<p:panel id="panel" header="Статья" style="margin-bottom:10px;">
|
||||
<p:panelGrid cellpadding="5" id="paperPanel">
|
||||
|
||||
|
||||
</p:panelGrid>
|
||||
<p:panel id="panel" header="Редактирование статьи: #{paperView.paper.title}" style="margin-bottom:10px;">
|
||||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-md-3 ui-g-12">
|
||||
|
@ -10,74 +10,79 @@
|
||||
text-align: right !important;
|
||||
}
|
||||
</style>
|
||||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-md-5 ui-g-12">
|
||||
<p:inputText placeholder="Создать новую статью" id="newPaperName"
|
||||
value="#{papersView.newPaperTitle}" required="true"
|
||||
requiredMessage="Введите название новой статьи"/>
|
||||
<p:message for="newPaperName"/>
|
||||
</div>
|
||||
<div class="ui-md-2 ui-g-12">
|
||||
<p:commandButton action="#{papersView.create}" value="Создать" ajax="true" process="@form"
|
||||
update="messages @form mainForm:papersTable"/>
|
||||
<p:panel id="panel" header="Все статьи" style="margin-bottom:10px;">
|
||||
|
||||
</div>
|
||||
<div class="ui-md-3 ui-g-12">
|
||||
<p:commandButton value="Удалить выделенные" id="papersRemoveButton"
|
||||
disabled="#{papersView.selectedPapers.isEmpty()}"
|
||||
action="#{papersView.deleteSelected}" ajax="true"
|
||||
process="mainForm:papersRemoveButton"
|
||||
update="messages mainForm:papersTable">
|
||||
<p:confirm header="Подтверждение" message="Удалить выделенные статьи?"
|
||||
icon="pi pi-exclamation-triangle"/>
|
||||
</p:commandButton>
|
||||
</div>
|
||||
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
|
||||
<p:commandButton value="Да" type="button" styleClass="ui-confirmdialog-yes" icon="pi pi-check"/>
|
||||
<p:commandButton value="Нет" type="button" styleClass="ui-confirmdialog-no" icon="pi pi-times"/>
|
||||
</p:confirmDialog>
|
||||
</div>
|
||||
<div class="ui-fluid">
|
||||
<div class="ui-g">
|
||||
<div class="ui-md-5 ui-g-12">
|
||||
<p:inputText placeholder="Создать новую статью" id="newPaperName"
|
||||
value="#{papersView.newPaperTitle}" required="true"
|
||||
requiredMessage="Введите название новой статьи"/>
|
||||
<p:message for="newPaperName"/>
|
||||
</div>
|
||||
<div class="ui-md-2 ui-g-12">
|
||||
<p:commandButton action="#{papersView.create}" value="Создать" ajax="true" process="@form"
|
||||
update="messages @form mainForm:papersTable"/>
|
||||
|
||||
<p:dataTable value="#{papersView.papers}" var="paper" paginator="true" paginatorPosition="bottom"
|
||||
rows="10" id="papersTable"
|
||||
widgetVar="papersTable" emptyMessage="Не найдено подходящих статей"
|
||||
selection="#{papersView.selectedPapers}" rowKey="#{paper.id}">
|
||||
<f:facet name="header">
|
||||
<p:outputPanel>
|
||||
<h:outputText value="Поиск:"/>
|
||||
<p:inputText id="globalFilter" onkeyup="PF('papersTable').filter()" style="width:150px"
|
||||
placeholder="Строка поиска..."/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
<p:ajax event="rowSelect" update="mainForm:papersRemoveButton" process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowSelectCheckbox" update="mainForm:papersRemoveButton" process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowUnselectCheckbox" update="mainForm:papersRemoveButton"
|
||||
process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowUnselect" update="mainForm:papersRemoveButton" process="mainForm:papersTable"/>
|
||||
<p:column selectionMode="multiple" style="width:16px;text-align:center"/>
|
||||
<p:column headerText="Название" filterBy="#{paper.title}" filterMatchMode="contains">
|
||||
<h:outputLink value="/paper/paper.xhtml">
|
||||
#{paper.title}
|
||||
<f:param name="id" value="#{paper.id}"/>
|
||||
</h:outputLink>
|
||||
</p:column>
|
||||
<p:column headerText="Статус" filterBy="#{paper.status} #{paper.status.statusName}"
|
||||
filterMatchMode="contains">
|
||||
<f:facet name="filter">
|
||||
<p:selectOneMenu onchange="PF('papersTable').filter()" styleClass="custom-filter"
|
||||
converter="paperStatusConverter">
|
||||
<f:selectItem itemLabel="Статус" itemValue="#{null}" noSelectionOption="true"/>
|
||||
<f:selectItems value="#{papersView.paperStatuses}" var="status" itemLabel="#{status.statusName}"
|
||||
itemValue="#{status}"/>
|
||||
</p:selectOneMenu>
|
||||
</div>
|
||||
<div class="ui-md-3 ui-g-12">
|
||||
<p:commandButton value="Удалить выделенные" id="papersRemoveButton"
|
||||
disabled="#{papersView.selectedPapers.isEmpty()}"
|
||||
action="#{papersView.deleteSelected}" ajax="true"
|
||||
process="mainForm:papersRemoveButton"
|
||||
update="messages mainForm:papersTable">
|
||||
<p:confirm header="Подтверждение" message="Удалить выделенные статьи?"
|
||||
icon="pi pi-exclamation-triangle"/>
|
||||
</p:commandButton>
|
||||
</div>
|
||||
<p:confirmDialog global="true" showEffect="fade" hideEffect="fade">
|
||||
<p:commandButton value="Да" type="button" styleClass="ui-confirmdialog-yes" icon="pi pi-check"/>
|
||||
<p:commandButton value="Нет" type="button" styleClass="ui-confirmdialog-no" icon="pi pi-times"/>
|
||||
</p:confirmDialog>
|
||||
</div>
|
||||
|
||||
<p:dataTable value="#{papersView.papers}" var="paper" paginator="true" paginatorPosition="bottom"
|
||||
rows="10" id="papersTable"
|
||||
widgetVar="papersTable" emptyMessage="Не найдено подходящих статей"
|
||||
selection="#{papersView.selectedPapers}" rowKey="#{paper.id}">
|
||||
<f:facet name="header">
|
||||
<p:outputPanel>
|
||||
<h:outputText value="Поиск:"/>
|
||||
<p:inputText id="globalFilter" onkeyup="PF('papersTable').filter()" style="width:150px"
|
||||
placeholder="Строка поиска..."/>
|
||||
</p:outputPanel>
|
||||
</f:facet>
|
||||
<ui:include src="paperStatusFragment.xhtml">
|
||||
<ui:param name="paper" value="#{paper}"/>
|
||||
</ui:include>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</div>
|
||||
<p:ajax event="rowSelect" update="mainForm:papersRemoveButton" process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowSelectCheckbox" update="mainForm:papersRemoveButton"
|
||||
process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowUnselectCheckbox" update="mainForm:papersRemoveButton"
|
||||
process="mainForm:papersTable"/>
|
||||
<p:ajax event="rowUnselect" update="mainForm:papersRemoveButton" process="mainForm:papersTable"/>
|
||||
<p:column selectionMode="multiple" style="width:16px;text-align:center"/>
|
||||
<p:column headerText="Название" filterBy="#{paper.title}" filterMatchMode="contains">
|
||||
<h:outputLink value="/paper/paper.xhtml">
|
||||
#{paper.title}
|
||||
<f:param name="id" value="#{paper.id}"/>
|
||||
</h:outputLink>
|
||||
</p:column>
|
||||
<p:column headerText="Статус" filterBy="#{paper.status} #{paper.status.statusName}"
|
||||
filterMatchMode="contains">
|
||||
<f:facet name="filter">
|
||||
<p:selectOneMenu onchange="PF('papersTable').filter()" styleClass="custom-filter"
|
||||
converter="paperStatusConverter">
|
||||
<f:selectItem itemLabel="Статус" itemValue="#{null}" noSelectionOption="true"/>
|
||||
<f:selectItems value="#{papersView.paperStatuses}" var="status"
|
||||
itemLabel="#{status.statusName}"
|
||||
itemValue="#{status}"/>
|
||||
</p:selectOneMenu>
|
||||
</f:facet>
|
||||
<ui:include src="paperStatusFragment.xhtml">
|
||||
<ui:param name="paper" value="#{paper}"/>
|
||||
</ui:include>
|
||||
</p:column>
|
||||
</p:dataTable>
|
||||
</div>
|
||||
</p:panel>
|
||||
</ui:define>
|
||||
</ui:composition>
|
||||
</html>
|
||||
|
Loading…
Reference in New Issue
Block a user