template.xhtml 6 KB
<?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"
	  xmlns:help="http://java.sun.com/jsf/composite/cditools/help"
	  xmlns:pe="http://primefaces.org/ui/extensions"
>

<f:view contentType="text/html" locale="#{sessionHandler.locale}">

	<pe: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>
		<script type="text/javascript" src="#{request.contextPath}/resources/script/menufix.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>

	</pe:head>


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

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

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

		<!--[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]-->






		<ui:insert name="title" />

				<p:fieldset id="leftuserinfo" rendered="#{!sessionHandler.loggedIn}">
					<div style="text-align: left; padding: 0.7em;">
						<h:form>
							<h:outputText rendered="#{authView.loginError}" styleClass="error" value="#{i18n['loginerror.message']}" /><br />
							<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: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>



		<h:form id="messages">
			<p:growl id="growl" showDetail="true" sticky="true" widgetVar="messages_growl" />
		</h:form>

		<h:form>

			<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() {

				if(window.self === window.top) {

				    var url = document.location.href.split("/MoyaWeb/", 2);
				    var realUrl = "/MoyaNG";

				    if(url.length > 1) {
				        realUrl = "/MoyaNG/user/old?p=" + url[1];
					}

					document.location.href = realUrl;
				}

			});
		</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:outputText id="cdiloop" value="#{conversationKeepaliveView.date}">
			<f:convertDateTime pattern="#{sessionHandler.datetimeFormat}" timeZone="#{sessionHandler.timezone}" />
		</h:outputText>



	</h:body>

</f:view>
</html>