- 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>
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;
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;
*/
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>
*/
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 ();
+
}
import org.mxchange.jcontacts.contact.Contact;
import org.mxchange.jcoreee.utils.FacesUtils;
import org.mxchange.jjobs.beans.BaseJobsController;
+import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
import org.mxchange.jusercore.exceptions.UserPasswordMismatchException;
import org.mxchange.jusercore.model.email_address.ChangeableEmailAddress;
*/
private final EmailChangeSessionBeanRemote emailBean;
+ /**
+ * Features controller
+ */
+ @Inject
+ private JobsFeaturesWebApplicationController featureController;
+
/**
* Login bean (controller)
*/
// Password not matching
this.showFacesMessage("form_login_change_email_address:currentPassword", new UserPasswordMismatchException(this.userLoginController.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
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;
import org.mxchange.jcoreee.utils.FacesUtils;
import org.mxchange.jjobs.beans.BaseJobsController;
import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
+import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController;
import org.mxchange.jjobs.beans.user.JobsUserWebSessionController;
import org.mxchange.jusercore.events.registration.RegisteredUserEvent;
@Inject
private JobsContactWebSessionController contactController;
+ /**
+ * Features controller
+ */
+ @Inject
+ private JobsFeaturesWebApplicationController featureController;
+
/**
* Reemote register session bean
*/
@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();
} 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())) {
@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();
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()) {
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;
- }
-
}
*/
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 ();
-
}
import org.mxchange.jcontacts.events.contact.add.AdminAddedContactEvent;
import org.mxchange.jjobs.beans.BaseJobsController;
import org.mxchange.jjobs.beans.contact.JobsContactWebSessionController;
+import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController;
import org.mxchange.jjobs.beans.localization.JobsLocalizationSessionController;
import org.mxchange.jjobs.beans.login.JobsUserLoginWebSessionController;
-import org.mxchange.jjobs.beans.register.JobsUserRegisterWebSessionController;
import org.mxchange.jusercore.events.confirmation.UserConfirmedAccountEvent;
import org.mxchange.jusercore.events.login.UserLoggedInEvent;
import org.mxchange.jusercore.events.registration.UserRegisteredEvent;
private JobsContactWebSessionController contactController;
/**
- * Localization controller
- */
- @Inject
- private JobsLocalizationSessionController localizationController;
-
- /**
- * Login bean (controller)
+ * Features controller
*/
@Inject
- private JobsUserLoginWebSessionController loginController;
+ private JobsFeaturesWebApplicationController featureController;
/**
- * Registration controller
+ * Localization controller
*/
@Inject
- private JobsUserRegisterWebSessionController registerController;
-
- /**
- * A list of all selectable contacts
- */
- private List<Contact> selectableContacts;
+ private JobsLocalizationSessionController localizationController;
/**
* Event being fired when user updated personal data
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();
@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 {
--- /dev/null
+/*
+ * 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);
+
+}
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>
</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>
<ui:define name="footer">
<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>
</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>
<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}" />
<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">
<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}" />
<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">
<li>
<h:link title="#{msg.LINK_USER_LIST_TITLE}" outcome="user_list" value="#{msg.LINK_USER_LIST}" />
</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>
- <div class="menu_header">
- <h:outputText value="#{msg.MENU_EDIT_PROFILE_TITLE}" />
- </div>
+ <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>
+ <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_APPLICATIONS_TITLE}" />
<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>
- <param-value>false</param-value>
+ <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 "resend confirmation link" ius enabled.</description>
- <param-name>is_resend_confirm_link_enabled</param-name>
+ <description>Whether recovery of user passwords is enabled.</description>
+ <param-name>is_feature_user_password_recovery_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>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>
+ <description>Whether gender is required for administrative contact controller.</description>
+ <param-name>is_feature_admin_gender_enabled</param-name>
+ <param-value>true</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>true</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>true</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>
<context-param>
</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}" />
<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}" />
</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=" " />
+ <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>
</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="form_lost_password">
<div class="table">
</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>
</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>
</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}" />
</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>
</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>
</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>
</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>
</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>
<h:form id="form_login_change_personal">
<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}" />
</div>
</h:form>
</div>
- <<<<<<< HEAD
- =======
</ui:fragment>
<h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" />
<ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}">
<h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
- >>>>>>> be1ec6b... Continued a bit: (please cherry-pick)
</ui:fragment>
<ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}">
<h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" />
</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>