]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Thu, 25 Aug 2016 14:57:21 +0000 (16:57 +0200)
committerRoland Haeder <roland@mxchange.org>
Thu, 25 Aug 2016 18:36:39 +0000 (20:36 +0200)
- introduced new "mini" templates which contains minimalistic data
- the mini template contains a link to the full user's (later also contact) data
- admin_resend_user_confirmation_link is now using them to show nice output

web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl [new file with mode: 0644]
web/admin/user/admin_user_resend_confirmation_link.xhtml

diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl
new file mode 100644 (file)
index 0000000..1d99604
--- /dev/null
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!-- @TODO maybe later add phone numbers as "main" numbers? //-->
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://xmlns.jcp.org/jsf/core"
+       xmlns:h="http://xmlns.jcp.org/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+
+       <h:column>
+               <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" />
+
+               <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[beanHelper.contact.contactGender.messageKey]}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" />
+
+               <h:outputText id="contactTitle" styleClass="table_data_field" value="#{beanHelper.contact.contactTitle}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" />
+
+               <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{beanHelper.contact.contactFirstName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" />
+
+               <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{beanHelper.contact.contactFamilyName}" />
+       </h:column>
+
+       <h:column>
+               <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" />
+
+               <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{beanHelper.contact.contactEmailAddress}">
+                       <h:outputText value="#{beanHelper.contact.contactEmailAddress}" />
+               </h:outputLink>
+       </h:column>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl b/web/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl
new file mode 100644 (file)
index 0000000..d847771
--- /dev/null
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:panelGrid id="admin_user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER_DATA}" headerClass="table_header_column" styleClass="table_full" columns="3" rendered="#{not empty beanHelper.user}">
+               <f:facet name="header">
+                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}">
+                               <f:param value="#{beanHelper.user.userName}" />
+                               <f:param value="#{beanHelper.user.userId}" />
+                       </h:outputFormat>
+               </f:facet>
+
+               <h:column>
+                       <h:outputLabel for="userId" styleClass="table_data_label" value="#{msg.ADMIN_USER_ID}" />
+
+                       <h:panelGroup styleClass="table_data_field" layout="block">
+                               <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}">
+                                       <f:param name="userId" value="#{beanHelper.user.userId}" />
+                               </h:link>
+                       </h:panelGroup>
+               </h:column>
+
+               <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}">
+                       <h:column>
+                               <h:outputLabel for="userName" styleClass="table_data_label" value="#{msg.ADMIN_USER_NAME}" />
+
+                               <h:outputText id="userName" styleClass="table_data_field" value="#{beanHelper.user.userName}" />
+                       </h:column>
+               </ui:fragment>
+
+               <h:column>
+                       <h:outputLabel for="userCreated" styleClass="table_data_label" value="#{msg.ADMIN_USER_CREATED}" />
+
+                       <h:outputText id="userCreated" styleClass="table_data_field" value="#{beanHelper.user.userCreated.time}">
+                               <f:convertDateTime for="userCreated" type="both" />
+                       </h:outputText>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="userAccountStatus" styleClass="table_data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" />
+
+                       <h:outputText id="userAccountStatus" styleClass="table_data_field #{beanHelper.user.userAccountStatus.styleClass}" value="#{msg[beanHelper.user.userAccountStatus.messageKey]}" />
+               </h:column>
+
+               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_columns_mini.tpl" />
+       </h:panelGrid>
+</ui:composition>
index e27b85461ba6498a3249745444ef5257149490bf..036f97cc634c4b7c15a3fe880c7935efc4aa904a 100644 (file)
                                        </div>
 
                                        <div class="para">
-                                               <div class="table_data_label">
-                                                       <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" />
-                                               </div>
-
-                                               <div class="table_data_field">
-                                                       <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}">
-                                                               <f:param name="userId" value="#{beanHelper.user.userId}" />
-                                                       </h:link>
-                                               </div>
-                                       </div>
-
-                                       <div class="para">
-                                               <div class="table_data_label">
-                                                       <h:outputLabel for="contactGender" value="#{msg.PERSONAL_DATA_GENDER}" />
-                                               </div>
-
-                                               <div class="table_data_field">
-                                                       <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" />
-                                               </div>
-                                       </div>
-
-                                       <div class="para">
-                                               <div class="table_data_label">
-                                                       <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" />
-                                               </div>
-
-                                               <div class="table_data_field">
-                                                       <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" />
-                                               </div>
-                                       </div>
-
-                                       <div class="para">
-                                               <div class="table_data_label">
-                                                       <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" />
-                                               </div>
-
-                                               <div class="table_data_field">
-                                                       <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" />
-                                               </div>
+                                               <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl" />
                                        </div>
 
                                        <div class="para">