manageCodes.xhtml
2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:products="http://java.sun.com/jsf/composite/tools/products" xmlns:tools="http://java.sun.com/jsf/composite/tools" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="/layout/#{sessionHandler.layout}/template.xhtml">
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{gameCodeView.initAdminView}" />
</f:metadata>
<ui:param name="thispage" value="page.gamecode.manageCodes" />
<ui:define name="content">
<h:form>
<p:dataTable border="1" id="games" value="#{gameCodeView.games}" var="game">
<p:column>
<f:facet name="header">
<h:outputText value="${i18n['game.name']}" />
</f:facet>
<h:outputText value="#{game.name}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="edit" />
</f:facet>
<h:commandButton value="muokkaa" action="#{gameCodeView.editSelected}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="GENEROI" />
</f:facet>
<h:commandButton value="generoi kaikille paikoille" action="#{gameCodeView.generateSelectedToAllPlaces}" />
</p:column>
</p:dataTable>
</h:form>
<br /><br />
<h:form>
<p:panelGrid columns="2">
<f:facet name="header">
<h:outputLabel rendered="#{gameCodeView.currentGame.id == null}" value="#{i18n['gamecode.create']}" />
<h:outputLabel rendered="#{gameCodeView.currentGame.id != null}" value="#{i18n['gamecode.edit']}" />
</f:facet>
<h:outputLabel value="service" />
<p:inputText value="#{gameCodeView.currentGame.service}" />
<h:outputLabel value="name" />
<p:inputText value="#{gameCodeView.currentGame.name}" />
<h:outputLabel value="description" />
<p:inputText value="#{gameCodeView.currentGame.description}" />
<h:outputLabel value="url" />
<p:inputText value="#{gameCodeView.currentGame.codeUrl}" />
<h:commandButton action="#{gameCodeView.saveCurrentGame}" value="save" />
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>