]> git.mxchange.org Git - jjobs-war.git/blobdiff - web/guest/user/user_profile.xhtml
Please cherry-pick:
[jjobs-war.git] / web / guest / user / user_profile.xhtml
index a90b20a56e06dbab83f23a7256cebadb916d0ae0..ef4cd227e41dd4f6bfcb766d7bbb46d403250af6 100644 (file)
@@ -1,49 +1,48 @@
 <?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">
-
-       <f:metadata>
-               <f:viewParam id="userId" name="userId" value="#{userController.userId}" required="true" requiredMessage="#{msg.PARAMETER_USER_ID_MISSING}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" validatorMessage="#{msg.PARAMETER_USER_ID_NOT_FOUND}">
-                       <f:convertNumber for="userId" type="number" minIntegerDigits="1" maxIntegerDigits="20" />
-                       <f:validator for="userId" validatorId="UserIdValidator" />
-               </f:viewParam>
-       </f:metadata>
-
-       <ui:composition template="/WEB-INF/templates/#{userLoginController.templateType}/#{userLoginController.templateType}_base.tpl">
-               <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_PROFILE}</ui:define>
-               <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_USER_PROFILE}</ui:define>
-
-               <ui:define name="content_header">
-                       #{msg.CONTENT_TITLE_INDEX_USER_PROFILE}
-               </ui:define>
-
-               <ui:define name="content">
-                       <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
-                               <ui:fragment rendered="#{userController.isUserIdEmpty()}">
-                                       <ui:include src="/WEB-INF/templates/user/userid_error.tpl" />
-                               </ui:fragment>
-
-                               <h:outputText value="#{msg.ERROR_PROFILE_NOT_VISIBLE}" rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}" />
-
-                               <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
-                                       <div align="center">
-                                               <h:panelGrid styleClass="table" headerClass="table_header" footerClass="table_footer">
-                                                       <f:facet name="header">
-                                                               <h:outputText value="#{msg.PUBLIC_USER_PROFILE}" />
-                                                       </f:facet>
-                                               </h:panelGrid>
-                                       </div>
-                               </ui:fragment>
-                       </ui:fragment>
+<ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_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="metadata">
+               <f:metadata>
+                       <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" />
+                       <f:viewAction onPostback="true" action="#{beanHelper.notifyControllerUserConverted()}" />
+               </f:metadata>
+       </ui:define>
+
+       <ui:define name="login_title">
+               <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_USER_PROFILE}" />
+       </ui:define>
+
+       <ui:define name="guest_title">
+               <h:outputText value="#{msg.PAGE_TITLE_INDEX_USER_PROFILE}" />
+       </ui:define>
+
+       <ui:define name="content_header">
+               <h:outputText value="#{msg.CONTENT_TITLE_INDEX_USER_PROFILE}" />
+       </ui:define>
+
+       <ui:define name="content">
+               <widgets:outputMessageBox id="error-user-profile-disabled" message="#{msg.ERROR_GUEST_USER_PROFILE_DISABLED}" messageStyleClass="alert-danger" rendered="#{not userController.isPublicUserProfileEnabled()}" />
+
+               <widgets:outputMessageBox id="error-user-id-empty" message="#{msg.TABLE_HEADER_ERROR_HANDLING_USER_ID}" rendered="#{userController.isUserIdEmpty()}" />
+
+               <ui:fragment rendered="#{userController.isPublicUserProfileEnabled()}">
+                       <widgets:outputMessageBox id="error-user-profile-hidden" message="#{msg.ERROR_PROFILE_NOT_VISIBLE}" messageStyleClass="alert-danger" rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}" />
 
-                       <ui:fragment rendered="#{not userController.isPublicUserProfileEnabled()}">
-                               <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" />
+                       <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}">
+                               <div align="center">
+                                       <p:panelGrid styleClass="table" headerClass="table-header" footerClass="table-footer">
+                                               <f:facet name="header">
+                                                       <h:outputText value="#{msg.PUBLIC_USER_PROFILE}" />
+                                               </f:facet>
+                                               <!-- @TODO Unfinished -->
+                                       </p:panelGrid>
+                               </div>
                        </ui:fragment>
-               </ui:define>
-       </ui:composition>
-</html>
+               </ui:fragment>
+       </ui:define>
+</ui:composition>