<?xml version="1.0" encoding="UTF-8" ?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://xmlns.jcp.org/jsf/html"
- xmlns:f="http://xmlns.jcp.org/jsf/core"
- >
-
- <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
- <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_USER}</ui:define>
-
- <ui:define name="content_header">
- #{msg.CONTENT_TITLE_ADMIN_LIST_USER}
- </ui:define>
-
- <ui:define name="content">
- <h:dataTable id="table_list_users" var="user" value="#{adminUserController.allUsers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{adminUserController.hasUsers()}">
+<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:widgets="http://mxchange.org/jsf/core/widgets"
+ 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:define name="admin_title">
+ <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_USER}" />
+ </ui:define>
+
+ <ui:define name="content_header">
+ <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_USER}" />
+ </ui:define>
+
+ <ui:define name="content">
+ <widgets:outputMessageBox message="#{msg.ADMIN_USER_LIST_EMPTY}" messageStyleClass="alert-danger" rendered="#{userController.allUsers().isEmpty()}" />
+
+ <h:dataTable id="table_list_users" var="user" value="#{userController.allUsers()}" styleClass="table-full" headerClass="table-header-column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{not userController.allUsers().isEmpty()}">
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_USER_ID}" />
+ </f:facet>
+
+ <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{user.userId}">
+ <f:param name="userId" value="#{user.userId}" />
+ </h:link>
+ </h:column>
+
+ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
<h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_ID}</f:facet>
-
- <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{user.userId}">
- <f:param name="userId" value="#{user.userId}" />
- </h:link>
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_NAME}</f:facet>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" />
+ </f:facet>
<h:outputText value="#{user.userName}" />
</h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_GENDER}</f:facet>
-
- <h:outputText value="#{msg[user.userContact.contactGender.messageKey]}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_FIRST_NAME}</f:facet>
-
- <h:outputText value="#{user.userContact.contactFirstName}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_FAMILY_NAME}</f:facet>
-
- <h:outputText value="#{user.userContact.contactFamilyName}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_ACCOUNT_STATUS}</f:facet>
-
- <h:outputText styleClass="#{user.userAccountStatus.styleClass}" value="#{msg[user.userAccountStatus.messageKey]}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_PROFILE_MODE}</f:facet>
-
- <h:outputText value="#{msg[user.userProfileMode.messageKey]}" />
- </h:column>
-
- <h:column>
- <f:facet name="header">#{msg.ADMIN_LIST_USER_CREATED}</f:facet>
-
- <h:outputText id="userCreated" value="#{user.userCreated.time}">
- <f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" />
- </h:outputText>
- </h:column>
- </h:dataTable>
-
- <div class="table">
- <h:form id="admin_add_user">
- <div class="table_header">
- #{msg.ADMIN_ADD_USER_TITLE}
- </div>
-
+ </ui:fragment>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" />
+ </f:facet>
+
+ <h:outputText value="#{msg[user.userContact.contactPersonalTitle.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{user.userContact.contactFirstName}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+ </f:facet>
+
+ <h:outputText value="#{user.userContact.contactFamilyName}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />
+ </f:facet>
+
+ <h:outputText styleClass="#{user.userAccountStatus.styleClass}" value="#{msg[user.userAccountStatus.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_USER_PROFILE_MODE}" />
+ </f:facet>
+
+ <h:outputText value="#{msg[user.userProfileMode.messageKey]}" />
+ </h:column>
+
+ <h:column>
+ <f:facet name="header">
+ <h:outputText value="#{msg.ADMIN_USER_CREATED}" />
+ </f:facet>
+
+ <h:outputText id="userCreated" value="#{user.userCreated.time}">
+ <f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" />
+ </h:outputText>
+ </h:column>
+ </h:dataTable>
+
+ <h:panelGroup styleClass="table table-medium" layout="block">
+ <h:form id="form_admin_add_user">
+ <div class="table-header">
+ <h:outputText value="#{msg.ADMIN_ADD_USER_TITLE}" />
+ </div>
+
+ <!-- Whether select contact data .. //-->
+ <h:panelGroup id="admin_user_personal_data_option_1" styleClass="para" layout="block">
+ <fieldset class="fieldset" id="user_contact">
+ <legend title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}">
+ <h:outputText value="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}" />
+ </legend>
+
+ <h:panelGroup styleClass="table-row" layout="block">
+ <div class="table-left-medium">
+ <h:outputLabel for="userContact" value="#{msg.ADMIN_SELECT_USER_CONTACT}" />
+ </div>
+
+ <div class="table-right-medium">
+ <h:selectOneMenu styleClass="select" id="userContact" value="#{adminUserController.contact}" converter="ContactConverter">
+ <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
+ <f:selectItems value="#{contactController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactPersonalTitle.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
+ </h:selectOneMenu>
+ </div>
+ </h:panelGroup>
+ </fieldset>
+ </h:panelGroup>
+
+ <h:panelGroup styleClass="para" layout="block">
+ <h:outputText value="#{msg.ADMIN_ADD_OR_ENTER_CONTACT_DATA}" />
+ </h:panelGroup>
+
+ <!-- ... or enter it directly together it creating user account //-->
+ <h:panelGroup id="admin_user_personal_data_option_2" layout="block">
<ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" />
-
- <div class="table_footer">
- <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
- <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
- </div>
- </h:form>
- </div>
- </ui:define>
- </ui:composition>
-</html>
+ </h:panelGroup>
+
+ <div class="table-footer">
+ <h:commandButton styleClass="reset divider-right" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <h:commandButton styleClass="submit" type="submit" id="add_user" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+ </div>
+ </h:form>
+ </h:panelGroup>
+ </ui:define>
+</ui:composition>