From bc563074054b741cd5920f05747539aecd0d8554 Mon Sep 17 00:00:00 2001 From: Roland Haeder <roland@mxchange.org> Date: Wed, 7 Oct 2015 12:42:06 +0200 Subject: [PATCH] added initial login templates and navigation rules MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder <roland@mxchange.org> --- web/WEB-INF/faces-config.xml | 4 +++ web/WEB-INF/templates.dist/login_page.xhtml | 28 +++++++++++++++++++++ web/WEB-INF/templates/login/login_base.tpl | 8 ++++++ web/WEB-INF/templates/login/login_menu.tpl | 20 +++++++++++++++ web/login/index.xhtml | 28 +++++++++++++++++++++ 5 files changed, 88 insertions(+) create mode 100644 web/WEB-INF/templates.dist/login_page.xhtml create mode 100644 web/WEB-INF/templates/login/login_base.tpl create mode 100644 web/WEB-INF/templates/login/login_menu.tpl create mode 100644 web/login/index.xhtml diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 2edfbb2e..13317a99 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -91,6 +91,10 @@ <from-outcome>admin_list_customer</from-outcome> <to-view-id>/admin/customer/admin_customer_list.xhtml</to-view-id> </navigation-case> + <navigation-case> + <from-outcome>login_index</from-outcome> + <to-view-id>/login/index.xhtml</to-view-id> + </navigation-case> </navigation-rule> <navigation-rule> <from-view-id>/basket.xhtml</from-view-id> diff --git a/web/WEB-INF/templates.dist/login_page.xhtml b/web/WEB-INF/templates.dist/login_page.xhtml new file mode 100644 index 00000000..c91b0f83 --- /dev/null +++ b/web/WEB-INF/templates.dist/login_page.xhtml @@ -0,0 +1,28 @@ +<?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/login/login_base.tpl"> + <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_FOO}</ui:define> + + <ui:define name="menu"> + <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" /> + </ui:define> + + <ui:define name="content_header"> + #{msg.SUB_TITLE_LOGIN_FOO} + </ui:define> + + <ui:define name="content"> + Here goes your content. + </ui:define> + + <ui:define name="footer"> + <ui:include id="footer" class="login_footer" src="/WEB-INF/templates/login/login_footer.tpl" /> + </ui:define> + </ui:composition> +</html> diff --git a/web/WEB-INF/templates/login/login_base.tpl b/web/WEB-INF/templates/login/login_base.tpl new file mode 100644 index 00000000..23c86ca2 --- /dev/null +++ b/web/WEB-INF/templates/login/login_base.tpl @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + template="/WEB-INF/templates/base.tpl" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <ui:define name="title">Benutzerbereich - <ui:insert name="login_title" class="login_title" /></ui:define> +</ui:composition> diff --git a/web/WEB-INF/templates/login/login_menu.tpl b/web/WEB-INF/templates/login/login_menu.tpl new file mode 100644 index 00000000..08ce0c8f --- /dev/null +++ b/web/WEB-INF/templates/login/login_menu.tpl @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://java.sun.com/jsf/facelets"> + + <div class="menu_outer"> + <div class="menu"> + <div class="menu_header"> + #{msg.MENU_HOME_TITLE} + </div> + + <ul> + <li><h:link title="#{msg.LINK_GUEST_HOME_TITLE}" outcome="login_index" value="#{msg.LINK_GUEST_HOME}" /></li> + <li><h:link title="#{msg.LINK_CLOSE_SESSION_TITLE}" outcome="logout" value="#{msg.LINK_CLOSE_SESSION}" /></li> + </ul> + </div> + </div> +</ui:composition> diff --git a/web/login/index.xhtml b/web/login/index.xhtml new file mode 100644 index 00000000..dafff409 --- /dev/null +++ b/web/login/index.xhtml @@ -0,0 +1,28 @@ +<?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/login/login_base.tpl"> + <ui:define name="guest_title">#{msg.PAGE_TITLE_LOGIN_FOO}</ui:define> + + <ui:define name="menu"> + <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" /> + </ui:define> + + <ui:define name="content_header"> + #{msg.SUB_TITLE_LOGIN_FOO} + </ui:define> + + <ui:define name="content"> + Here goes your content. + </ui:define> + + <ui:define name="footer"> + <ui:include id="footer" class="login_footer" src="/WEB-INF/templates/login/login_footer.tpl" /> + </ui:define> + </ui:composition> +</html> -- 2.39.5