From 050dfc93ea77f3094a759f7cf6cc551d33448a9d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Sat, 31 Mar 2018 16:32:49 +0200 Subject: [PATCH] Please cherry-pick: - removed 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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../helper/JobsWebRequestHelperBean.java | 29 +++++++++++++++++++ .../localization/generic_de_DE.properties | 3 ++ .../localization/generic_en_US.properties | 3 ++ .../basic_data/admin_basic_data_list.xhtml | 3 -- .../admin_branch_office_list.xhtml | 2 -- .../department/admin_department_list.xhtml | 3 -- web/admin/employee/admin_employee_list.xhtml | 2 -- .../headquarter/admin_headquarter_list.xhtml | 2 -- .../admin_opening_time_list.xhtml | 2 -- web/admin/user/admin_user_list.xhtml | 4 --- 10 files changed, 35 insertions(+), 18 deletions(-) diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java index 15dccd04..5213862d 100644 --- a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java @@ -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. + *

+ * @param user User instance + *

+ * @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 diff --git a/src/java/org/mxchange/localization/generic_de_DE.properties b/src/java/org/mxchange/localization/generic_de_DE.properties index ee4b481a..964ba435 100644 --- a/src/java/org/mxchange/localization/generic_de_DE.properties +++ b/src/java/org/mxchange/localization/generic_de_DE.properties @@ -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: diff --git a/src/java/org/mxchange/localization/generic_en_US.properties b/src/java/org/mxchange/localization/generic_en_US.properties index a460b899..5c56a85e 100644 --- a/src/java/org/mxchange/localization/generic_en_US.properties +++ b/src/java/org/mxchange/localization/generic_en_US.properties @@ -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: diff --git a/web/admin/basic_data/admin_basic_data_list.xhtml b/web/admin/basic_data/admin_basic_data_list.xhtml index 9e982d7a..42796918 100644 --- a/web/admin/basic_data/admin_basic_data_list.xhtml +++ b/web/admin/basic_data/admin_basic_data_list.xhtml @@ -64,7 +64,6 @@ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}" > - @@ -97,7 +96,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - @@ -122,7 +120,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - diff --git a/web/admin/branch_office/admin_branch_office_list.xhtml b/web/admin/branch_office/admin_branch_office_list.xhtml index fe196f4f..b447471a 100644 --- a/web/admin/branch_office/admin_branch_office_list.xhtml +++ b/web/admin/branch_office/admin_branch_office_list.xhtml @@ -64,7 +64,6 @@ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}" > - @@ -121,7 +120,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - diff --git a/web/admin/department/admin_department_list.xhtml b/web/admin/department/admin_department_list.xhtml index 64ee433e..751d2dab 100644 --- a/web/admin/department/admin_department_list.xhtml +++ b/web/admin/department/admin_department_list.xhtml @@ -90,7 +90,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - @@ -115,7 +114,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - @@ -140,7 +138,6 @@ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}" > - diff --git a/web/admin/employee/admin_employee_list.xhtml b/web/admin/employee/admin_employee_list.xhtml index 7d3ea7d7..f3f82f24 100644 --- a/web/admin/employee/admin_employee_list.xhtml +++ b/web/admin/employee/admin_employee_list.xhtml @@ -64,7 +64,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - @@ -88,7 +87,6 @@ updateLabel="true" title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}" > - diff --git a/web/admin/headquarter/admin_headquarter_list.xhtml b/web/admin/headquarter/admin_headquarter_list.xhtml index 60a8fe39..7202ff33 100644 --- a/web/admin/headquarter/admin_headquarter_list.xhtml +++ b/web/admin/headquarter/admin_headquarter_list.xhtml @@ -63,7 +63,6 @@ title="#{msg.FILTER_BY_MULTIPLE_USERS_TITLE}" > - @@ -98,7 +97,6 @@ title="#{msg.FILTER_BY_MULTIPLE_EMPLOYEES_TITLE}" > - diff --git a/web/admin/opening_time/admin_opening_time_list.xhtml b/web/admin/opening_time/admin_opening_time_list.xhtml index 9f646c92..20b7f80f 100644 --- a/web/admin/opening_time/admin_opening_time_list.xhtml +++ b/web/admin/opening_time/admin_opening_time_list.xhtml @@ -62,7 +62,6 @@ title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}" > - @@ -79,7 +78,6 @@ title="#{msg.FILTER_BY_MULTIPLE_WEEK_DAYS_TITLE}" > - diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index 68f37a2f..d3cff187 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -65,7 +65,6 @@ title="#{msg.FILTER_BY_SINGLE_PERSONAL_TITLE}" > - - - - -- 2.39.5