]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/admin/user/admin_user_list.xhtml
Please cherry-pick:
[jjobs-war.git] / web / admin / user / admin_user_list.xhtml
index b6f7de2aa9567ee9ac7a8592fa7316f56e5418b5..2650593a91900f032e2abfb5c3afcb0f4be7560f 100644 (file)
@@ -1,12 +1,11 @@
-<?xml version="1.0" encoding="UTF-8" ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html
        lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
        xmlns="http://www.w3.org/1999/xhtml"
-         xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
-         xmlns:h="http://xmlns.jcp.org/jsf/html"
-         xmlns:f="http://xmlns.jcp.org/jsf/core"
-         >
+       xmlns: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/admin/admin_base.tpl">
                <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_USER}</ui:define>
                </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()}">
+                       <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">#{msg.ADMIN_USER_ID}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{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:column>
 
                                <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_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_CONTACT_GENDER}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{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_CONTACT_FIRST_NAME}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_LIST_USER_FIRST_NAME}" />
+                                       </f:facet>
 
                                        <h:outputText value="#{user.userContact.contactFirstName}" />
                                </h:column>
 
                                <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_CONTACT_FAMILY_NAME}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{msg.ADMIN_LIST_USER_FAMILY_NAME}" />
+                                       </f:facet>
 
                                        <h:outputText value="#{user.userContact.contactFamilyName}" />
                                </h:column>
 
                                <h:column>
-                                       <f:facet name="header">#{msg.ADMIN_USER_ACCOUNT_STATUS}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{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_USER_PROFILE_MODE}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{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_USER_CREATED}</f:facet>
+                                       <f:facet name="header">
+                                               <h:outputText value="#{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:column>
                        </h:dataTable>
 
-                       <div class="table_medium">
+                       <h:panelGroup styleClass="table_medium" layout="block">
                                <h:form id="admin_add_user">
                                        <div class="table_header">
-                                               #{msg.ADMIN_ADD_USER_TITLE}
+                                               <h:outputText value="#{msg.ADMIN_ADD_USER_TITLE}" />
                                        </div>
 
-                                       <div class="para">
-                                               <fieldset id="user_contact">
-                                                       <legend title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}">#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}</legend>
+                                       <!-- Whether select contact data .. //-->
+                                       <div id="admin_user_personal_data_option_1" class="para">
+                                               <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>
 
                                                        <div class="table_row">
                                                                <div class="table_left_medium">
                                                                </div>
 
                                                                <div class="table_right_medium">
-                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{adminHelper.contact}" converter="ContactConverter">
+                                                                       <h:selectOneMenu styleClass="select" id="userContact" value="#{beanHelper.contact}" converter="ContactConverter">
                                                                                <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" />
-                                                                               <f:selectItems value="#{userController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
+                                                                               <f:selectItems value="#{contactController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" />
                                                                        </h:selectOneMenu>
                                                                </div>
 
                                                <h:outputText value="#{msg.ADMIN_ADD_OR_ENTER_CONTACT_DATA}" />
                                        </div>
 
-                                       <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" />
+                                       <!-- ... or enter it directly together it creating user account //-->
+                                       <div id="admin_user_personal_data_option_2">
+                                               <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" />
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_data.tpl">
+                                               <ui:param name="mode" value="add" />
+                                       </ui:include>
 
                                        <div class="table_footer">
-                                               <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
-                                               <h:commandButton styleClass="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" />
+                                               <h:commandButton styleClass="reset right_space" 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>
-                       </div>
+                       </h:panelGroup>
                </ui:define>
        </ui:composition>
 </html>