userCartShow.xhtml
3.45 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
<!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:f="http://java.sun.com/jsf/core"
xmlns:users="http://java.sun.com/jsf/composite/cditools/user" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:account="http://java.sun.com/jsf/composite/cditools/account"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<!-- f:event type="preRenderView" listener="#{userCartView.initView}" />
-->
</f:metadata>
<ui:define name="title">
<h1>#{i18n['user.edit.title']}</h1>
</ui:define>
<ui:define name="content">
<h:form>
<p:toolbar>
<f:facet name="left">
<h:outputText value="#{userCartView.current+1}" /> / <h:outputText value="#{userCartView.userCartSize}" />
<span class="ui-separator"><span class="ui-icon ui-icon-grip-dotted-vertical" /></span>
<p:commandButton action="#{userCartView.prev()}" value="#{i18n['usercart.prev']}"
icon="ui-icon-circle-arrow-w" ajax="false"
rendered="#{userCartView.current > 0}" />
<p:commandButton action="#{userCartView.removeCurrent()}" value="#{i18n['usercart.removeCurrent']}"
icon="ui-icon-close" ajax="false"/>
<p:commandButton action="#{userCartView.next()}" value="#{i18n['usercart.next']}"
icon="ui-icon-circle-arrow-e" ajax="false"
rendered="#{userCartView.userCartSize > (userCartView.current+1)}" />
</f:facet>
</p:toolbar>
</h:form>
<ui:fragment rendered="#{userView.hasPrintedCard}">
<h2>Card</h2>
<h:form>
<p:panelGrid columns="2">
<h:outputText value="#{i18n['printedCard.template']}" />
<h:outputText value="#{userView.printedCard.template.name}" />
<h:outputText value="#{i18n['printedCard.cardState']}"/>
<p:selectOneButton value="#{userView.printedCard.cardState}"
valueChangeListener="#{userView.cardStateChangeListener}">
<f:selectItems value="#{userView.printedCardStates}" />
<f:ajax/>
</p:selectOneButton>
</p:panelGrid>
</h:form>
</ui:fragment>
<p>
<h:link outcome="/card/massprint" value="Mass Print">
<f:param name="cid" value="#{javax.enterprise.context.conversation.id}" />
</h:link>
</p>
<users:edit id="useredit" commitaction="#{userCartView.saveUser()}" commitvalue="#{i18n['user.save']}" />
<h:form id="roleform" rendered="#{roleView.canReadRoles}">
<h2>
<h:outputText value="#{i18n['user.roles']}:" />
</h2>
<h:selectManyCheckbox converter="#{roleConverter}" disabled="#{!roleView.canWriteRoles}" layout="pageDirection" id="roles" value="#{userView.usersRoles}">
<f:selectItems var="roleitem" itemLabel="#{roleitem.name}" value="#{roleDataView.roles}" />
</h:selectManyCheckbox>
<div>
<h:message rendered="#{roleView.canReadRoles}" for="roles" />
</div>
<h:commandButton action="#{userView.saveRoles}" value="#{i18n['user.saveRoles']}" />
</h:form>
<h:form>
<p:imageCropper value="#{userView.croppedImage}" aspectRatio="0.7317073170731707" image="/dydata/userimage/#{userView.user.currentImage.id}.img" />
<h:commandButton action="#{userView.crop}" value="#{i18n['user.cropImage']}" />
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>