<?xml version="1.0" encoding="UTF-8" ?>
-<ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"
- xmlns="http://www.w3.org/1999/xhtml"
- xmlns:core="http://mxchange.org/jsf/core/widgets"
- xmlns:links="http://mxchange.org/jsf/core/links"
- 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:p="http://primefaces.org/ui">
+<ui:composition
+ template="/WEB-INF/templates/admin/admin_base.tpl"
+ xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:core="http://mxchange.org/jsf/core/widgets"
+ xmlns:links="http://mxchange.org/jsf/core/links"
+ 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:p="http://primefaces.org/ui"
+ >
<ui:define name="document_admin_title">
<h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_USER}" />
<ui:define name="content">
<h:form id="form-list-users">
<p:dataTable
- id="table-list-users"
+ id="userList"
var="user"
value="#{userController.allUsers()}"
- tableStyleClass="table table-full"
paginator="true"
paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
filteredValue="#{userController.filteredUsers}"
>
<f:facet name="header">
- <p:panelGrid columns="2" columnClasses="ui-grid-col-10, ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
+ <p:panelGrid columns="2" columnClasses="ui-grid-col-10,ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
<h:outputText value="#{msg.ADMIN_LIST_USERS_HEADER}" />
- <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
- <p:columnToggler datasource="table-list-users" trigger="toggler" />
+ <p:commandButton
+ id="toggler"
+ type="button"
+ value="#{msg.SELECT_SHOWN_COLUMNS}"
+ styleClass="column-selector"
+ />
+
+ <p:columnToggler datasource="userList" trigger="toggler" />
</p:panelGrid>
</f:facet>
- <p:column headerText="#{msg.ADMIN_USER_ID}" sortBy="#{user.userId}" filterBy="#{user.userId}" filterMatchMode="contains">
- <p:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{user.userId}">
+ <p:column
+ headerText="#{msg.ADMIN_USER_ID}"
+ sortBy="#{user.userId}"
+ filterBy="#{user.userId}"
+ filterMatchMode="contains"
+ >
+ <p:link
+ outcome="admin_show_user"
+ value="#{user.userId}"
+ title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}"
+ >
<f:param name="userId" value="#{user.userId}" />
</p:link>
</p:column>
- <p:column headerText="#{msg.ADMIN_LIST_USER_NAME}" sortBy="#{user.userName}" filterBy="#{user.userName}" filterMatchMode="contains" rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}">
+ <p:column
+ headerText="#{msg.ADMIN_LIST_USER_NAME}"
+ sortBy="#{user.userName}"
+ filterBy="#{user.userName}"
+ filterMatchMode="contains"
+ rendered="#{featureController.isFeatureEnabled('user_login_require_user_name')}"
+ >
<h:outputText value="#{user.userName}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}" sortBy="#{user.userContact.contactPersonalTitle}" filterBy="#{user.userContact.contactPersonalTitle}" filterMatchMode="exact">
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_PERSONAL_TITLE}"
+ sortBy="#{user.userContact.contactPersonalTitle}"
+ filterBy="#{user.userContact.contactPersonalTitle}"
+ filterMatchMode="exact"
+ >
<f:facet name="filter">
<p:selectOneMenu
filter="true"
title="#{msg.FILTER_BY_SINGLE_PERSONAL_TITLE}"
>
<f:converter converterId="PersonalTitleConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.personalTitles}"
var="personalTitle"
<h:outputText value="#{msg[user.userContact.contactPersonalTitle.messageKey]}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_CONTACT_FIRST_NAME}" sortBy="#{user.userContact.contactFirstName}" filterBy="#{user.userContact.contactFirstName}" filterMatchMode="contains">
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_FIRST_NAME}"
+ sortBy="#{user.userContact.contactFirstName}"
+ filterBy="#{user.userContact.contactFirstName}"
+ filterMatchMode="contains"
+ >
<h:outputText value="#{user.userContact.contactFirstName}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_CONTACT_FAMILY_NAME}" sortBy="#{user.userContact.contactFamilyName}" filterBy="#{user.userContact.contactFamilyName}" filterMatchMode="contains">
+ <p:column
+ headerText="#{msg.ADMIN_CONTACT_FAMILY_NAME}"
+ sortBy="#{user.userContact.contactFamilyName}"
+ filterBy="#{user.userContact.contactFamilyName}"
+ filterMatchMode="contains"
+ >
<h:outputText value="#{user.userContact.contactFamilyName}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_USER_ACCOUNT_STATUS}" sortBy="#{user.userAccountStatus}" filterBy="#{user.userAccountStatus}" filterMatchMode="exact">
+ <p:column
+ headerText="#{msg.ADMIN_USER_ACCOUNT_STATUS}"
+ sortBy="#{user.userAccountStatus}"
+ filterBy="#{user.userAccountStatus}"
+ filterMatchMode="exact"
+ >
<f:facet name="filter">
<p:selectOneMenu
filter="true"
title="#{msg.FILTER_BY_SINGLE_ACCOUNT_STATUS_TITLE}"
>
<f:converter converterId="UserAccountStatusConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.userAccountStatuses}"
var="accountStatus"
<h:outputText styleClass="#{user.userAccountStatus.styleClass}" value="#{msg[user.userAccountStatus.messageKey]}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_USER_PROFILE_MODE}" sortBy="#{user.userProfileMode}" filterBy="#{user.userProfileMode}" filterMatchMode="exact">
+ <p:column
+ headerText="#{msg.ADMIN_USER_PROFILE_MODE}"
+ sortBy="#{user.userProfileMode}"
+ filterBy="#{user.userProfileMode}"
+ filterMatchMode="exact"
+ >
<f:facet name="filter">
<p:selectOneMenu
filter="true"
title="#{msg.FILTER_BY_SINGLE_PROFILE_MODE_TITLE}"
>
<f:converter converterId="ProfileModeConverter" />
- <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
<f:selectItems
value="#{dataController.profileModes}"
var="profileMode"
<h:outputText value="#{msg[user.userProfileMode.messageKey]}" />
</p:column>
- <p:column headerText="#{msg.ADMIN_LIST_ENTRY_CREATED}" sortBy="#{user.userCreated}" filterable="false">
- <h:outputText id="userCreated" value="#{user.userCreated.time}">
- <f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" />
+ <p:column
+ headerText="#{msg.ENTRY_CREATED_HEADER}"
+ sortBy="#{user.userCreated}"
+ filterable="false"
+ >
+ <h:outputText id="userCreated" value="#{user.userCreated}">
+ <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
</h:outputText>
</p:column>
- <p:column headerText="#{msg.ADMIN_ACTION_LINKS}" sortable="false" filterable="false">
- <links:outputUserAdminMiniLinks user="#{user}" />
+ <p:column
+ headerText="#{msg.ADMIN_ACTION_LINKS_HEADER}"
+ sortable="false"
+ filterable="false"
+ >
+ <links:outputUserAdminDropdownMenu user="#{user}" />
</p:column>
</p:dataTable>
</h:form>
<h:form>
- <p:panelGrid columns="1" styleClass="table table-full" layout="grid">
+ <p:panelGrid
+ columns="1"
+ layout="grid"
+ >
<f:facet name="header">
<h:outputText value="#{msg.ADMIN_ADD_USER_TITLE}" />
</f:facet>
@TODO title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}"
-->
<p:fieldset legend="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}">
- <p:panelGrid columns="2" columnClasses="ui-grid-col-3, ui-grid-col-9" styleClass="table table-full ui-noborder" layout="grid">
+ <p:panelGrid
+ columns="2"
+ columnClasses="ui-grid-col-3,ui-grid-col-9"
+ styleClass="ui-noborder"
+ layout="grid"
+ >
<p:outputLabel for="userContact" value="#{msg.ADMIN_SELECT_USER_CONTACT}" />
<p:selectOneMenu
id="userContact"
filterMatchMode="contains"
>
<f:converter converterId="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}" />
+
+ <f:selectItems
+ value="#{contactController.selectableContacts()}"
+ var="contact"
+ itemValue="#{contact}"
+ itemLabel="#{beanHelper.renderContact(contact)}"
+ />
</p:selectOneMenu>
</p:panelGrid>
</p:fieldset>
<!-- ... or enter it directly together it creating user account //-->
<h:panelGroup layout="block">
- <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" />
+ <core:outputAdminUserDataFormFields mode="add" />
+
+ <h:panelGroup styleClass="para notice">
+ <h:outputText value="#{msg.ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE}" />
+ </h:panelGroup>
+
+ <core:outputAdminContactDataFormFields allowEmptyRequiredData="true" />
</h:panelGroup>
<f:facet name="footer">
<p:panelGrid columns="2" layout="grid">
- <p:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+ <p:commandButton
+ type="reset"
+ value="#{msg.BUTTON_RESET_FORM}"
+ />
<p:commandButton
- styleClass="submit"
type="submit"
id="submit_add_user"
value="#{msg.BUTTON_ADMIN_ADD_USER}"
action="#{adminUserController.addUser()}"
- update=":master:form-list-users:table-list-users"
+ update=":master:form-list-users:userList"
/>
</p:panelGrid>
</f:facet>