template.xhtml
3.7 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
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html 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="fi" />
<link rel="stylesheet" type="text/css"
href="#{request.contextPath}/resources/style/template1/css/style.css" />
<link rel="stylesheet" type="text/css"
href="#{request.contextPath}/resources/style/template1/css/general.css" />
<ui:insert name="headerdata" />
</h:head>
<h:body>
<div id="page-container">
<div id="logo">
<h:link outcome="/index">
<c:choose>
<c:when test="#{sessionHandler.isInDevelopmentMode()}">
<img
src="#{request.contextPath}/resources/style/insomnia2/img/devel_logo.png" />
</c:when>
<c:otherwise>
<p:graphicImage rendered="#{!empty layoutView.headerimage}"
value="#{layoutView.headerimage}" />
<ui:fragment rendered="#{empty layoutView.headerimage}">
<h1>
<h:outputText value="#{layoutView.headertext}" />
</h1>
</ui:fragment>
</c:otherwise>
</c:choose>
</h:link>
</div>
<div id="page-header">
<div id="login">
<h:outputText rendered="#{sessionHandler.loggedIn}"
value="#{i18n['template.loggedInAs']} #{sessionHandler.currentUser.nick}" />
<div>
<tools:loginLogout />
</div>
</div>
</div>
<div id="main">
<p:menubar model="#{primeMenuView.menuModel}" />
<div class="container top">
<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>
<div class="container clearfix">
<ui:fragment rendered="#{menuView.getMenu(2).size() > 1}">
<div id="right">
<ul>
<ui:repeat var="menuitem" value="#{menuView.getMenu(2)}">
<h:outputText rendered="#{!empty menuitem.header}"
value="</ul><h1>#{i18n[menuitem.header]}</h1><ul>"
escape="false" />
<li><h:link outcome="#{menuitem.outcome}"
value="#{i18n[menuitem.navigation.key]}"
styleClass="#{menuitem.selected?'active':''}" /></li>
</ui:repeat>
</ul>
</div>
</ui:fragment>
<div id="left">
<ui:insert name="title" />
<p:messages severity="info" />
<h:messages />
<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>
</div>
</div>
<div class="container bottom">
<h:link rendered="#{layoutView.manageContent}"
styleClass="editorlink" value="#{i18n['layout.editBottom']}"
outcome="/pages/manage">
<f:param name="pagename" value="#{layoutView.pagepath}:bottom" />
</h:link>
</div>
</div>
</div>
</h:body>
</f:view>
</html>