template.xhtml 3.65 KB
<?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="icon" href="#{request.contextPath}/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/infoview/css/style.css" />
		<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/infoview/css/general.css" />
		<link rel="stylesheet" type="text/css" href="#{request.contextPath}/resources/templates/custom_components.css" />
		<ui:insert name="headerdata" />

	</h:head>


	<h:body>


		<h:form id="conversationKeepaliver">
			<p:remoteCommand name="cdiKeepalive" onerror="PF('keepAliveDialog').show();" update=":cdiloop" actionListener="#{conversationKeepaliveView.ping()}" />
		</h:form>

		<script type="text/javascript">
			$(document).ready(function() {
				setInterval(function () {
					cdiKeepalive();
				}, 20000);
			});
		</script>

		<p:dialog widgetVar="keepAliveDialog" showEffect="fade" hideEffect="explode" header="#{i18n['template.keepaliveError.title']}" modal="true">
			<br />#{i18n['template.keepaliveError']}<br /><br />

			<p:commandButton value="OK" type="button" styleClass="ui-confirmdialog-yes" icon="ui-icon-check" onclick="location.reload();" />
		</p:dialog>



		<div id="header" class="bgColor1">

			<div id="header_left">
				<h:link outcome="/index">
					<c:choose>
						<c:when test="#{sessionHandler.isInDevelopmentMode()}">
							<img src="#{request.contextPath}/resources/templates/insomnia2/img/devel_logo.png" />
						</c:when>
						<c:otherwise>
							<img id="eventlogo" src="#{request.contextPath}/dydata/logo/#{layoutView.logoid}" />
						</c:otherwise>

					</c:choose>
				</h:link>
				<div class="topmenu">
					<h:form>
						<p:menubar rendered="#{primeMenuView.hasSecondaryMenu}" model="#{primeMenuView.secondaryMenuModel}" />
					</h:form>
				</div>
			</div>
			<div id="header_center">
				<ui:insert name="headercontent" />
			</div>
			<div id="header_right">
				<img src="#{request.contextPath}/resources/templates/template1/img/moya_logo.png" />
			</div>
		</div>

		<div class="container top">
			<ui:insert name="topbar" />
			<h:form id="dialogs">
				<p:confirmDialog id="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>

				<p:growl id="growl" showDetail="true" sticky="true" autoUpdate="true" />
			</h:form>
		</div>

		<div class="clearfix"></div>

		<div style="margin-left: 10px;">
			<ui:insert name="content" />
			<br /><br /><br />
			<h:outputText id="cdiloop" value="#{conversationKeepaliveView.date}">
				<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
			</h:outputText>
		</div>


	</h:body>

</f:view>
</html>