]> git.mxchange.org Git - jjobs-war.git/commitdiff
Please cherry-pick:
authorRoland Häder <roland@mxchange.org>
Sat, 31 Mar 2018 14:32:49 +0000 (16:32 +0200)
committerRoland Häder <roland@mxchange.org>
Sun, 21 Jul 2019 06:05:58 +0000 (08:05 +0200)
- removed <f:selectItem> with value="#{null}" in filter selection box, was
  anoying there and no use anyway
- added beanHelper.renderUser(user) which is a helper method for rendering
  user names
- added missing i18n strings

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java
src/java/org/mxchange/localization/generic_de_DE.properties
src/java/org/mxchange/localization/generic_en_US.properties
web/admin/basic_data/admin_basic_data_list.xhtml
web/admin/branch_office/admin_branch_office_list.xhtml
web/admin/department/admin_department_list.xhtml
web/admin/employee/admin_employee_list.xhtml
web/admin/headquarter/admin_headquarter_list.xhtml
web/admin/opening_time/admin_opening_time_list.xhtml
web/admin/user/admin_user_list.xhtml

index 15dccd049bf1aa4041fbfae07b7268c2c859ab09..5213862da59ee184e5c2379fdf0403d53409c925 100644 (file)
@@ -736,6 +736,35 @@ public class JobsWebRequestHelperBean extends BaseJobsBean implements JobsWebReq
                return sb.toString();
        }
 
+       /**
+        * Returns the user's personal title, family name and name. If null is
+        * provided, an empty string is returned.
+        * <p>
+        * @param user User instance
+        * <p>
+        * @return User's full name
+        */
+       public String renderUser (final User user) {
+               // Default is empty string, so let's get started
+               final StringBuilder sb = new StringBuilder(20);
+
+               // Is user given?
+               if (user instanceof User) {
+                       // Add user name first
+                       sb.append(user.getUserName());
+                       sb.append(" ("); //NOI18N
+
+                       // Add contact data
+                       sb.append(this.renderContact(user.getUserContact()));
+
+                       // Close brace
+                       sb.append(")"); //NOI18N
+               }
+
+               // Return it
+               return sb.toString();
+       }
+
        /**
         * Set's all given contact's phone instances: land-line, mobile and
         * faxNumber
index ee4b481a4bdf1bff27d6b0106dd40e674a82c791..964ba4358ffa1f29d6136ce4073929f65d74f9c0 100644 (file)
@@ -1174,3 +1174,6 @@ SEARCH_ALL_FIELDS=Alle Felder durchsuchen:
 BASIC_DATA_LINK_MASK={0} (Nr. {1})
 #@TODO Please fix German umlauts!
 ADMIN_LINK_LIST_OPENING_TIMES_TITLE=Listet alle Oeffnungszeiten auf.
+LABEL_PAYMENT_TYPES=Bezahlungsarten
+BRANCH_OFFICE=Filiale:
+USER_HEADER=Benutzer:
index a460b899d616847d5795f1897a68f059cb74a04e..5c56a85e25ef267216bc5144f619aab11a4b99da 100644 (file)
@@ -1067,3 +1067,6 @@ ENTER_KEYWORD=Enter keyword ...
 SEARCH_ALL_FIELDS=Search all fields:
 BASIC_DATA_LINK_MASK={0} (No. {1})
 ADMIN_LINK_LIST_OPENING_TIMES_TITLE=Lists all opening times.
+LABEL_PAYMENT_TYPES=Payment types
+BRANCH_OFFICE=Branch office:
+USER_HEADER=User:
index 9e982d7a221a421d2c27c1f59a2dc0032d5a23f5..42796918253afc442b07d53c9f4aa9392391b235 100644 (file)
@@ -64,7 +64,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
@@ -97,7 +96,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index fe196f4f1cd93fab1c591aed058451d38c4ca1d3..b447471a7ee61b0e875c9318704755efc09c3485 100644 (file)
@@ -64,7 +64,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index 64ee433ebd83c54b2cdf0aca8ebb0b8a669f2bc1..751d2dabb7072564244e8cbcb070bdbe23093696 100644 (file)
@@ -90,7 +90,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="BranchOfficeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
                                                        title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index 7d3ea7d79e7d8b54c69e98ab8229f2f4a84cc55b..f3f82f24b0364ed2195852676766605b5159a130 100644 (file)
@@ -64,7 +64,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="BranchOfficeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{branchOfficeController.allBranchOffices()}" var="branchOffice" itemValue="#{branchOffice}" itemLabel="#{beanHelper.renderBranchOffice(branchOffice)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
@@ -88,7 +87,6 @@
                                                        updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index 60a8fe3916d3781e73e5bbfb66413e7e47bf9956..7202ff33f490b9f4ef921d3fca4b3076287712e9 100644 (file)
@@ -63,7 +63,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}"
                                                        >
                                                        <f:converter converterId="UserConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{userController.allUsers()}" var="user" itemValue="#{user}" itemLabel="#{user.userName}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
@@ -98,7 +97,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}"
                                                        >
                                                        <f:converter converterId="EmployeeConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{employeeController.allEmployees()}" var="employee" itemValue="#{employee}" itemLabel="#{beanHelper.renderEmployee(employee)}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index 9f646c9249639f6cf9be24b16638a07a85dbcb36..20b7f80fc8f5f0b3c136e88fecb7c9ca30215ab3 100644 (file)
@@ -62,7 +62,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}"
                                                        >
                                                        <f:converter converterId="DayOfTheWeekConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{dataController.dayOfTheWeek}" var="dayOfWeek" itemValue="#{dayOfWeek}" itemLabel="#{dayOfWeek.toString()}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
@@ -79,7 +78,6 @@
                                                        title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}"
                                                        >
                                                        <f:converter converterId="DayOfTheWeekConverter" />
-                                                       <f:selectItem itemValue="#{null}" itemLabel="#{msg.NONE_SELECTED}" />
                                                        <f:selectItems value="#{dataController.dayOfTheWeek}" var="dayOfWeek" itemValue="#{dayOfWeek}" itemLabel="#{dayOfWeek.toString()}" />
                                                </p:selectCheckboxMenu>
                                        </f:facet>
index 68f37a2fef708d6bd677f7edf81cd3381c61fba4..d3cff187a679c8bffe8c4ec3df277dab642b1d1d 100644 (file)
@@ -65,7 +65,6 @@
                                                        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"
@@ -96,7 +95,6 @@
                                                        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"
                                                        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"
                                                        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}" />
                                                </p:selectOneMenu>
                                        </p:panelGrid>