73 lines
3.5 KiB
HTML
73 lines
3.5 KiB
HTML
<?xml version='1.0' encoding='UTF-8' ?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3c.org/1999/xhtml"
|
|
xmlns:h="http://xmlns.jcp.org/jsf/html"
|
|
xmlns:f="http://java.sun.com/jsf/core">
|
|
<h:head>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<link rel="stylesheet" href="https://unpkg.com/tachyons@4.10.0/css/tachyons.min.css"/>
|
|
<link rel="stylesheet" href="https://unpkg.com/normalize.css@8.0.1/normalize.css"/>
|
|
<link href="https://fonts.googleapis.com/css?family=Open+Sans" rel="stylesheet"/>
|
|
<h:outputStylesheet library="css" name="all.css"/>
|
|
<style>
|
|
body {
|
|
font-family: 'Open Sans', sans-serif;
|
|
}
|
|
</style>
|
|
</h:head>
|
|
<body class="black-70 pa4">
|
|
<h:form rendered="#{userBean.isLogged() and userBean.isAdmin()}">
|
|
<h1 class="f1 w-100 dib tc">Administracion</h1>
|
|
<div>
|
|
<h:commandLink class="f5 fr link dim br2 ph3 pv2 mb2 dib white bg-blue" action="#{clienteBean.gotoCreate()}">
|
|
<li class="fas fa-plus-circle"></li> Crear Cliente
|
|
</h:commandLink>
|
|
<h:commandLink class="f5 fl link dim br2 ph3 pv2 mb2 dib white bg-red" immediate="true" action="#{userBean.logout()}">
|
|
<li class="fas fa-sign-out-alt"></li> Cerrar sesion
|
|
</h:commandLink>
|
|
</div>
|
|
|
|
<h:dataTable class="w-100 pv3" headerClass="fw6 bb b--black-20 tl pb2 pr3 bg-white" value="#{clienteBean.clienteList}" var="cliente">
|
|
<h:column>
|
|
<f:facet name="header">
|
|
<h:outputLabel value="Rut"/>
|
|
</f:facet>
|
|
<h:outputLabel value="#{cliente.rut}"/>
|
|
</h:column>
|
|
<h:column>
|
|
<f:facet name="header">
|
|
<h:outputLabel value="Nombre"/>
|
|
</f:facet>
|
|
<h:outputLabel value="#{cliente.nombre}"/>
|
|
</h:column>
|
|
<h:column>
|
|
<f:facet name="header">
|
|
<h:outputLabel value="Ciudad"/>
|
|
</f:facet>
|
|
<h:outputLabel value="#{cliente.ciudad}"/>
|
|
</h:column>
|
|
<h:column class="tr">
|
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-green tc" action="#{clienteBean.gotoView(cliente)}">
|
|
<li class="fas fa-eye"></li>
|
|
</h:commandLink>
|
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-blue tc" action="#{clienteBean.gotoUpdate(cliente)}">
|
|
<li class="fas fa-edit"></li>
|
|
</h:commandLink>
|
|
<h:commandLink class="f6 link dim br2 ph3 pv2 mr2 dib white bg-red tc" action="#{clienteBean.gotoDelete(cliente)}">
|
|
<li class="fas fa-trash"></li>
|
|
</h:commandLink>
|
|
</h:column>
|
|
</h:dataTable>
|
|
</h:form>
|
|
|
|
<h:form rendered="#{!userBean.isLogged()}">
|
|
<div class="tc">
|
|
<h1 class="f1 tc">Acceso no autorizado</h1>
|
|
<h:commandLink class="f5 tc link w-20 dim br2 ph3 pv2 mb1 mr2 dib white bg-red" value="Volver al index" action="index"/>
|
|
</div>
|
|
</h:form>
|
|
</body>
|
|
</html>
|
|
|
|
|