]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
New "feature" controller introduced: (please cherry-pick this)
authorRoland Häder <roland@mxchange.org>
Fri, 10 Jun 2016 10:03:45 +0000 (12:03 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 28 Jul 2016 18:51:26 +0000 (20:51 +0200)
- no more tons of separate and same-looking methods, just one central and very flexible method isFeatureEnabled()
- renamed all context parameters
- added features "imprint", "terms" and "privacy"

Signed-off-by: Roland Häder <roland@mxchange.org>
33 files changed:
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaAdminContactWebRequestBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/contact/PizzaContactWebSessionController.java
src/java/org/mxchange/pizzaapplication/beans/email_address/PizzaEmailChangeWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java [new file with mode: 0644]
src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/login/PizzaUserLoginWebSessionController.java
src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionBean.java
src/java/org/mxchange/pizzaapplication/beans/register/PizzaUserRegisterWebSessionController.java
src/java/org/mxchange/pizzaapplication/beans/user/PizzaUserWebSessionBean.java
web/WEB-INF/templates/generic/gender_selection_box.tpl
web/WEB-INF/templates/guest/guest_base.tpl
web/WEB-INF/templates/guest/guest_footer.tpl
web/WEB-INF/templates/guest/guest_menu.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl
web/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl
web/WEB-INF/templates/login/user/user_menu.tpl
web/WEB-INF/web.xml
web/admin/user/admin_user_export.xhtml
web/admin/user/admin_user_show.xhtml
web/customer/empty_basket.xhtml
web/guest/user/login.xhtml
web/guest/user/lost_passwd.xhtml
web/guest/user/register.xhtml
web/guest/user/register_page2.xhtml
web/guest/user/user_list.xhtml
web/imprint.xhtml
web/privacy.xhtml
web/terms.xhtml
web/user/login_change_email_address.xhtml
web/user/login_change_password.xhtml
web/user/login_change_personal_data.xhtml
web/user/login_contact_data_saved.xhtml

index 8d1552c4a902747b82624b259ee763cd6f4c89c1..492105b43b0bd71e3394d6ca5b1b7cbefb38ea1c 100644 (file)
@@ -596,6 +596,17 @@ public class PizzaAdminContactWebRequestBean extends BasePizzaController impleme
                this.contactId = contactId;
        }
 
+       @Override
+       public String getControllerType () {
+               return "admin"; //NOI18N
+       }
+
+       @Override
+       @Deprecated
+       public void setControllerType (final String controllerType) {
+               throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
+       }
+
        @Override
        public Country getCountry () {
                return this.country;
index 5d6be6d9dae0d90fcdf92be6c107a2e0635c1ba7..eb3df7bd585c40e25a19ca533bbec1551c448934 100644 (file)
@@ -230,6 +230,9 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
 
        @Override
        public void afterAdminAddedContact (@Observes final AdminAddedContactEvent event) {
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedContact(): event={0} - CALLED!", event)); //NOI18N
+
                // The event must be valid
                if (null == event) {
                        // Throw NPE
@@ -255,6 +258,20 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
        @Override
        public void afterAdminAddedCustomer (@Observes final AdminAddedCustomerEvent event) {
                // The event must be valid
+
+               // Call other method
+               this.selectableContacts.add(event.getAddedContact());
+
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminAddedContact(): EXIT!"); //NOI18N
+       }
+
+       @Override
+       public void afterAdminAddedUserEvent (@Observes final AdminAddedUserEvent event) {
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminAddedUserEvent(): event={0} - CALLED!", event)); //NOI18N
+
+               // event should not be null
                if (null == event) {
                        // Throw NPE
                        throw new NullPointerException("event is null"); //NOI18N
@@ -274,6 +291,9 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
 
                // Call other method
                this.contactList.add(event.getAddedCustomer().getCustomerContact());
+
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminAddedUserEvent(): EXIT!"); //NOI18N
        }
 
        @Override
@@ -300,13 +320,13 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
                this.clear();
 
                // Trace message
-               //* NOISY-DEBUG: */ System.out.println("UserWebBean:afterAdminAddedUserEvent: EXIT!"); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminAddedUserEvent(): EXIT!"); //NOI18N
        }
 
        @Override
        public void afterAdminUpdatedContactDataEvent (@Observes final AdminUpdatedContactEvent event) {
                // Trace message
-               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterAdminUpdatedContactDataEvent: event={0} - CALLED!", event)); //NOI18N
+               //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("contactController.afterAdminUpdatedContactDataEvent(): event={0} - CALLED!", event)); //NOI18N
 
                // event should not be null
                if (null == event) {
@@ -347,6 +367,9 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
 
                // Add email address to list
                this.emailAddressList.add(event.getUpdatedContact().getContactEmailAddress());
+
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println("contactController.afterAdminUpdatedContactDataEvent(): EXIT!"); //NOI18N
        }
 
        @Override
@@ -374,7 +397,6 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
 
                // Debug message
                //* NOISY-DEBUG: */ System.out.println(MessageFormat.format("ContactWebBean:afterRegistration: registeredContact={0}", registeredContact)); //NOI18N
-
                // Copy all data from registered->user
                this.copyContact(registeredContact);
 
@@ -429,6 +451,9 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
 
                // Add contact to list
                this.contactList.add(contact);
+
+               // Trace message
+               //* NOISY-DEBUG: */ System.out.println("ContactWebBean:afterAdminUpdatedContactDataEvent: EXIT!"); //NOI18N
        }
 
        @Override
@@ -662,6 +687,17 @@ public class PizzaContactWebSessionBean extends BasePizzaController implements P
                this.comment = comment;
        }
 
+       @Override
+       public String getControllerType () {
+               return "general"; //NOI18N
+       }
+
+       @Override
+       @Deprecated
+       public void setControllerType (final String controllerType) {
+               throw new UnsupportedOperationException("Setting controller type is not supported."); //NOI18N
+       }
+
        @Override
        public Country getCountry () {
                return this.country;
index ddb6a55f4e0c2b1ca0f790649fb05c9c1769f263..fd7678135d0e419d35e89ff2aee6204a89cb1ef2 100644 (file)
@@ -430,6 +430,22 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        void setZipCode (final Integer zipCode);
 
+       /**
+        * Getter for controller type
+        * <p>
+        * @return controller type
+        */
+       String getControllerType ();
+
+       /**
+        * Setter for controller type
+        * <p>
+        * @param controllerType Controller type
+        * @deprecated Don't use this method.
+        */
+       @Deprecated
+       void setControllerType (final String controllerType);
+
        /**
         * Checks whether contact instance's email address is used
         * <p>
@@ -468,4 +484,12 @@ public interface PizzaContactWebSessionController extends Serializable {
         */
        String doChangePersonalContactData ();
 
+       /**
+        * Returns a list of all selectable contacts for user creation. Contacts
+        * from already existing users are excluded in this list.
+        * <p>
+        * @return A list of all selectable contacts
+        */
+       List<Contact> selectableContacts ();
+
 }
index a783581ab9aed4b4cd22510243224d6d5986c5ba..a72fbd55dad47496a731fb14a7c24a9b41928de5 100644 (file)
@@ -34,6 +34,7 @@ import org.mxchange.jusercore.model.email_address.EmailAddressChange;
 import org.mxchange.jusercore.model.email_address.EmailChangeSessionBeanRemote;
 import org.mxchange.jusercore.model.user.User;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
+import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController;
 
 /**
@@ -70,6 +71,12 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
         */
        private final EmailChangeSessionBeanRemote emailBean;
 
+       /**
+        * Features controller
+        */
+       @Inject
+       private PizzaFeaturesWebApplicationController featureController;
+
        /**
         * Login bean (controller)
         */
@@ -112,6 +119,9 @@ public class PizzaEmailChangeWebSessionBean extends BasePizzaController implemen
                        // Password not matching
                        this.showFacesMessage("login_change_email_address_form:currentPassword", new UserPasswordMismatchException(this.loginController.getLoggedInUser())); //NOI18N
                        return ""; //NOI18N
+               } else if (!this.featureController.isFeatureEnabled("edit_user_data")) { //NOI18N
+                       // Editing is not allowed
+                       throw new IllegalStateException("User tried to edit personal data"); //NOI18N
                }
 
                // Get user instance
diff --git a/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java b/src/java/org/mxchange/pizzaapplication/beans/features/PizzaFeaturesWebApplicationController.java
new file mode 100644 (file)
index 0000000..05892d0
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2016 Cho-Time GmbH
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.pizzaapplication.beans.features;
+
+import java.io.Serializable;
+import javax.ejb.Local;
+
+/**
+ * An interface for country beans
+ * <p>
+ * @author Roland Haeder<rhaeder@cho-time.de>
+ */
+@Local
+public interface PizzaFeaturesWebApplicationController extends Serializable {
+
+       /**
+        * Checks if given feature is enabled.
+        * <p>
+        * @param feature Feature to be checked
+        * <p>
+        * @return Whether given feature is enabled
+        */
+       boolean isFeatureEnabled (final String feature);
+
+}
index d11bf289d20fce99477b1df0738bb66f9a5a6592..f3df1d725b81d1a1f041e4ed64f107b114d4290e 100644 (file)
@@ -220,11 +220,6 @@ public class PizzaUserLoginWebSessionBean extends BasePizzaController implements
                return UserUtils.ifPasswordMatches(container, this.getLoggedInUser());
        }
 
-       @Override
-       public boolean isGuest () {
-               return (!this.isUserLoggedIn());
-       }
-
        @Override
        public boolean isInvisible () {
                // Check on login
index f7ff64159853dc677d960c7e5860b85766aaada1..6164051a9a07d52b3bebc16bf6314f8d54260802 100644 (file)
@@ -68,13 +68,6 @@ public interface PizzaUserLoginWebSessionController extends Serializable {
         */
        boolean isUserLoggedIn ();
 
-       /**
-        * Is this truly a guest?
-        * <p>
-        * @return Whether the user is truly a guest
-        */
-       boolean isGuest ();
-
        /**
         * Whether the currently logged-in user is invisible
         * <p>
@@ -103,4 +96,5 @@ public interface PizzaUserLoginWebSessionController extends Serializable {
         * @return If current password matches
         */
        boolean ifCurrentPasswordMatches ();
+
 }
index 72cf1eb58e8e939812d3c100d9b0e214dc2b625e..748ad89ed26de56bbe692aeb06112be2bf4d2deb 100644 (file)
@@ -20,7 +20,6 @@ import java.text.MessageFormat;
 import javax.enterprise.context.SessionScoped;
 import javax.enterprise.event.Event;
 import javax.enterprise.inject.Any;
-import javax.faces.context.FacesContext;
 import javax.faces.view.facelets.FaceletException;
 import javax.inject.Inject;
 import javax.inject.Named;
@@ -41,6 +40,7 @@ import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.status.UserAccountStatus;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController;
+import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.user.PizzaAdminUserWebRequestController;
 import org.mxchange.pizzaapplication.beans.user.PizzaUserWebSessionController;
 
@@ -70,6 +70,12 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
        @Inject
        private PizzaContactWebSessionController contactController;
 
+       /**
+        * Features controller
+        */
+       @Inject
+       private PizzaFeaturesWebApplicationController featureController;
+
        /**
         * Reemote register session bean
         */
@@ -106,6 +112,12 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
 
        @Override
        public String doFinishRegistration () {
+               // Is registration enabled?
+               if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
+                       // Is not enabled
+                       throw new FaceletException("Registration is disabled."); //NOI18N
+               }
+
                // Get user instance
                User user = this.userController.createUserInstance();
 
@@ -116,7 +128,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
                } else if (!this.userController.isRequiredPersonalDataSet()) {
                        // Not all required fields are set
                        throw new FaceletException("Not all required fields are set."); //NOI18N
-               } else if ((this.userController.isUserNameRequired()) && (this.userController.isUserNameRegistered(user))) {
+               } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
                } else if (this.contactController.isEmailAddressRegistered(user.getUserContact())) {
@@ -174,6 +186,12 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
 
        @Override
        public String doRegisterMultiPage1 () {
+               // Is registration enabled?
+               if (!this.featureController.isFeatureEnabled("user_registration")) { //NOI18N
+                       // Is not enabled
+                       throw new FaceletException("Registration is disabled."); //NOI18N
+               }
+
                // Get user instance
                User user = this.userController.createUserInstance();
 
@@ -181,7 +199,7 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
                if (null == user) {
                        // user must be set
                        throw new NullPointerException("user is null after createUserInstance() was called"); //NOI18N
-               } else if ((this.userController.isUserNameRequired()) && (this.userController.isUserNameRegistered(user))) {
+               } else if ((this.featureController.isFeatureEnabled("user_name_required")) && (this.userController.isUserNameRegistered(user))) { //NOI18N
                        // User name is already used
                        throw new FaceletException(new UserNameAlreadyRegisteredException(user));
                } else if (!this.contactController.isSameEmailAddressEntered()) {
@@ -206,28 +224,4 @@ public class PizzaUserRegisterWebSessionBean extends BasePizzaController impleme
                return "register_page2"; //NOI18N
        }
 
-       @Override
-       public boolean isMultiplePageEnabled () {
-               // Get context parameter
-               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_multi_register_page"); //NOI18N
-
-               // Is it set?
-               boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
-
-               // Return value
-               return isEnabled;
-       }
-
-       @Override
-       public boolean isResendConfirmationLinkEnabled () {
-               // Get context parameter
-               String contextParameter = FacesContext.getCurrentInstance().getExternalContext().getInitParameter("is_resend_confirm_link_enabled"); //NOI18N
-
-               // Is it set?
-               boolean isEnabled = ((contextParameter instanceof String) && (contextParameter.toLowerCase().equals("true"))); //NOI18N
-
-               // Return value
-               return isEnabled;
-       }
-
 }
index fdd0d7bcb7b445cc944b09c27f5288e26e995658..21e10684add8c1461eda4209b7c8f96dd63fbfd1 100644 (file)
@@ -42,18 +42,4 @@ public interface PizzaUserRegisterWebSessionController extends Serializable {
         */
        String doRegisterMultiPage1 ();
 
-       /**
-        * Checks wether multi-page or single-page registration is active
-        * <p>
-        * @return Whether multi (true) or single page (false) is active
-        */
-       boolean isMultiplePageEnabled ();
-
-       /**
-        * Checks whether the "resend confirmation link" feature is enabled
-        * <p>
-        * @return Whether "resend confirmation link" is enabled
-        */
-       boolean isResendConfirmationLinkEnabled ();
-
 }
index e6f7f012d8ab9f90261d239dbbd4e724a718be40..9f105bc4b2b227935551dd04dc31347e403a79bd 100644 (file)
@@ -53,9 +53,9 @@ import org.mxchange.jusercore.model.user.UserUtils;
 import org.mxchange.jusercore.model.user.profilemodes.ProfileMode;
 import org.mxchange.pizzaapplication.beans.BasePizzaController;
 import org.mxchange.pizzaapplication.beans.contact.PizzaContactWebSessionController;
+import org.mxchange.pizzaapplication.beans.features.PizzaFeaturesWebApplicationController;
 import org.mxchange.pizzaapplication.beans.localization.PizzaLocalizationSessionController;
 import org.mxchange.pizzaapplication.beans.login.PizzaUserLoginWebSessionController;
-import org.mxchange.pizzaapplication.beans.register.PizzaUserRegisterWebSessionController;
 
 /**
  * A user bean (controller)
@@ -83,28 +83,16 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz
        private PizzaContactWebSessionController contactController;
 
        /**
-        * Localization controller
-        */
-       @Inject
-       private PizzaLocalizationSessionController localizationController;
-
-       /**
-        * Login bean (controller)
+        * Features controller
         */
        @Inject
-       private PizzaUserLoginWebSessionController loginController;
+       private PizzaFeaturesWebApplicationController featureController;
 
        /**
-        * Registration controller
+        * Localization controller
         */
        @Inject
-       private PizzaUserRegisterWebSessionController
-       registerController;
-
-       /**
-        * A list of all selectable contacts
-        */
-       private List<Contact> selectableContacts;
+       private PizzaLocalizationSessionController localizationController;
 
        /**
         * Event being fired when user updated personal data
@@ -456,7 +444,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz
                user.setUserProfileMode(this.getUserProfileMode());
 
                // Is multiple registration page
-               if (!this.registerController.isMultiplePageEnabled()) {
+               if ((createContactData) || (!this.featureController.isFeatureEnabled("user_register_multiple_page"))) { //NOI18N
                        // Create contact instance
                        Contact contact = this.contactController.createContactInstance();
 
@@ -512,7 +500,10 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz
                        throw new FaceletException("Not all required fields are set."); //NOI18N
                } else if (!this.loginController.ifCurrentPasswordMatches()) {
                        // Password not matching
-                       throw new FaceletException(new UserPasswordMismatchException(this.loginController.getLoggedInUser()));
+                       throw new FaceletException(new UserPasswordMismatchException(this.userLoginController.getLoggedInUser()));
+               } else if (!this.featureController.isFeatureEnabled("edit_user_data")) {
+                       // Editing is not allowed
+                       throw new IllegalStateException("User tried to edit personal data"); //NOI18N
                }
 
                // Get user instance
@@ -716,7 +707,7 @@ public class PizzaUserWebSessionBean extends BasePizzaController implements Pizz
 
        @Override
        public boolean isRequiredPersonalDataSet () {
-               if (this.registerController.isMultiplePageEnabled()) {
+               if (this.featureController.isFeatureEnabled("user_register_multiple_page")) { //NOI18N
                        // Multiple registration page
                        return this.contactController.isRequiredPersonalDataSet();
                } else {
index 6134e37c1e57125ee7669dc79474a6c0187ff185..dfa9efcb4f43000e18e5e5e0482033368c01b13c 100644 (file)
@@ -6,7 +6,7 @@
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
 
        <ui:fragment rendered="#{not empty targetController}">
-               <h:selectOneMenu styleClass="select" id="gender" value="#{targetController.gender}" required="true" requiredMessage="#{msg.FIELD_GENDER_REQUIRED}">
+               <h:selectOneMenu styleClass="select" id="gender" value="#{targetController.gender}" required="#{featureController.isFeatureEnabled(targetController.controllerType + '_gender')}" requiredMessage="#{msg.FIELD_GENDER_REQUIRED}">
                        <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" noSelectionOption="true" />
                        <f:selectItems value="#{genderController.selectableGenders}" var="gender" itemValue="#{gender}" itemLabel="#{msg[gender.messageKey]}" />
                </h:selectOneMenu>
index 426b3b818b297f6db0d03dc6962e0ec7c13155d0..77ae70e93c874ee8ae18ffd65adadb72bbea8898 100644 (file)
@@ -9,7 +9,9 @@
        </ui:define>
 
        <ui:define name="menu">
-               <ui:include src="/WEB-INF/templates/guest/guest_menu.tpl" />
+               <ui:fragment rendered="#{featureController.isFeatureEnabled('guest_menu')}">
+                       <ui:include src="/WEB-INF/templates/guest/guest_menu.tpl" />
+               </ui:fragment>
        </ui:define>
 
        <!--
index 30b4b95f869a4ccead2208ee4d33d04829e4283e..5fffa6f7bc22597a555a2461104b6a218db6b096 100644 (file)
                                <h:link outcome="index" title="#{msg.LINK_GUEST_HOME_TITLE}" value="#{msg.LINK_GUEST_HOME}" />
                        </li>
 
-                       <li class="footer_link">
-                               <h:link outcome="user_resend_link" title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" value="#{msg.LINK_GUEST_RESEND_LINK}" />
-                       </li>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+                               <li class="footer_link">
+                                       <h:link outcome="user_resend_link" title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" value="#{msg.LINK_GUEST_RESEND_LINK}" />
+                               </li>
+                       </ui:fragment>
 
-                       <li class="footer_link">
-                               <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
-                       </li>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('imprint')}">
+                               <li class="footer_link">
+                                       <h:link outcome="imprint" title="#{msg.LINK_GUEST_IMPRINT_TITLE}" value="#{msg.LINK_GUEST_IMPRINT}" />
+                               </li>
+                       </ui:fragment>
 
-                       <li class="footer_link">
-                               <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
-                       </li>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('terms')}">
+                               <li class="footer_link">
+                                       <h:link outcome="terms" title="#{msg.LINK_GUEST_TERMS_TITLE}" value="#{msg.LINK_GUEST_TERMS}" />
+                               </li>
+                       </ui:fragment>
 
-                       <li class="footer_link">
-                               <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
-                       </li>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('privacy')}">
+                               <li class="footer_link">
+                                       <h:link outcome="privacy" title="#{msg.LINK_GUEST_PRIVACY_TITLE}" value="#{msg.LINK_GUEST_PRIVACY}" />
+                               </li>
+                       </ui:fragment>
 
                        <li class="footer_copyright">Copyright (c) 2016 by Roland Häder</li>
                </ul>
index 90c55dc9b608d26d146a93fd12ee25c93472b173..a4a41902f6df679f84fe0148958bf13f0869100f 100644 (file)
                        </div>
 
                        <ul>
-                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                        <li>
                                                <h:link title="#{msg.LINK_GUEST_LOGIN_TITLE}" outcome="user_login" value="#{msg.LINK_GUEST_LOGIN}" />
                                        </li>
                                </ui:fragment>
 
-                               <li>
-                                       <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
-                               </li>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_GUEST_REGISTER_TITLE}" outcome="user_register" value="#{msg.LINK_GUEST_REGISTER}" />
+                                       </li>
+                               </ui:fragment>
 
-                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
                                        <li>
                                                <h:link title="#{msg.LINK_GUEST_PASSWORD_TITLE}" outcome="user_lost_passwd" value="#{msg.LINK_GUEST_PASSWORD}" />
                                        </li>
                                </ui:fragment>
 
-                               <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
                                        <li>
                                                <h:link title="#{msg.LINK_GUEST_RESEND_LINK_TITLE}" outcome="user_resend_link" value="#{msg.LINK_GUEST_RESEND_LINK}" />
                                        </li>
index 465fc01f785cdbcb0a6f50fce396303af1ffc52d..42a0d45240c7f019f952d9c7305f5aa3f7eb1153 100644 (file)
@@ -18,7 +18,7 @@
                                                <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
                                        </legend>
 
-                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <div class="table_row">
                                                        <div class="table_left">
                                                                <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
@@ -34,7 +34,7 @@
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
-                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <div class="para"></div>
 
                                                <div class="table_row">
index d26fd581dcb9a1f1b79c28419c4f79ad02a5ae71..e3e3b3a81f18bc6b3f06a29110db8c0565fd9ce1 100644 (file)
@@ -19,7 +19,7 @@
                                                <h:outputText value="#{msg.GUEST_REGISTRATION_EMAIL_LEGEND}" />
                                        </legend>
 
-                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <div class="table_row">
                                                        <div class="table_left">
                                                                <h:outputLabel for="userName" value="#{msg.GUEST_REGISTRATION_ENTER_USER_NAME}" />
@@ -35,7 +35,7 @@
 
                                        <ui:include src="/WEB-INF/templates/guest/guest_email_address_repeat_fields.tpl" />
 
-                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <div class="para"></div>
 
                                                <div class="table_row">
index 2b75d5a24fa221a5b9e2c8ff40ed169d71386cf5..d6e8c5e08f623a1c94bb01dad6f931feb080a8ab 100644 (file)
                                <li>
                                        <h:link title="#{msg.LINK_USER_LIST_TITLE}" outcome="user_list" value="#{msg.LINK_USER_LIST}" />
                                </li>
-                       </ul>
-
-                       <div class="menu_header">
-                               <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
-                       </div>
 
-                       <ul>
-                               <li>
-                                       <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="user_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
-                               </li>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_list')}">
+                                       <li>
+                                               <h:link title="#{msg.LINK_USER_LIST_TITLE}" outcome="user_list" value="#{msg.LINK_USER_LIST}" />
+                                       </li>
+                               </ui:fragment>
                        </ul>
 
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                               <div class="menu_header">
+                                       <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
+                               </div>
+
+                               <ul>
+                                       <li>
+                                               <h:link title="#{msg.LINK_LOGIN_EDIT_USER_DATA_TITLE}" outcome="user_edit_user_data" value="#{msg.LINK_LOGIN_EDIT_USER_DATA}" />
+                                       </li>
+                               </ul>
+                       </ui:fragment>
+
                        <div class="menu_header">
                                <h:outputText value="#{msg.MENU_LOGOUT_TITLE}" />
                        </div>
index 710ed1c1434ecec9b0ef80b25d0649a3b4908a22..f0c362adb91cda5a42d6f6e716797c4ffc6d244f 100644 (file)
@@ -3,32 +3,78 @@
     <description>An online address book application to share private and business memebers between all members. It is also possible that the user's profile can be made visible to outside.</description>
     <display-name>JLandingPage Application v1.0</display-name>
     <context-param>
-        <description>Whether debug mode is for registration controller enabled.</description>
-        <param-name>is_debug_register_enabled</param-name>
+        <description>Whether the multi-page registration page or a single registration page is active</description>
+        <param-name>is_feature_user_register_multiple_page</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether a user name is required for this application.</description>
+        <param-name>is_feature_user_name_required_enabled</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the public user profile is enabled.</description>
+        <param-name>is_public_profile_enabled</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>Whether the multi-page registration page or a single registration page is active</description>
-        <param-name>is_multi_register_page</param-name>
+        <description>Whether "resend confirmation link" is enabled.</description>
+        <param-name>is_feature_user_resend_confirm_link_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether default timezon is set from system's timezone</description>
+        <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <description>Whether a user name is required on registration</description>
-        <param-name>is_user_name_required</param-name>
+        <description>Whether registration page is enabled.</description>
+        <param-name>is_feature_user_registration_enabled</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>Whether the public user profile is enabled.</description>
-        <param-name>is_public_profile_enabled</param-name>
+        <description>Whether the guest menu is enabled/shown to the user.</description>
+        <param-name>is_feature_guest_menu_enabled</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether recovery of user passwords is enabled.</description>
+        <param-name>is_feature_user_password_recovery_enabled</param-name>
         <param-value>false</param-value>
     </context-param>
     <context-param>
-        <description>Whether "resend confirmation link" ius enabled.</description>
-        <param-name>is_resend_confirm_link_enabled</param-name>
+        <description>Wether the gender is required for using the general contact controller.</description>
+        <param-name>is_feature_general_gender_enabled</param-name>
         <param-value>true</param-value>
     </context-param>
     <context-param>
-        <param-name>javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE</param-name>
+        <description>Whether gender is required for administrative contact controller.</description>
+        <param-name>is_feature_admin_gender_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether users are allowed to edit their user data.</description>
+        <param-name>is_feature_user_edit_data_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether the user list is accessible and visible.</description>
+        <param-name>is_feature_user_list_enabled</param-name>
+        <param-value>false</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether imprint page is enabled.</description>
+        <param-name>is_feature_imprint_enabled</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether terms page is enabled.</description>
+        <param-name>is_feature_terms_enabled</param-name>
+        <param-value>true</param-value>
+    </context-param>
+    <context-param>
+        <description>Whether privacy page is enabled.</description>
+        <param-name>is_feature_privacy_enabled</param-name>
         <param-value>true</param-value>
     </context-param>
     <servlet>
index 26e95343a9261a58e32a910ffd5f611aff4aebc9..5c051974951f6e574759cff2a35f7d35a6888825 100644 (file)
@@ -28,7 +28,7 @@
                                                </h:link>
                                        </p:column>
 
-                                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                                <p:column>
                                                        <f:facet name="header">
                                                                <h:outputText value="#{msg.ADMIN_EXPORT_USER_NAME_TITLE}" />
index 7a8950d8ca2feb3acc728c3edc632104e93bcb7e..f8ff648e44211f3db70f05a91314938bec0b7b9a 100644 (file)
@@ -36,7 +36,7 @@
                                        <h:outputText id="userId" styleClass="data_field" value="#{beanHelper.user.userId}" />
                                </h:column>
 
-                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                        <h:column>
                                                <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" />
 
index cabf62d382b247e207853b0e96dae116a7c286ce..c27205a26cc17e962b532b1b83fe70d2f899071a 100644 (file)
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{registerController.isResendConfirmationLinkEnabled()}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}">
                                <h:form id="form_resend_link">
                                        <div class="table">
                                                <div class="table_header">
@@ -56,8 +56,8 @@
                                </h:form>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not registerController.isResendConfirmationLinkEnabled()}">
-                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" />
                        </ui:fragment>
                </ui:define>
        </ui:composition>
index d3c4227de983303409597b3d6c1935fb3e42ffba..7ea5697fa8d44f5d1e6c8ec616a9eea7481035a6 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
-                               <div class="para">
-                                       <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" />
-                                       <h:link id="user_register" outcome="user_register" title="#{msg.LINK_GUEST_USER_NO_ACCOUNT_TITLE}" value="#{msg.LINK_GUEST_USER_NO_ACCOUNT_YET}" />
-                               </div>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+                                       <div class="para">
+                                               <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" />
+                                               <h:outputText value="&#160;" />
+                                               <h:link id="user_register" outcome="user_register" title="#{msg.LINK_GUEST_USER_NO_ACCOUNT_TITLE}" value="#{msg.LINK_GUEST_USER_NO_ACCOUNT_YET}" />
+                                       </div>
+                               </ui:fragment>
 
                                <div class="para">
                                        <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" />
                                </div>
 
-                               <div class="para">
-                                       <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
-                               </div>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
+                                       <div class="para">
+                                               <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" />
+                                       </div>
+                               </ui:fragment>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required')}">
                                <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" />
                        </ui:fragment>
                </ui:define>
index 24474074bed518feac469c5244fb8ac43fd060b5..267b61f02c220382490d75500c0bcfa45ba6f171 100644 (file)
@@ -15,7 +15,7 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}">
                                <div class="para" id="user_lost_password_content">
                                        <h:form id="lost_password_form">
                                                <div class="table">
@@ -67,7 +67,7 @@
                                </div>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not userController.isUserNameRequired()}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required') or not featureController.isFeatureEnabled('user_password_recovery')}">
                                <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" />
                        </ui:fragment>
                </ui:define>
index c71ad8812ed73d7c697611ac11b7d56cb8a8bdb5..2ee42d82190bb63490b99e53e2604387553852fe 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isUserNameRequired()}">
-                               <div class="para">
-                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
-                                       <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
-                                       #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                                       <div class="para">
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
+                                               <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
+                                               #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}
+                                       </div>
+                               </ui:fragment>
+
+                               <div class="registration_form">
+                                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}">
+                                               <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" />
+                                       </ui:fragment>
+
+                                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}">
+                                               <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl" />
+                                       </ui:fragment>
                                </div>
                        </ui:fragment>
 
-                       <div class="registration_form">
-                               <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
-                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" />
-                               </ui:fragment>
-
-                               <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
-                                       <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_single.tpl" />
-                               </ui:fragment>
-                       </div>
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration')}">
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" />
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 1b00e64ae18612bed9fbc834cf2ea7efb01fa09e..e00f554292871dae0f97309a4535b6dea1f78d35 100644 (file)
@@ -15,8 +15,8 @@
                </ui:define>
 
                <ui:define name="content">
-                       <ui:fragment rendered="#{registerController.isMultiplePageEnabled()}">
-                               <ui:fragment rendered="#{userController.isUserNameRequired()}">
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}">
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
                                        <div class="para">
                                                #{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}
                                                <h:link outcome="user_login" value="#{msg.CLICK_HERE}" />
@@ -29,7 +29,7 @@
                                </div>
                        </ui:fragment>
 
-                       <ui:fragment rendered="#{not registerController.isMultiplePageEnabled()}">
+                       <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}">
                                <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" />
                        </ui:fragment>
                </ui:define>
index 5284b2c430b37d404247106c63eb883c1254f438..ba5819161505825c39b18cb599a37e77ad096284 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       <div class="table_big">
-                               <div class="table_header">
-                                       #{msg.TABLE_HEADER_USER_LIST}
-                               </div>
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('user_list')}">
+                               <div class="table_big">
+                                       <div class="table_header">
+                                               <h:outputText value="#{msg.TABLE_HEADER_USER_LIST}" />
+                                       </div>
+
+                                       <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}">
+                                               <h:column>
+                                                       <f:facet name="header">#{msg.USER_NAME}</f:facet>
+                                                       <ui:include src="/WEB-INF/templates/user/user_profile_link.tpl">
+                                                               <ui:param name="user" value="#{user}" />
+                                                       </ui:include>
+                                               </h:column>
 
-                               <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}">
-                                       <h:column>
-                                               <f:facet name="header">#{msg.USER_NAME}</f:facet>
-                                               <ui:include src="/WEB-INF/templates/user/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>
 
-                                       <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>
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_USER_LIST_DISABLED}" rendered="#{featureController.isFeatureEnabled('user_list')}" />
                </ui:define>
        </ui:composition>
 </html>
index f3f6ca38156f64b4b9eaea71444aaaa6ac780a5e..5578d959b6887c86a8223dd782ef07e4e5149f59 100644 (file)
@@ -15,7 +15,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       TODO: Hier kommt das Impressum hin!
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('imprint')}">
+                               TODO: Hier kommt das Impressum hin!
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 805f59849a44d7fa5a2e03719611e0924e9d7c1f..6cb3893e450f283e5bf1d6c4fa700099c38ea754 100644 (file)
@@ -15,7 +15,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       Hier kommen die Datenschutzbestimmungen hin.
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('privacy')}">
+                               Hier kommen die Datenschutzbestimmungen hin.
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 2b34613f1b81016980bf5ad150c065ee12db037f..1e7acae567ecec8aa754ac663ca9a24f8c927758 100644 (file)
@@ -15,7 +15,9 @@
                </ui:define>
 
                <ui:define name="content">
-                       Hier kommen die allgemeinen Geschäftsbedingungen hin.
+                       <ui:fragment rendered="#{featureController.isFeatureEnabled('terms')}">
+                               Hier kommen die allgemeinen Geschäftsbedingungen hin.
+                       </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index c8d47e9d149a81329e969dcfc8ad8ab60c5f0988..8e86d06f3328671bd980edcc3b966e8bced78c96 100644 (file)
 
                <ui:define name="content">
                        <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                               <div class="table">
-                                       <div class="table_header">
-                                               <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
-                                       </div>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" />
+                                               </div>
 
-                                       <h:form id="login_change_email_address_form">
-                                               <div class="para">
-                                                       <fieldset id="change_email">
-                                                               <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
-                                                                       <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
-                                                               </legend>
+                                               <h:form id="login_change_email_address_form">
+                                                       <div class="para">
+                                                               <fieldset id="change_email">
+                                                                       <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}">
+                                                                               <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" />
+                                                                       </legend>
 
-                                                               <div class="table_row">
-                                                                       <div class="table_left">
-                                                                               <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" />
-                                                                       </div>
+                                                                       <div class="table_row">
+                                                                               <div class="table_left">
+                                                                                       <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" />
+                                                                               </div>
 
-                                                                       <div class="table_right">
-                                                                               <h:outputText value="#{contactController.emailAddress}" />
-                                                                       </div>
+                                                                               <div class="table_right">
+                                                                                       <h:outputText value="#{contactController.emailAddress}" />
+                                                                               </div>
 
-                                                                       <div class="clear"></div>
-                                                               </div>
+                                                                               <div class="clear"></div>
+                                                                       </div>
 
-                                                               <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
-                                                       </fieldset>
-                                               </div>
+                                                                       <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" />
+                                                               </fieldset>
+                                                       </div>
 
-                                               <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+                                                       <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" />
+                                               </h:form>
+                                       </div>
 
-                                               <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>
+                                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+                               </ui:fragment>
 
-                       <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
-                               <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
-                       </ui:fragment>
+                               <ui:fragment rendered="#{not loginController.isUserLoggedIn()}">
+                                       <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" />
+                               </ui:fragment>
                </ui:define>
        </ui:composition>
 </html>
index 1c8c6021d6a2bfe1c0b8eb29a10b19c276281e2c..dc24e90b644d204e916373d22210c63b78715bd6 100644 (file)
 
                <ui:define name="content">
                        <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                               <div class="table">
-                                       <div class="table_header">
-                                               <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" />
-                                       </div>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{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}">
+                                                                               <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" />
+                                                                       </legend>
+
+                                                                       <div class="table_row">
+                                                                               <div class="table_left">
+                                                                                       <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" />
+                                                                               </div>
 
                                        <h:form id="login_form">
                                                <div class="para">
 
                                                <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
 
-                                               <div class="table_footer">
-                                                       <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userController.changePassword()}" />
-                                               </div>
-                                       </h:form>
-                               </div>
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
                        </ui:fragment>
 
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
index b184daae45afcaf429dce241ae9ec4cfe0aaafac..85693ac4596b310c88e29d44850c4b0cfe01c4f2 100644 (file)
@@ -2,10 +2,10 @@
 <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: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/user/user_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_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>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                                       <div class="table">
+                                               <div class="table_header">
+                                                       <h:outputText value="#{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" />
+                                               <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/user/user_enter_current_password.tpl" />
+                                                       <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" />
 
-                                               <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
+                                                       <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" />
 
-                                               <div class="table_footer">
-                                                       <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                                       <h:commandButton styleClass="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
-                                               </div>
-                                       </h:form>
-                               </div>
+                                                       <div class="table_footer">
+                                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                                               <h:commandButton styleClass="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" />
+                                                       </div>
+                                               </h:form>
+                                       </div>
+                               </ui:fragment>
+
+                               <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
                        </ui:fragment>
 
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
index 262f86eff66e52a0fae74ffc27bc04c756de69fd..3fdb2d38db9617be5ce90bcac8052ee6775c25e1 100644 (file)
 
                <ui:define name="content">
                        <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}">
-                               <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
-                                       <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
-                               </ui:include>
+                               <ui:fragment rendered="#{featureController.isFeatureEnabled('edit_user_data')}">
+                                       <ui:include src="/WEB-INF/templates/generic/message_box.tpl">
+                                               <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" />
+                                       </ui:include>
+                               </ui:fragment>
+
                        </ui:fragment>
 
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
+
                        <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
                                <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" />
                        </ui:fragment>