index.xhtml
4.08 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<!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:users="http://java.sun.com/jsf/composite/cditools/user"
xmlns:tools="http://java.sun.com/jsf/composite/cditools"
xmlns:f="http://java.sun.com/jsf/core"
xmlns:p="http://primefaces.org/ui">
<h:body>
<ui:composition template="#{sessionHandler.template}">
<f:metadata>
<f:event type="preRenderView"
listener="#{actionLogMessageView.initView}" />
</f:metadata>
<ui:define name="content">
<h:outputStylesheet library="style"
name="templates/insomnia2/css/actionlog.css" />
<h1>#{i18n['actionlog.messagelist.header']}</h1>
<p>#{i18n['actionlog.messagelist.description']}</p>
<h:form id="actionlog">
<h2>#{i18n['actionlog.create.header']}</h2>
<p:messages />
<h:panelGrid columns="2">
<h:panelGrid columns="3">
<h:outputText value="#{i18n['actionlog.create.message']}" />
<h:outputText value="#{i18n['actionlog.create.taskradio']}" />
<h:outputText />
<p:inputText value="#{actionLogCreateView.message}" style="width: 400px;" />
<p:selectBooleanCheckbox value="#{actionLogCreateView.task}" />
<h:commandButton class="sendbutton"
action="#{actionLogCreateView.send}"
value="#{i18n['actionlog.create.submitbutton']}" update="@form" />
</h:panelGrid>
<h:panelGrid columns="1">
<p:tagCloud model="#{actionLogMessageView.tagCloud}">
<p:ajax event="select"
listener="#{actionLogMessageView.onTagSelect}"
update="@form,actionlogtable" />
</p:tagCloud>
<h:panelGroup layout="block">
<ui:repeat id="selectedtags" var="tag" value="#{actionLogMessageView.activeTags}">
<!-- <span style="border: 1px solid #0af; display: inline-block; padding: 2px">#{tag.tag}</span> -->
<p:commandButton actionListener="#{actionLogMessageView.selectFilterTag(tag.tag)}" value="#{tag.tag}" immediate="true" update="@form" />
</ui:repeat>
</h:panelGroup>
</h:panelGrid>
</h:panelGrid>
<!-- </h:form>-->
<div class="clearfix"></div>
<h2>#{i18n['actionlog.tasklist.header']}</h2>
<div id="actionlog">
<!-- <h:form id="refresh"> -->
<p:poll interval="10" update="actionlogtable"
onerror="location.reload();" />
<p:dataTable styleClass="bordertable"
rowStyleClass="#{message.state.name}" id="actionlogtable"
value="#{actionLogMessageView.messages}" var="message"
paginator="true" rows="30"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
rowsPerPageTemplate="30,50,100">
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.time']}" />
</f:facet>
<h:outputText value="#{message.time}">
<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}"
timeZone="#{sessionHandler.timezone}" />
</h:outputText>
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.user']}" />
</f:facet>
<h:outputText value="#{message.user.nick}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.message']}" />
</f:facet>
<h:outputText value="#{message.message}" />
</p:column>
<p:column>
<f:facet name="header">
<h:outputText value="#{i18n['actionlog.state']}" />
</f:facet>
<h:outputText value="#{i18n[message.state.key]}" />
</p:column>
<p:column>
<h:link rendered="#{!empty message.state}" outcome="taskview">
<f:param name="id" value="#{message.id}" />
Näytä tehtävä
</h:link>
</p:column>
</p:dataTable>
</div>
</h:form>
</ui:define>
</ui:composition>
</h:body>
</html>