Commit b17f91ab by Tuukka Kivilahti

lisensecodes

1 parent 645a13c0
<!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}">
<f:metadata>
<f:viewParam name="userid" value="#{userView.userid}" />
<f:event type="preRenderView" listener="#{licenseView.initAdminView}" />
</f:metadata>
<ui:param name="thispage" value="page.license.manageCodes" />
<ui:define name="content">
<h:form id="licenseForm">
<p:dataTable border="1" id="games" value="#{licenseView.licenses}" var="license">
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.name']}" />
</f:facet>
<h:outputText value="#{license.name}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="edit" />
</f:facet>
<p:commandButton value="muokkaa" update=":editgame" >
<f:setPropertyActionListener value="#{license}" target="#{licenseView.currentLicense}" />
</p:commandButton>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.codecount']}" />
</f:facet>
<h:outputText value="#{license.licenseCodes.size()}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.active']}" />
</f:facet>
<h:outputText rendered="#{license.active}" value="X" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['game.product']}" />
</f:facet>
<h:outputText value="#{license.product.name}" />
</p:column>
</p:dataTable>
</h:form>
<br /><br />
<h:form id="editgame" >
<p:panelGrid columns="2">
<f:facet name="header">
<h:outputLabel rendered="#{licenseView.currentLicense.id == null}" value="#{i18n['game.create']}" />
<h:outputLabel rendered="#{licenseView.currentLicense.id != null}" value="#{i18n['game.edit']}" />
</f:facet>
<h:outputLabel value="service" />
<p:inputText value="#{licenseView.currentLicense.service}" />
<h:outputLabel value="name" />
<p:inputText value="#{licenseView.currentLicense.name}" />
<h:outputLabel value="description" />
<p:inputText value="#{licenseView.currentLicense.description}" />
<h:outputLabel value="url" />
<p:inputText value="#{licenseView.currentLicense.codeUrl}" />
<h:outputLabel value="active" />
<p:selectBooleanCheckbox value="#{licenseView.currentLicense.active}" />
<h:outputLabel value="product" />
<h:selectOneMenu converter="#{productConverter}" value="#{licenseView.currentLicense.product}">
<f:selectItems var="product" itemLabel="#{product.name}" value="#{licenseView.productsForLicenses}" />
</h:selectOneMenu>
<p:commandButton action="#{licenseView.saveCurrentLicense}" update=":licenseForm" value="save" />
</p:panelGrid>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>
\ No newline at end of file
<!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>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!