template.xhtml
9.36 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html>
<html class="no-js" xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:tools="http://java.sun.com/jsf/composite/cditools" xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:c="http://java.sun.com/jsp/jstl/core" xmlns:p="http://primefaces.org/ui">
<f:view contentType="text/html" locale="#{sessionHandler.locale}">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title><h:outputText value="#{layoutView.getHeader()}" /></title>
<meta name="description" content="Lippukauppa" />
<meta name="author" content="CodeCrew ry" />
<meta http-equiv="Content-Language" content="#{sessionHandler.locale}" />
<link rel="icon" href="#{request.contextPath}/favicon.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/print.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/skinning.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/primelayout/css/structual.css" />
<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/custom_components.css" />
<script type="text/javascript" src="#{request.contextPath}/resources/script/prime_calendar.js" ></script>
<ui:insert name="headerdata" />
<h:outputStylesheet>
.bgColor1 .ui-layout-unit-content {
background-color: #{layoutView.getLayoutProperty1('#68A3C2')};
}
.bgColor1 .ui-layout-unit-header {
background-color: #{layoutView.getLayoutProperty1('#68A3C2')};
}
</h:outputStylesheet>
</h:head>
<h:body>
<!-- Javascript-lokalisaatiolippupuljausta -->
<h:form id="conversationKeepaliver">
<p:remoteCommand name="cdiKeepalive" update=":cdiloop" actionListener="#{conversationKeepaliveView.ping()}" />
</h:form>
<h:outputText id="cdiloop" value="#{conversationKeepaliveView.value}" />
<script type="text/javascript">
$(document)
.ready(
function() {
setInterval(function() {
cdiKeepalive();
}, 20000);
<ui:repeat value="#{localeSelectorView.availableLocales}" var="loc" varStatus="idx">
$(
".languageSelector .ui-button:eq(#{idx.index})")
.css(
"background",
"url('#{request.contextPath}/resources/icons/flags/#{loc.locale.language}.png') no-repeat")
.css("width", "16px").css("height",
"11px").css("padding", "0")
.css("margin-right", "5px").css(
"border-radius", "0")
</ui:repeat>
$(".languageSelector .ui-button-text").text("");
});
var apina = null;
</script>
<!--[if lt IE 7]>
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
<![endif]-->
<p:layout widgetVar="mainlayout" fullPage="true" id="mainlayoutpanel">
<p:layoutUnit id="toppanel" position="north" styleClass="bgColor1" size="60">
<div id="header_box">
<div id="header_left">
<h:link id="logolink" outcome="/index">
<c:choose>
<c:when test="#{sessionHandler.isInDevelopmentMode()}">
<img src="#{request.contextPath}/resources/templates/insomnia2/img/devel_logo.png" />
</c:when>
<c:otherwise>
<p:graphicImage id="eventlogo" rendered="#{layoutView.headerIsImage}" value="#{layoutView.headerimage}" />
<ui:fragment rendered="#{!layoutView.headerIsImage}">
<h1>
<h:outputText value="#{layoutView.headertext}" />
</h1>
</ui:fragment>
</c:otherwise>
</c:choose>
</h:link>
</div>
<div id="header_center">
<h:form id="adminchanger" rendered="#{menuView.renderTopmenuChanger}">
<p:button id="user" outcome="/index" value="#{i18n['mode.user']}" />
<p:button id="admin" outcome="/useradmin/list" value="#{i18n['mode.admin']}" />
</h:form>
<ui:fragment rendered="#{layoutView.canManageContent}">
<div>
<h:form id="contentlinks">
<h:outputLabel for="manageBtn" value="#{i18n['content.showContentEditLinks']}" />
<h:selectBooleanCheckbox id="showcontentlinks" value="#{sessionStore.manageContentLinks}" onclick="this.form.submit()" />
</h:form>
</div>
</ui:fragment>
</div>
<div id="header_right">
<a href="http://www.codecrew.fi"><img src="#{request.contextPath}/resources/templates/template1/img/moya_logo.png" /> </a>
</div>
</div>
</p:layoutUnit>
<p:layoutUnit header="#{i18n['menu']}" collapsible="true" id="leftpanel" position="west" resizable="true" size="225" minSize="100">
<p:fieldset id="leftlogin" rendered="#{sessionHandler.loggedIn}">
<h:outputText value="#{i18n['template.loggedInAs']}" />
<br />
<b><h:outputText value="#{sessionHandler.currentUser.login}" /></b>
<br />
<h:link outcome="/auth/logout">
<h:outputText value="#{i18n['login.logout']}" />
</h:link>
</p:fieldset>
<br />
<nav>
<h:form id="mainMenu">
<p:panelMenu id="panelmenu" model="#{primeMenuView.menuModel}" />
</h:form>
<h:link style="font-size: 10px;" rendered="#{readerView.shopToOthers}" outcome="/shop/showReaderEvents" value="Readers" />
</nav>
<br />
<p:fieldset id="leftuserinfo" rendered="#{!sessionHandler.loggedIn}">
<div style="text-align: left; padding: 0.7em;">
<h:form>
<p:inputText styleClass="form" id="linelogin" value="#{authView.login}" />
<p:watermark for="linelogin" value="#{i18n['login.username']}" />
<br />
<p:password styleClass="form" id="linepwd" value="#{authView.password}" />
<p:watermark for="linepwd" value="#{i18n['login.password']}" />
<br />
<br />
<p:commandButton update="messages" styleClass="button" id="onelinesubmit" action="#{authView.executeLoginAction}" ajax="false" value="#{i18n['login.submit']}" />
<br />
<br />
</h:form>
<ui:fragment rendered="#{authView.canCreateUser}">
<h:link value="#{i18n['submenu.user.create']}" outcome="/user/create" />
<br />
</ui:fragment>
<h:link value="#{i18n['submenu.auth.sendResetMail']}" outcome="/auth/sendResetMail" />
</div>
</p:fieldset>
</p:layoutUnit>
<p:layoutUnit position="center">
<div class="container top">
<h:form id="selectLanguage">
<p:selectOneButton id="langselect" styleClass="languageSelector" value="#{sessionStore.locale}" immediate="true" converter="#{localeConverter}">
<f:selectItems value="#{localeSelectorView.availableLocales}" var="loc" itemValue="#{loc.locale}" itemLabel="#{loc.locale.displayName}" />
<p:ajax update="@all" event="change" />
</p:selectOneButton>
</h:form>
<h:link rendered="#{layoutView.manageContent}" styleClass="editorlink" value="#{i18n['layout.editTop']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}:top" />
</h:link>
</div>
<!-- TODO: tyyleistys tähän, toisaalta tarttis tulla vaan teksti -->
<ui:insert name="title" />
<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
<ui:insert name="edittab" />
<ui:repeat var="cont1" value="#{menuView.getPagecontent('top')}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
<ui:insert name="content" />
<ui:repeat var="cont1" value="#{menuView.getPagecontent('bottom')}">
<h:outputText value="#{cont1.content}" escape="false" />
</ui:repeat>
<h:link rendered="#{layoutView.manageContent}" styleClass="editorlink" value="#{i18n['layout.editBottom']}" outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}:bottom" />
</h:link>
<footer class="bgColor1"> </footer>
</p:layoutUnit>
</p:layout>
<h:form id="messages">
<p:growl id="growl" showDetail="true" sticky="true" widgetVar="messages_growl" />
</h:form>
<h:form>
<!-- <p:growl id="growl" showDetail="true" sticky="true" autoUpdate="true" /> -->
<p:confirmDialog global="true" showEffect="fade" hideEffect="explode">
<p:commandButton value="Yes" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" />
<p:commandButton value="No" type="button" styleClass="ui-confirmdialog-no" icon="ui-icon-close" />
</p:confirmDialog>
</h:form>
<script type="text/javascript">
$(function() {
// autoresize for main panels, this is magic :)
PrimeFaces.widgets.mainlayout.layout.loadCookie();
PrimeFaces.widgets.mainlayout.onclose = function() {
PrimeFaces.widgets.mainlayout.layout.saveCookie()
}
PrimeFaces.widgets.mainlayout.onopen = function() {
PrimeFaces.widgets.mainlayout.layout.saveCookie()
}
});
</script>
<c:if test="#{sessionHandler.isInDevelopmentMode()}">
<script type="text/javascript">
$('*:contains("???"):not(:has(*))').filter(
function() {
return (this.textContent || this.innerText)
.indexOf("???") === 0;
}).addClass("missing_i18n");
</script>
</c:if>
</h:body>
</f:view>
</html>