]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
renamed controller as there are now 2 logins + converted CRLF->LF
authorRoland Häder <roland@mxchange.org>
Tue, 3 May 2016 11:45:08 +0000 (13:45 +0200)
committerRoland Haeder <roland@mxchange.org>
Tue, 3 May 2016 20:59:21 +0000 (22:59 +0200)
Signed-off-by: Roland Häder <roland@mxchange.org>
25 files changed:
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/profile/PizzaUserProfileWebRequestBean.java
src/java/org/mxchange/pizzaapplication/validators/password/PizzaUserPasswordValidator.java
web/WEB-INF/templates.dist/guest_login_page.xhtml
web/WEB-INF/templates/admin/cellphone/admin_cellphone_data.tpl
web/WEB-INF/templates/guest/guest_login_form.tpl
web/WEB-INF/templates/login/login_base.tpl
web/WEB-INF/templates/login/login_enter_current_password.tpl [new file with mode: 0644]
web/imprint.xhtml
web/login/login_add_addressbook.xhtml [new file with mode: 0644]
web/login/login_change_email_address.xhtml [new file with mode: 0644]
web/login/login_change_password.xhtml [new file with mode: 0644]
web/login/login_change_personal_data.xhtml [new file with mode: 0644]
web/login/login_contact_data_saved.xhtml
web/login/login_data_saved.xhtml [new file with mode: 0644]
web/login/login_edit_user_data.xhtml [new file with mode: 0644]
web/login/login_index.xhtml [new file with mode: 0644]
web/login/login_own_addressbooks.xhtml [new file with mode: 0644]
web/login/login_user_data_saved.xhtml
web/privacy.xhtml
web/terms.xhtml
web/user/show_addressbook.xhtml [new file with mode: 0644]
web/user/user_list.xhtml [new file with mode: 0644]
web/user/user_profile.xhtml [new file with mode: 0644]

index 0ab69d5b0368022f4bf6bfeba6b4bb997e7514a9..da24b4173b9af5ccad2625d4f1be1b14a308bcf5 100644 (file)
@@ -176,7 +176,7 @@ public class PizzaContactWebSessionBean implements PizzaContactWebSessionControl
         * Login bean (controller)
         */
        @Inject
-       private PizzaUserLoginWebSessionController loginController;
+       private PizzaUserLoginWebSessionController userLoginController;
 
        /**
         * Phone number area code
@@ -512,24 +512,24 @@ public class PizzaContactWebSessionBean implements PizzaContactWebSessionControl
        @Override
        public String doChangePersonalContactData () {
                // This method shall only be called if the user is logged-in
-               if (!this.loginController.isUserLoggedIn()) {
+               if (!this.userLoginController.isUserLoggedIn()) {
                        // Not logged-in
                        throw new IllegalStateException("User is not logged-in"); //NOI18N
                } else if (!this.isRequiredChangePersonalDataSet()) {
                        // Not all required fields are set
                        throw new FaceletException("Not all required fields are set."); //NOI18N
-               } else if (!this.loginController.ifCurrentPasswordMatches()) {
+               } else if (!this.userLoginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       throw new FaceletException(new UserPasswordMismatchException(this.loginController.getLoggedInUser()));
+                       throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
                }
 
                // Get contact instance
-               Contact contact = this.loginController.getLoggedInUser().getUserContact();
+               Contact contact = this.userLoginController.getLoggedInUser().getUserContact();
 
                // It should be there, so run some tests on it
-               assert (contact instanceof Contact) : "Instance loginController.loggedInUser.userContact is null"; //NOI18N
-               assert (contact.getContactId() instanceof Long) : "Instance loginController.userContact.contactId is null"; //NOI18N
-               assert (contact.getContactId() > 0) : MessageFormat.format("Instance loginController.userContact.contactId={0} is invalid", contact.getContactId()); //NOI18N
+               assert (contact instanceof Contact) : "Instance userLoginController.loggedInUser.userContact is null"; //NOI18N
+               assert (contact.getContactId() instanceof Long) : "Instance userLoginController.userContact.contactId is null"; //NOI18N
+               assert (contact.getContactId() > 0) : MessageFormat.format("Instance userLoginController.userContact.contactId={0} is invalid", contact.getContactId()); //NOI18N
 
                // Update all fields
                contact.setContactGender(this.getGender());
index c8ea10b64d8b0c9ec1a8cedd86f0a4c9f7b48ab5..0c8a886e3046d80eac958d842d61c12b8ad86a37 100644 (file)
@@ -103,7 +103,7 @@ public class PizzaUserLoginWebSessionBean implements PizzaUserLoginWebSessionCon
                        Context context = new InitialContext();
 
                        // Try to lookup
-                       this.loginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/PizzaService-ejb/login!org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote"); //NOI18N
+                       this.loginBean = (UserLoginSessionBeanRemote) context.lookup("java:global/jrecruiter-ejb/login!org.mxchange.jusercore.model.login.UserLoginSessionBeanRemote"); //NOI18N
                } catch (final NamingException ex) {
                        // Continue to throw
                        throw new FaceletException(ex);
@@ -141,7 +141,7 @@ public class PizzaUserLoginWebSessionBean implements PizzaUserLoginWebSessionCon
 
        @Override
        public String getCurrentPassword () {
-               return this.currentPassword;
+               return currentPassword;
        }
 
        @Override
@@ -206,11 +206,16 @@ public class PizzaUserLoginWebSessionBean implements PizzaUserLoginWebSessionCon
 
        @Override
        public boolean isUserLoggedIn () {
+               // Trace message
+               // NOISY-DEBUG System.out.println(MessageFormat.format("RecruiterUserLoginWebSessionBean:isUserLoggedIn: this.loggedInUser={0},this.templateType={1} - CALLED!", this.getLoggedInUser(), this.getTemplateType()));
+
                // Compare instance
                this.userLoggedIn = ((this.getLoggedInUser() instanceof User) && (Objects.equals(this.getLoggedInUser().getUserAccountStatus(), UserAccountStatus.CONFIRMED)));
 
+               // Trace message
+               // NOISY-DEBUG System.out.println(MessageFormat.format("RecruiterUserLoginWebSessionBean:isUserLoggedIn: this.userLoggedIn={0} - EXIT!", this.userLoggedIn));
+
                // Return it
                return this.userLoggedIn;
        }
-
 }
index 19123e6e62f68a7deb672b7f3da5a41188112258..1e0c3f2be6a2783fefd51599f5c5851531264245 100644 (file)
@@ -111,6 +111,6 @@ public class PizzaUserProfileWebRequestBean implements PizzaUserProfileWebReques
                // Check all conditions (except for admin)
                // TODO: Add admin role somehow?
                return ((profileMode.equals(ProfileMode.PUBLIC)) ||
-                               (this.loginController.isUserLoggedIn()) && (profileMode.equals(ProfileMode.MEMBERS)));
+                               (this.userLoginController.isUserLoggedIn()) && (profileMode.equals(ProfileMode.MEMBERS)));
        }
 }
index 7b86c4a49a184ce1f63df9064edee1a9c27652d3..d46aa76596711c6e719cfa5c183b797c31af4a3c 100644 (file)
@@ -56,7 +56,7 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
        /**
         * User login controller
         */
-       private PizzaUserLoginWebSessionController loginController;
+       private PizzaUserLoginWebSessionController userLoginController;
 
        /**
         * Default constructor
@@ -87,10 +87,10 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
                super.preValidate(context, component, value, requiredFields, false);
 
                // value is known to be an entered password, so instance login container
-               LoginContainer container = new UserLoginContainer(this.loginController.getLoggedInUser(), (String) value);
+               LoginContainer container = new UserLoginContainer(this.userLoginController.getLoggedInUser(), (String) value);
 
                // Test it here
-               if (!UserUtils.ifPasswordMatches(container, this.loginController.getLoggedInUser())) {
+               if (!UserUtils.ifPasswordMatches(container, this.userLoginController.getLoggedInUser())) {
                        // Password mismatches
                        throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR, "Password mismatching.", "The password the user has entered does not match the stored password.")); //NOI18N
                }
@@ -98,4 +98,5 @@ public class PizzaUserPasswordValidator extends BaseStringValidator implements V
                // Trace message
                this.loggerBeanLocal.logTrace("validate: EXIT!"); //NOI18N
        }
+
 }
index c24c17cc2e7a61440d1e36604a4845b7f29eddb9..e3d7e7d6f1a65d3689754ca81adb7ca27a25b143 100644 (file)
@@ -2,14 +2,13 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html
        lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
-
        xmlns="http://www.w3.org/1999/xhtml"
        xmlns:ui="http://xmlns.jcp.org/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:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_FOO}</ui:define>
 
                <ui:define name="content_header">
index b14353891718a247684f923faa910ff4e31269b7..db480479e7e4026e041663b3ccac65ad46c9e117 100644 (file)
@@ -1,57 +1,57 @@
-<?xml version="1.0" encoding="UTF-8" ?>\r
-<ui:composition\r
-       xmlns="http://www.w3.org/1999/xhtml"\r
-       xmlns:f="http://java.sun.com/jsf/core"\r
-       xmlns:h="http://java.sun.com/jsf/html"\r
-       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">\r
-\r
-       <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty cellphoneNumber}" />\r
-\r
-       <h:panelGrid id="cellphone_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CELLPHONE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty cellphoneNumber}">\r
-               <f:facet name="header">\r
-                       <h:outputText value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_DATA}" />\r
-               </f:facet>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="cellphoneId" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />\r
-\r
-                       <h:outputText id="cellphoneId" styleClass="data_field" value="#{cellphoneNumber.phoneId}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="cellphoneProvider" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_PROVIDER_NAME}" />\r
-\r
-                       <h:link outcome="admin_show_mobile_provider">\r
-                               <f:param name="providerId" value="#{cellphoneNumber.cellphoneProvider.providerId}" />\r
-                               <h:outputText id="cellphoneProvider" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerName}" />\r
-                       </h:link>\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel for="cellphoneNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE}" />\r
-\r
-                       <h:outputText id="cellphoneNumber" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerCountry.countryExternalDialPrefix}#{cellphoneNumber.cellphoneProvider.providerDialPrefix}-#{cellphoneNumber.phoneNumber}" />\r
-               </h:column>\r
-\r
-               <h:column>\r
-                       <h:outputLabel styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_LINKS}" />\r
-\r
-                       <div class="data_field">\r
-                               <ui:fragment rendered="#{not empty contact}">\r
-                                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_links.tpl">\r
-                                               <ui:param name="cellphoneNumber" value="#{cellphoneNumber}" />\r
-                                               <ui:param name="contact" value="#{contact}" />\r
-                                               <ui:param name="isShowPage" value="#{isShowPage}" />\r
-                                       </ui:include>\r
-                               </ui:fragment>\r
-\r
-                               <ui:fragment rendered="#{empty contact}">\r
-                                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_links.tpl">\r
-                                               <ui:param name="cellphoneNumber" value="#{cellphoneNumber}" />\r
-                                               <ui:param name="isShowPage" value="#{isShowPage}" />\r
-                                       </ui:include>\r
-                               </ui:fragment>\r
-                       </div>\r
-               </h:column>\r
-       </h:panelGrid>\r
-</ui:composition>\r
+<?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://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_CELLPHONE_NUMBER_NOT_SET}" rendered="#{empty cellphoneNumber}" />
+
+       <h:panelGrid id="cellphone_data" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CELLPHONE_DATA}" headerClass="table_header_column" styleClass="table_big" columns="2" rendered="#{not empty cellphoneNumber}">
+               <f:facet name="header">
+                       <h:outputText value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_DATA}" />
+               </f:facet>
+
+               <h:column>
+                       <h:outputLabel for="cellphoneId" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" />
+
+                       <h:outputText id="cellphoneId" styleClass="data_field" value="#{cellphoneNumber.phoneId}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="cellphoneProvider" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_PROVIDER_NAME}" />
+
+                       <h:link outcome="admin_show_mobile_provider">
+                               <f:param name="providerId" value="#{cellphoneNumber.cellphoneProvider.providerId}" />
+                               <h:outputText id="cellphoneProvider" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerName}" />
+                       </h:link>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="cellphoneNumber" styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_NUMBER_COMPLETE}" />
+
+                       <h:outputText id="cellphoneNumber" styleClass="data_field" value="#{cellphoneNumber.cellphoneProvider.providerCountry.countryExternalDialPrefix}#{cellphoneNumber.cellphoneProvider.providerDialPrefix}-#{cellphoneNumber.phoneNumber}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_LINKS}" />
+
+                       <div class="data_field">
+                               <ui:fragment rendered="#{not empty contact}">
+                                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_links.tpl">
+                                               <ui:param name="cellphoneNumber" value="#{cellphoneNumber}" />
+                                               <ui:param name="contact" value="#{contact}" />
+                                               <ui:param name="isShowPage" value="#{isShowPage}" />
+                                       </ui:include>
+                               </ui:fragment>
+
+                               <ui:fragment rendered="#{empty contact}">
+                                       <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_links.tpl">
+                                               <ui:param name="cellphoneNumber" value="#{cellphoneNumber}" />
+                                               <ui:param name="isShowPage" value="#{isShowPage}" />
+                                       </ui:include>
+                               </ui:fragment>
+                       </div>
+               </h:column>
+       </h:panelGrid>
+</ui:composition>
index f6384692912d185d67f819b3d9afc30647419745..ca1c0737a33da166b5c959af4e18c88fd71256a7 100644 (file)
@@ -41,7 +41,7 @@
 
                                <div class="table_footer">
                                        <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                       <h:commandButton class="submit" type="submit" action="#{loginController.doLogin()}" value="#{msg.BUTTON_USER_LOGIN}" />
+                                       <h:commandButton class="submit" type="submit" action="#{userLoginController.doLogin()}" value="#{msg.BUTTON_USER_LOGIN}" />
                                </div>
                        </div>
                </h:form>
index 23c86ca2a469aca805839762503c9fe03028ea9a..21b469310b6c001b34675dd8be825d970ef6aec5 100644 (file)
@@ -2,7 +2,22 @@
 <ui:composition
        template="/WEB-INF/templates/base.tpl"
        xmlns="http://www.w3.org/1999/xhtml"
-       xmlns:ui="http://java.sun.com/jsf/facelets">
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+       xmlns:h="http://xmlns.jcp.org/jsf/html">
 
-       <ui:define name="title">Benutzerbereich - <ui:insert name="login_title" class="login_title" /></ui:define>
+       <ui:define name="title">#{msg.PAGE_TITLE_LOGIN_AREA} - <ui:insert name="login_title" class="login_title" /></ui:define>
+
+       <ui:define name="menu">
+               <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                       <ui:include id="menu" class="login_menu" src="/WEB-INF/templates/login/login_menu.tpl" />
+               </ui:fragment>
+               <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                       <h:outputText class="errors" value="#{msg.USER_NOT_LOGGED_IN}" />
+               </ui:fragment>
+       </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>
+=======
diff --git a/web/WEB-INF/templates/login/login_enter_current_password.tpl b/web/WEB-INF/templates/login/login_enter_current_password.tpl
new file mode 100644 (file)
index 0000000..392dcbc
--- /dev/null
@@ -0,0 +1,27 @@
+<?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://xmlns.jcp.org/jsf/facelets">
+
+       <div class="para">
+               <fieldset id="current_password">
+                       <legend title="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND_TITLE}">#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRMATION_LEGEND}</legend>
+                       <div class="table_row">
+                               <div class="table_left">
+                                       <h:outputLabel for="currentPassword" value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD_CONFIRM}" />
+                               </div>
+
+                               <div class="table_right">
+                                       <h:inputSecret class="input" id="currentPassword" size="10" maxlength="255" value="#{userLoginController.currentPassword}" required="true" validatorMessage="#{msg.ERROR_CURRENT_PASSWORD_MISMATCHING}">
+                                               <h:message for="currentPassword" class="errors" />
+                                               <!-- <f:validator for="currentPassword" validatorId="RecruiterUserPasswordValidator" /> //-->
+                                       </h:inputSecret>
+                               </div>
+
+                               <div class="clear"></div>
+                       </div>
+               </fieldset>
+       </div>
+</ui:composition>
index 115f6ff36ac98c5ba4dcd354e8e4758f813b0a5d..25c8180fde3491f2c4c3b185e3f4ba29f99d8178 100644 (file)
@@ -8,7 +8,7 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
-       <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_IMPRINT}</ui:define>
 
                <ui:define name="content_header">
diff --git a/web/login/login_add_addressbook.xhtml b/web/login/login_add_addressbook.xhtml
new file mode 100644 (file)
index 0000000..8df345f
--- /dev/null
@@ -0,0 +1,51 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_ADD_ADDRESSBOOK}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_ADD_ADDRESSBOOK}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <h:form id="add_addressbook" acceptcharset="utf-8">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       #{msg.FORM_LOGIN_ADD_ADDRESSBOOK_TITLE}
+                                               </div>
+
+                                               <div class="table_row">
+                                                       <div class="table_left">
+                                                               <h:outputLabel for="addressbookName" value="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME}"/>
+                                                       </div>
+
+                                                       <div class="table_right">
+                                                               <h:inputText class="input" id="addressbookName" value="#{addressbookController.addressbookName}" maxlength="50" size="20" title="#{msg.LOGIN_ENTER_ADDRESSBOOK_NAME_TITLE}" required="true" requiredMessage="#{msg.LOGIN_ADDRESSBOOK_NAME_REQUIRED_MESSAGE}">
+                                                                       <f:validator for="addressbookName" validatorId="AddressbookNameValidator" />
+                                                               </h:inputText>
+                                                       </div>
+                                               </div>
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_LOGIN_ADD_ADDRESSBOOK}" action="#{addressbookController.addAddressbook()}" />
+                                               </div>
+                                       </div>
+                               </h:form>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_email_address.xhtml b/web/login/login_change_email_address.xhtml
new file mode 100644 (file)
index 0000000..2f0541f
--- /dev/null
@@ -0,0 +1,83 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_CHANGE_EMAIL_ADDRESS}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_EMAIL_ADDRESS}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="para">
+                                                       <fieldset id="change_email">
+                                                               <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_EMAIL_LEGEND}</legend>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               #{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               #{userController.emailAddress}
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddress" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddress" size="20" maxlength="255" value="#{emailChangeController.emailAddress}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="emailAddressRepeat" value="#{msg.LOGIN_CHANGE_EMAIL_ENTER_EMAIL_REPEAT}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputText class="input" id="emailAddressRepeat" size="20" maxlength="255" value="#{emailChangeController.emailAddressRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_password.xhtml b/web/login/login_change_password.xhtml
new file mode 100644 (file)
index 0000000..1d87388
--- /dev/null
@@ -0,0 +1,71 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_CHANGE_PASSWORD}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_PASSWORD}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_CHANGE_PASSWORD_TITLE}
+                                       </div>
+
+                                       <h:form id="login_form">
+                                               <div class="para">
+                                                       <fieldset id="change_password">
+                                                               <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}">#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}</legend>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password1" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD1}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password1" size="10" maxlength="255" value="#{userLoginController.userPassword}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+
+                                                               <div class="table_row">
+                                                                       <div class="table_left">
+                                                                               <h:outputLabel for="password2" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD2}" />
+                                                                       </div>
+
+                                                                       <div class="table_right">
+                                                                               <h:inputSecret class="input" id="password2" size="10" maxlength="255" value="#{userLoginController.userPasswordRepeat}" required="true" />
+                                                                       </div>
+
+                                                                       <div class="clear"></div>
+                                                               </div>
+                                                       </fieldset>
+                                               </div>
+
+                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userController.changePassword()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_change_personal_data.xhtml b/web/login/login_change_personal_data.xhtml
new file mode 100644 (file)
index 0000000..10985be
--- /dev/null
@@ -0,0 +1,45 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_CHANGE_PERSONAL_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_CHANGE_PERSONAL_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}
+                                       </div>
+
+                                       <h:form id="login_change_personal_form">
+                                               <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" />
+
+                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+
+                                               <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+
+                                               <div class="table_footer">
+                                                       <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                       <h:commandButton class="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
+                                               </div>
+                                       </h:form>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
index 25b69679991123806b0d98f19cbf3307395c208f..b0414b3c388e75d2a6ab2cd488dbbd3c66bddf2d 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
                                <ui:include id="message_box" src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
                                </ui:include>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
                        </ui:fragment>
                </ui:define>
diff --git a/web/login/login_data_saved.xhtml b/web/login/login_data_saved.xhtml
new file mode 100644 (file)
index 0000000..bd6b87e
--- /dev/null
@@ -0,0 +1,30 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_DATA_SAVED}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_DATA_SAVED}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <ui:include id="message_box" src="/WEB-INF/templates/generic/message_box.tpl">
+                                       <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
+                               </ui:include>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_edit_user_data.xhtml b/web/login/login_edit_user_data.xhtml
new file mode 100644 (file)
index 0000000..261571c
--- /dev/null
@@ -0,0 +1,50 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_EDIT_USER_DATA}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_EDIT_USER_DATA}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.LOGIN_EDIT_USER_DATA_TITLE}
+                                       </div>
+
+                                       <div class="para notice">
+                                               <h:outputText value="#{msg.LOGIN_CHOOSE_PERSONAL_DATA_EMAIL_PASSWORD_NOTICE}" />
+                                       </div>
+
+                                       <div class="para">
+                                               <ul>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA_TITLE}" outcome="login_change_personal_data" value="#{msg.LINK_LOGIN_CHANGE_PERSONAL_DATA}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" outcome="login_change_email_address" value="#{msg.LINK_LOGIN_CHANGE_EMAIL_ADDRESS}" />
+                                                       </li>
+                                                       <li>
+                                                               <h:link title="#{msg.LINK_LOGIN_CHANGE_PASSWORD_TITLE}" outcome="login_change_password" value="#{msg.LINK_LOGIN_CHANGE_PASSWORD}" />
+                                                       </li>
+                                               </ul>
+                                       </div>
+                               </div>
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_index.xhtml b/web/login/login_index.xhtml
new file mode 100644 (file)
index 0000000..92d6b8f
--- /dev/null
@@ -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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_HOME}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_HOME}
+               </ui:define>
+
+               <ui:define name="content">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
+                               Here goes your content.
+                       </ui:fragment>
+
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </ui:fragment>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/login/login_own_addressbooks.xhtml b/web/login/login_own_addressbooks.xhtml
new file mode 100644 (file)
index 0000000..235cb07
--- /dev/null
@@ -0,0 +1,67 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/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_OWN_ADDRESSBOOKS}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_LOGIN_OWN_ADDRESSBOOKS}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:outputText rendered="#{userLoginController.isUserLoggedIn()}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.TABLE_HEADER_LIST_OWN_ADDRESSBOOKS}
+                                       </div>
+
+                                       <div class="para">
+                                               <h:dataTable id="table_own_addressbooks" var="addressbook" value="#{addressbookController.allAddressbooks()}" styleClass="table" headerClass="table_data_column" summary="#{msg.TABLE_SUMMARY_LOGIN_LIST_OWN_ADDRESSBOOKS}" rendered="#{addressbookController.hasCreatedAddressbooks()}">
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_NAME}</f:facet>
+
+                                                               <h:link outcome="user_show_addressbook" title="#{msg.LINK_SHOW_ADDRESSBOOK_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookName" value="#{addressbook.addressbookName}" title="#{msg.ADDRESSBOOK_NAME_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_TOTAL_ENTRIES}</f:facet>
+
+                                                               <h:link outcome="show_addressbook_entries" title="#{msg.LINK_SHOW_ADDRESSBOOK_ENTRIES_TITLE}">
+                                                                       <f:param name="addressbookId" value="#{addressbook.addressbookId}" />
+                                                                       <h:outputText id="addressbookEntries" value="#{addressbookController.allEntriesSize(addressbook)}" title="#{msg.ADDRESSBOOK_TOTAL_ENTRIES_TITLE}" />
+                                                               </h:link>
+                                                       </h:column>
+
+                                                       <h:column>
+                                                               <f:facet name="header">#{msg.ADDRESSBOOK_CREATED}</f:facet>
+
+                                                               <h:outputFormat id="addressbookCreated" value="#{addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
+                                                                       <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
+                                                               </h:outputFormat>
+                                                       </h:column>
+                                               </h:dataTable>
+                                       </div>
+
+                                       <div class="table_footer">
+                                               <h:link id="add_first_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_FIRST_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks() == false}" />
+                                               <h:link id="add_additional_addressbook" outcome="login_add_addressbook" value="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK}" title="#{msg.LINK_LOGIN_ADD_ADDITIONAL_ADDRESSBOOK_TITLE}" rendered="#{addressbookController.hasCreatedAddressbooks()}" />
+                                       </div>
+                               </div>
+                       </h:outputText>
+
+                       <h:outputText rendered="#{not userLoginController.isUserLoggedIn()}">
+                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                       </h:outputText>
+               </ui:define>
+       </ui:composition>
+</html>
index e42c555fdb1a25dad37bb18457fd9e61899923ba..a98fbcbeda3588bc3eed342f70dc154ffb0dd895 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
                                <ui:include id="message_box" src="/WEB-INF/templates/generic/message_box.tpl">
                                        <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
                                </ui:include>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                       <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
                        </ui:fragment>
                </ui:define>
index aaaafb9349c8e1e737b370d3cee1514fbe2c4b6e..86df2feb92e7c9698d855dc217a9314448bb572f 100644 (file)
@@ -8,7 +8,7 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
-       <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_PRIVACY}</ui:define>
 
                <ui:define name="content_header">
index 3c66fbbd5edd7d57a0d4928a7135ebb9c7208d15..f46e4cf89ad6c82323bcf858507a284e72adf96b 100644 (file)
@@ -8,7 +8,7 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
-       <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
                <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_TERMS}</ui:define>
 
                <ui:define name="content_header">
diff --git a/web/user/show_addressbook.xhtml b/web/user/show_addressbook.xhtml
new file mode 100644 (file)
index 0000000..3b02ff9
--- /dev/null
@@ -0,0 +1,56 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core">
+
+       <f:metadata>
+               <f:viewParam id="addressbookId" name="addressbookId" value="#{addressbookController.addressbookId}" required="true" requiredMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_MISSING}" converterMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_INVALID}" validatorMessage="#{msg.PARAMETER_ADDRESSBOOK_ID_NOT_FOUND}">
+                       <f:convertNumber for="addressbookId" type="number" minIntegerDigits="1" maxIntegerDigits="20" />
+                       <f:validator for="addressbookId" validatorId="AddressbookIdValidator" />
+               </f:viewParam>
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_USER_SHOW_ADDRESSBOOK}</ui:define>
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_SHOW_ADDRESSBOOK}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_USER_SHOW_ADDRESSBOOK}
+               </ui:define>
+
+               <ui:define name="content">
+                       <h:panelGrid headerClass="table_header" styleClass="table" columns="2" rendered="#{addressbookController.loadAddressbook()}">
+                               <f:facet name="header">#{msg.TABLE_HEADER_SHOW_ADDRESSBOOK}</f:facet>
+
+                               <h:outputLabel for="addressbookName" class="table_label">#{msg.ADDRESSBOOK_NAME}</h:outputLabel>
+                               <h:outputText id="addressbookName" value="#{addressbookController.addressbookName}" />
+
+                               <h:outputLabel for="userProfileLink" class="table_label">#{msg.ADDRESSBOOK_OWNER}</h:outputLabel>
+                               <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
+                                       <ui:param name="user" value="#{addressbookController.addressbookUser}" />
+                               </ui:include>
+
+                               <h:outputLabel for="addressbookCreated" class="table_label">#{msg.ADDRESSBOOK_CREATED}</h:outputLabel>
+                               <h:outputFormat id="addressbookCreated" value="#{addressbookController.addressbook.addressbookCreated.time}" title="#{msg.ADDRESSBOOK_CREATED_TITLE}">
+                                       <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
+                               </h:outputFormat>
+
+                               <h:outputLabel for="addressbookStatus" class="table_label">#{msg.ADDRESSBOOK_STATUS}</h:outputLabel>
+                               <h:outputText id="addressbookStatus" value="#{msg[addressbookController.addressbook.addressbookStatus.messageKey]}" title="#{msg.ADDRESSBOOK_STATUS_TITLE}" />
+
+                               <f:facet name="footer">
+                                       <h:outputText id="ownProfileInvible" class="notice" value="#{msg.USER_NOT_LOGGED_IN}" rendered="#{not userLoginController.isUserLoggedIn()}" />
+                                       <h:outputText id="ownProfileInvible" class="notice" value="#{msg.LOGIN_OWN_PROFILE_INVISIBLE}" rendered="#{userLoginController.isUserLoggedIn() and userLoginController.isInvisible()}" />
+
+                                       <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and not userLoginController.isInvisible()}">
+                                               <h:outputText value="Bla bla" rendered="#{addressbookController.isOtherAddressbook()}" />
+                                       </ui:fragment>
+                               </f:facet>
+                       </h:panelGrid>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/user/user_list.xhtml b/web/user/user_list.xhtml
new file mode 100644 (file)
index 0000000..64b21a7
--- /dev/null
@@ -0,0 +1,39 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core">
+
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_USER_LIST}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_USER_LIST}
+               </ui:define>
+
+               <ui:define name="content">
+                       <div class="table_big">
+                               <div class="table_header">
+                                       #{msg.TABLE_HEADER_USER_LIST}
+                               </div>
+
+                               <h:dataTable id="userList" var="user" value="#{adminUserController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{adminUserController.isVisibleUserFound()}">
+                                       <h:column>
+                                               <f:facet name="header">#{msg.USER_NAME}</f:facet>
+                                               <ui:include src="/WEB-INF/templates/generic/user_profile_link.tpl">
+                                                       <ui:param name="user" value="#{user}" />
+                                               </ui:include>
+                                       </h:column>
+
+                                       <h:column>
+                                               <f:facet name="header">#{msg.USER_CREATED}</f:facet>
+                                               <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+                                       </h:column>
+                               </h:dataTable>
+                       </div>
+               </ui:define>
+       </ui:composition>
+</html>
diff --git a/web/user/user_profile.xhtml b/web/user/user_profile.xhtml
new file mode 100644 (file)
index 0000000..fe0a4ef
--- /dev/null
@@ -0,0 +1,48 @@
+<?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
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       xmlns="http://www.w3.org/1999/xhtml"
+         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
+         xmlns:h="http://xmlns.jcp.org/jsf/html"
+         xmlns:f="http://xmlns.jcp.org/jsf/core"
+         xmlns:c="http://xmlns.jcp.org/jsp/jstl/core">
+
+       <f:metadata>
+               <f:viewParam id="userId" name="userId" value="#{userController.userId}" required="true" requiredMessage="#{msg.PARAMETER_USER_ID_MISSING}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" validatorMessage="#{msg.PARAMETER_USER_ID_NOT_FOUND}">
+                       <f:convertNumber for="userId" type="number" minIntegerDigits="1" maxIntegerDigits="20" />
+                       <f:validator for="userId" validatorId="UserIdValidator" />
+               </f:viewParam>
+       </f:metadata>
+
+       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
+               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_PROFILE}</ui:define>
+               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_USER_PROFILE}</ui:define>
+
+               <ui:define name="content_header">
+                       #{msg.CONTENT_TITLE_INDEX_USER_PROFILE}
+               </ui:define>
+
+               <ui:define name="content">
+                       <c:choose>
+                               <c:when test="#{userController.isUserIdEmpty()}">
+                                       <ui:include src="/WEB-INF/templates/generic/userid_error.tpl" />
+                               </c:when>
+
+                               <c:when test="#{profileController.isProfileLinkVisibleById(userController.userId)}">
+                                       <div align="center">
+                                               <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
+                                                       <f:facet name="header">
+                                                               #{msg.PUBLIC_USER_PROFILE}
+                                                       </f:facet>
+                                               </h:panelGrid>
+                                       </div>
+                               </c:when>
+
+                               <c:otherwise>
+                                       #{msg.ERROR_PROFILE_NOT_VISIBLE}
+                               </c:otherwise>
+                       </c:choose>
+               </ui:define>
+       </ui:composition>
+</html>