fix layout

This commit is contained in:
Anton Romanov 2020-02-17 12:56:19 +04:00
parent 1460e26127
commit 440def2b71
3 changed files with 57 additions and 47 deletions

View File

@ -20,8 +20,8 @@
</style> </style>
<h:form id="mainForm"> <h:form id="mainForm">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-2"></div> <div class="ui-g-12 ui-md-2"></div>
<div class="ui-g-8"> <div class="ui-g-12 ui-md-8">
<p:menubar> <p:menubar>
<p:menuitem> <p:menuitem>
<h:link outcome="#{page.INDEX}"> <h:link outcome="#{page.INDEX}">

View File

@ -11,8 +11,8 @@
</h:head> </h:head>
<h:body class="black"> <h:body class="black">
<div class="ui-g"> <div class="ui-g">
<div class="ui-g-5"></div> <div class="ui-md-5 ui-g-12"></div>
<div class="ui-g-2"> <div class="ui-md-2 ui-g-12">
<form method="post" action="/login.xhtml"> <form method="post" action="/login.xhtml">
<p:panel header="Вход в систему" style="margin-bottom:20px"> <p:panel header="Вход в систему" style="margin-bottom:20px">
<table cellpadding="10" style="width: 100%"> <table cellpadding="10" style="width: 100%">

View File

@ -10,6 +10,24 @@
text-align: right !important; text-align: right !important;
} }
</style> </style>
<div class="ui-fluid">
<div class="ui-g">
<div class="ui-md-3 ui-g-12">
<p:commandButton value="Удалить выделенные" id="papersRemoveButton"
disabled="#{papersView.selectedPapers.isEmpty()}"
action="#{papersView.deleteSelected}" ajax="true" process="@form"
update="messages @form"/>
</div>
<div class="ui-md-5 ui-g-12">
<p:inputText placeholder="Создать новую статью" value="#{papersView.newPaperTitle}"/>
</div>
<div class="ui-md-2 ui-g-12">
<p:commandButton action="#{papersView.create}" value="Создать" ajax="true" process="@form"
update="messages @form mainForm:papersTable"/>
</div>
</div>
<p:dataTable value="#{papersView.papers}" var="paper" paginator="true" rows="10" id="papersTable" <p:dataTable value="#{papersView.papers}" var="paper" paginator="true" rows="10" id="papersTable"
widgetVar="papersTable" emptyMessage="Не найдено подходящих статей" widgetVar="papersTable" emptyMessage="Не найдено подходящих статей"
selection="#{papersView.selectedPapers}" rowKey="#{paper.id}"> selection="#{papersView.selectedPapers}" rowKey="#{paper.id}">
@ -46,15 +64,7 @@
</ui:include> </ui:include>
</p:column> </p:column>
</p:dataTable> </p:dataTable>
<div class="ui-g-3">
<p:commandButton value="Удалить выделенные" id="papersRemoveButton"
disabled="#{papersView.selectedPapers.isEmpty()}"
action="#{papersView.deleteSelected}" ajax="true" process="@form"
update="messages @form"/>
</div> </div>
<p:inputText placeholder="Создать новую статью" value="#{papersView.newPaperTitle}"/>
<p:commandButton action="#{papersView.create}" value="Сохранить" ajax="true" process="@form"
update="messages @form mainForm:papersTable" style="visibility: hidden"/>
</ui:define> </ui:define>
</ui:composition> </ui:composition>
</html> </html>