]> git.mxchange.org Git - addressbook-war.git/blobdiff - web/user/user_list.xhtml
need to add language stuff in every page. :-( Maybe one day there is a better solutio...
[addressbook-war.git] / web / user / user_list.xhtml
index 9ccd87328e4573c26a1b2ab622dcf7d73d732644..c92bf83b3b2ba0e442b958d41545f2d4062067f8 100644 (file)
@@ -1,10 +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 xmlns="http://www.w3.org/1999/xhtml"
+<html
+       lang="#{localizationController.language}" xml:lang="#{localizationController.language}"
+       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"
-         >
+         xmlns:f="http://xmlns.jcp.org/jsf/core">
 
        <ui:composition template="/WEB-INF/templates/#{loginController.templateType}/#{loginController.templateType}_base.tpl">
                <ui:define name="login_title">#{msg.PAGE_TITLE_USER_LIST}</ui:define>
                                        #{msg.TABLE_HEADER_USER_LIST}
                                </div>
 
-                               <h:dataTable id="userList" var="user" value="#{userController.allPublicUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isPublicUserRegistered()}">
-                                       <h:column>
-                                               <f:facet name="header">#{msg.USER_ID}</f:facet>
-                                               <h:link outcome="user_profile" value="#{user.userId}">
-                                                       <f:param name="userId" value="#{user.userId}" />
-                                               </h:link>
-                                       </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>
-                                               <h:link outcome="user_profile" value="#{user.userName}">
-                                                       <f:param name="userId" value="#{user.userId}" />
-                                               </h:link>
+                                               <ui:include src="/WEB-INF/templates/generic/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}">
-                                                       <f:convertDateTime for="addressbookCreated" type="both" timeStyle="short" dateStyle="medium" />
-                                               </h:outputFormat>
+                                               <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
                                        </h:column>
 
-                                       <h:outputText rendered="#{loginController.userLoggedIn}">
-                                               <h:column>
-                                                       <f:facet name="header">#{msg.USER_LIST_SHARING_ADDRESSBOOKS}</f:facet>
+                                       <h:column>
+                                               <f:facet name="header">#{msg.USER_LIST_SHARING_ADDRESSBOOKS}</f:facet>
+                                               <ui:fragment rendered="#{loginController.isUserLoggedIn()}">
                                                        <h:link outcome="login_list_sharing_addressbooks" value="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS}" title="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS_TITLE}">
                                                                <f:param name="userId" value="#{user.userId}" />
                                                        </h:link>
-                                               </h:column>
-                                       </h:outputText>
+                                               </ui:fragment>
+                                               <ui:fragment rendered="#{loginController.isGuest()}">
+                                                       <h:outputText id="userShared" value="#{addressbookController.countAllUserSharedAddressbooks(user)}" />
+                                               </ui:fragment>
+                                       </h:column>
                                </h:dataTable>
                        </div>
                </ui:define>