viewCodes.xhtml
3.43 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
<!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="#{sessionHandler.template}">
<ui:param name="thispage" value="page.gamecode.viewCodes" />
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{licenseView.initUserView}" />
</f:metadata>
<ui:define name="content">
<h:form>
<h1><h:outputLabel value="#{i18n['game.codes.opened']}" /></h1>
<h:outputLabel rendered="#{licenseView.noLicenseCodes}" value="#{i18n['game.noGameCodes']}" />
<p:dataTable rendered="#{not licenseView.noLicenseCodes}" columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" id="codes" value="#{licenseView.licenseCodes}" var="code">
<p:column sortBy="#{code.license.service}">
<f:facet name="header">
<h:outputText value="#{i18n['game.service']}" />
</f:facet>
<h:outputText value="#{code.licenseTarget.service}" />
</p:column>
<p:column sortBy="#{code.license.name}">
<f:facet name="header">
<h:outputText value="#{i18n['game.name']}" />
</f:facet>
<h:outputText value="#{code.licenseTarget.name}" />
</p:column>
<p:column sortBy="#{code.license.description}">
<f:facet name="header">
<h:outputText value="#{i18n['game.description']}" />
</f:facet>
<h:outputText value="#{code.licenseTarget.description}" />
</p:column>
<p:column sortBy="#{code.code}">
<f:facet name="header">
<h:outputText value="#{i18n['game.code']}" />
</f:facet>
<h:outputText rendered="#{code.accessed}" value="#{code.code}" />
<h:outputText rendered="#{not code.accessed}" value="ei avattu, ota yhteyttä ylläpitoon" />
</p:column>
</p:dataTable>
</h:form>
<br /><br /><br />
<h:form>
<h1><h:outputLabel rendered="#{not licenseView.noLicenses}" value="#{i18n['game.codes.available']}" /></h1>
<p:dataTable rendered="#{not licenseView.noLicenses}" columnClasses="nowrap,numalign,numalign,nowrap,numalign" styleClass="bordertable" id="codes" value="#{licenseView.licenses}" var="license">
<p:column sortBy="#{license.service}">
<f:facet name="header">
<h:outputText value="#{i18n['game.service']}" />
</f:facet>
<h:outputText value="#{license.service}" />
</p:column>
<p:column sortBy="#{license.name}">
<f:facet name="header">
<h:outputText value="#{i18n['game.name']}" />
</f:facet>
<h:outputText value="#{license.name}" />
</p:column>
<p:column sortBy="#{license.description}">
<f:facet name="header">
<h:outputText value="#{i18n['game.description']}" />
</f:facet>
<h:outputText value="#{license.description}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.open']}" />
</f:facet>
<h:commandButton value="#{i18n['game.open']}" action="#{licenseView.openSelectedCode}" />
</p:column>
</p:dataTable>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>