From 041ada21d550115544f8d048766e3da0b25a9d04 Mon Sep 17 00:00:00 2001
From: Roland Haeder <roland@mxchange.org>
Date: Wed, 2 Mar 2016 19:38:01 +0100
Subject: [PATCH] These pages can also be accessed by a logged-in user.
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit

Signed-off-by: Roland Häder <roland@mxchange.org>
---
 .../templates.dist/guest_login_page.xhtml     | 20 +++++++++++++++++++
 web/WEB-INF/templates/login/login_footer.tpl  |  6 +++---
 web/imprint.xhtml                             |  2 +-
 web/privacy.xhtml                             |  2 +-
 web/terms.xhtml                               |  2 +-
 5 files changed, 26 insertions(+), 6 deletions(-)
 create mode 100644 web/WEB-INF/templates.dist/guest_login_page.xhtml

diff --git a/web/WEB-INF/templates.dist/guest_login_page.xhtml b/web/WEB-INF/templates.dist/guest_login_page.xhtml
new file mode 100644
index 00000000..cc7f87e1
--- /dev/null
+++ b/web/WEB-INF/templates.dist/guest_login_page.xhtml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+	  xmlns:ui="http://java.sun.com/jsf/facelets"
+	  xmlns:h="http://xmlns.jcp.org/jsf/html"
+	  xmlns:f="http://xmlns.jcp.org/jsf/core"
+	  >
+
+	<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
+		<ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_FOO}</ui:define>
+
+		<ui:define name="content_header">
+			#{msg.CONTENT_TITLE_INDEX_FOO}
+		</ui:define>
+
+		<ui:define name="content">
+			Here goes your content.
+		</ui:define>
+	</ui:composition>
+</html>
diff --git a/web/WEB-INF/templates/login/login_footer.tpl b/web/WEB-INF/templates/login/login_footer.tpl
index 81bbc695..ffe77f49 100644
--- a/web/WEB-INF/templates/login/login_footer.tpl
+++ b/web/WEB-INF/templates/login/login_footer.tpl
@@ -10,13 +10,13 @@
 				<h:link outcome="login_index" title="#{msg.LINK_LOGIN_HOME_TITLE}" value="#{msg.LINK_LOGIN_HOME}" />
 			</li>
 			<li class="footer_link">
-				<h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" target="_blank" />
+				<h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
 			</li>
 			<li class="footer_link">
-				<h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" target="_blank" />
+				<h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
 			</li>
 			<li class="footer_link">
-				<h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" target="_blank" />
+				<h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
 			</li>
 			<li class="footer_copyright">Copyright (c) 2016 by Roland Häder</li>
 		</ul>
diff --git a/web/imprint.xhtml b/web/imprint.xhtml
index e5cd5715..c93385c8 100644
--- a/web/imprint.xhtml
+++ b/web/imprint.xhtml
@@ -6,7 +6,7 @@
 	  xmlns:f="http://xmlns.jcp.org/jsf/core"
 	  >
 
-	<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+	<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
 		<ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_IMPRINT}</ui:define>
 
 		<ui:define name="content_header">
diff --git a/web/privacy.xhtml b/web/privacy.xhtml
index 235c0e64..babc3643 100644
--- a/web/privacy.xhtml
+++ b/web/privacy.xhtml
@@ -6,7 +6,7 @@
 	  xmlns:f="http://xmlns.jcp.org/jsf/core"
 	  >
 
-	<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+	<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
 		<ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_PRIVACY}</ui:define>
 
 		<ui:define name="content_header">
diff --git a/web/terms.xhtml b/web/terms.xhtml
index ba7d66db..d9df5b5b 100644
--- a/web/terms.xhtml
+++ b/web/terms.xhtml
@@ -6,7 +6,7 @@
 	  xmlns:f="http://xmlns.jcp.org/jsf/core"
 	  >
 
-	<ui:composition template="/WEB-INF/templates/guest/guest_base.tpl">
+	<ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
 		<ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_TERMS}</ui:define>
 
 		<ui:define name="content_header">
-- 
2.39.5