From: Roland Häder Date: Fri, 29 Sep 2017 23:06:00 +0000 (+0200) Subject: Please cherry-pick: X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=cb27495f81d21c2db808536609900ffd957c30f9;p=jjobs-war.git Please cherry-pick: - removed no longer used backing bean injections, may reduce memory footprint - added project-specific JSF taglib - made long one-line p:selectCheckboxMenu into multi-line to have it easier updated - renamed *_BRANCH_OFFICES_* to *_BRANCH_OFFICE_* - added missing i18n strings Signed-off-by: Roland Häder --- diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java index 9a0817e9..e730dd54 100644 --- a/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/country/JobsAdminCountryWebRequestBean.java @@ -29,6 +29,9 @@ import javax.inject.Named; import org.mxchange.jcountry.events.AdminAddedCountryEvent; import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; import org.mxchange.jcountry.exceptions.CountryAlreadyAddedException; +import org.mxchange.jcountry.model.data.Country; +import org.mxchange.jcountry.model.data.CountryData; +import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote; import org.mxchange.jjobs.beans.BaseJobsBean; /** diff --git a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebRequestBean.java index e028d395..94a27c29 100644 --- a/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/country/JobsCountryWebRequestBean.java @@ -31,7 +31,6 @@ import javax.inject.Named; import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; import org.mxchange.jcountry.model.data.Country; import org.mxchange.jcountry.model.data.CountrySingletonBeanRemote; -import org.mxchange.jcountry.events.ObservableAdminAddedCountryEvent; import org.mxchange.jjobs.beans.BaseJobsBean; /** diff --git a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java index 7b531d19..e7e6b3dd 100644 --- a/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java +++ b/src/java/org/mxchange/jjobs/beans/helper/JobsWebRequestHelperBean.java @@ -27,11 +27,9 @@ import org.mxchange.jcontacts.events.contact.created.ObservableCreatedContactEve import org.mxchange.jcontacts.model.contact.Contact; import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice; import org.mxchange.jcontactsbusiness.model.department.Department; +import org.mxchange.jcontactsbusiness.model.employee.Employee; import org.mxchange.jcontactsbusiness.model.headquarters.HeadquartersData; import org.mxchange.jjobs.beans.BaseJobsBean; -import org.mxchange.jjobs.beans.contact.JobsAdminContactWebRequestController; -import org.mxchange.jjobs.beans.phone.JobsAdminPhoneWebRequestController; -import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController; import org.mxchange.jjobs.beans.user.JobsUserWebRequestController; import org.mxchange.jphone.events.fax.created.CreatedFaxNumberEvent; import org.mxchange.jphone.events.fax.created.ObservableCreatedFaxNumberEvent; @@ -65,24 +63,6 @@ public class JobsWebRequestHelperBean extends BaseJobsBean implements JobsWebReq */ private static final long serialVersionUID = 17_258_793_567_145_701L; - /** - * Administrative contact controller - */ - @Inject - private JobsAdminContactWebRequestController adminContactController; - - /** - * Administrative phone controller - */ - @Inject - private JobsAdminPhoneWebRequestController adminPhoneController; - - /** - * Administrative user controller - */ - @Inject - private JobsAdminUserWebRequestController adminUserController; - /** * Contact instance */ @@ -541,8 +521,44 @@ public class JobsWebRequestHelperBean extends BaseJobsBean implements JobsWebReq } /** - * Returns the headquarters' address. If null is - * provided, an empty string is returned. + * Returns the employee's number, personal title, family name and name if + * available. If null is provided, an empty string is returned. + *

+ * @param employee Employee instance + *

+ * @return Contact's full name + */ + public String renderEmployee (final Employee employee) { + // Default is empty string, so let's get started + final StringBuilder sb = new StringBuilder(20); + + // Is employee set? + if (employee instanceof Employee) { + // Then create name + sb.append(employee.getEmployeeNumber()); + + // Is contact data found? + if (employee.getEmployeePersonalData() instanceof Contact) { + // Yes, then render it + final String contactName = this.renderContact(employee.getEmployeePersonalData()); + + // Is it given? + if (contactName != null) { + // Then add it + sb.append(" ("); //NOI18N + sb.append(contactName); + sb.append(")"); //NOI18N + } + } + } + + // Return it + return sb.toString(); + } + + /** + * Returns the headquarters' address. If null is provided, an empty string + * is returned. *

* @param headquarters Headquarters instance *

diff --git a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java index d0fc3a29..0a521a0e 100644 --- a/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/phone/JobsAdminPhoneWebRequestBean.java @@ -68,11 +68,6 @@ import org.mxchange.jphone.model.phonenumbers.phone.AdminPhoneSessionBeanRemote; @RequestScoped public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAdminPhoneWebRequestController { - /** - * Call-stack position - */ - private static final short THREAD_STACK = 5; - /** * Serial number */ @@ -211,9 +206,6 @@ public class JobsAdminPhoneWebRequestBean extends BaseJobsBean implements JobsAd public JobsAdminPhoneWebRequestBean () { // Call super constructor super(); - - // String caller = MessageFormat.format("{0}.{1}", Thread.currentThread().getStackTrace()[3].getClassName(), Thread.currentThread().getStackTrace()[3].getMethodName()); - // System.out.println(MessageFormat.format("{0}: Constructed, caller: {1}", this.getClass().getSimpleName(), caller)); } /** diff --git a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestBean.java index dd1deb9b..b26a455d 100644 --- a/src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/JobsUserWebRequestBean.java @@ -39,7 +39,6 @@ import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent; import org.mxchange.jjobs.beans.BaseJobsBean; import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController; import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController; -import org.mxchange.jjobs.beans.localization.JobsLocalizationSessionController; import org.mxchange.jjobs.beans.user.login.JobsUserLoginWebSessionController; import org.mxchange.jusercore.events.user.add.ObservableAdminAddedUserEvent; import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent; @@ -96,12 +95,6 @@ public class JobsUserWebRequestBean extends BaseJobsBean implements JobsUserWebR */ private Locale locale; - /** - * Localization controller - */ - @Inject - private JobsLocalizationSessionController localizationController; - /** * Event being fired when user updated personal data */ diff --git a/src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java index 74bae16e..3bdf7f5e 100644 --- a/src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/register/JobsUserRegisterWebRequestBean.java @@ -29,7 +29,6 @@ import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jjobs.beans.BaseJobsBean; import org.mxchange.jjobs.beans.contact.JobsContactWebRequestController; import org.mxchange.jjobs.beans.features.JobsFeaturesWebApplicationController; -import org.mxchange.jjobs.beans.user.JobsAdminUserWebRequestController; import org.mxchange.jjobs.beans.user.JobsUserWebRequestController; import org.mxchange.jusercore.events.user.clear.password.ClearUserPasswordEvent; import org.mxchange.jusercore.events.user.clear.password.ObservableClearUserPasswordEvent; @@ -63,12 +62,6 @@ public class JobsUserRegisterWebRequestBean extends BaseJobsBean implements Jobs */ private static final long serialVersionUID = 47_828_986_719_691_592L; - /** - * Administrative user controller - */ - @Inject - private JobsAdminUserWebRequestController adminUserController; - /** * An event being fired when a user name should be cleared */ diff --git a/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java b/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java index c58a92e6..5b4d7ad3 100644 --- a/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java +++ b/src/java/org/mxchange/jjobs/beans/user/resendlink/JobsResendLinkWebRequestBean.java @@ -27,7 +27,6 @@ import javax.inject.Named; import org.mxchange.jcoreee.events.locale.ObservableLocaleChangeEvent; import org.mxchange.jcoreee.utils.FacesUtils; import org.mxchange.jjobs.beans.BaseJobsBean; -import org.mxchange.jjobs.beans.localization.JobsLocalizationSessionController; import org.mxchange.jjobs.beans.user.JobsUserWebRequestController; import org.mxchange.jusercore.exceptions.UserEmailAddressNotFoundException; import org.mxchange.jusercore.exceptions.UserNotFoundException; @@ -63,12 +62,6 @@ public class JobsResendLinkWebRequestBean extends BaseJobsBean implements JobsRe */ private Locale locale; - /** - * Localization controller - */ - @Inject - private JobsLocalizationSessionController localizationController; - /** * EJB for resending confirmation link */ diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 69981ddb..05ff5705 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -918,9 +918,9 @@ ADMIN_BRANCH_OFFICE_ZIP_CODE_REQUIRED=Bitte geben Sie die Postleitzahl zur Filia ADMIN_BRANCH_OFFICE_CITY_REQUIRED=Bitte geben Sie die Stadt der Filiale ein. ADMIN_BRANCH_OFFICE_ALREADY_CREATED=Eine Filiale existiert bereits mit den angegebenen Daten. ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE=Zeigt Details dieser Filiale an. -ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE=Zeigt das Benutzerprofil des Besitzers des Filialeintrages an. +ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE=Zeigt das Benutzerprofil des Besitzers des Filialeintrages an. ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE=Dieser Filiale einen Benutzer als Besitzer zuweisen. -ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Zeit die Daten der Kontaktperson dieser Filiale an. +ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE=Zeit die Daten der Kontaktperson dieser Filiale an. ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Einen Mitarbeiter als Kontaktperson dieser Filiale zuweisen. NO_EMAIL_ADDRESS_ENTERED=Keine Email-Adresse eingegeben. DATA_ADDRESS=Adresse @@ -981,7 +981,7 @@ SELECT_SHOWN_COLUMNS=Angezeigte Spalten ADMIN_LIST_BRANCH_OFFICES_HEADER=Alle Filialen auflisten LABEL_USERS=Benutzer FILTER_BY_MULTIPLE_USERS_TITLE=Liste durch Auswahl von ein oder mehr Benutzern durchsuchen. -LABEL_COMPANIES=Firmen +LABEL_COMPANIES=Unternehmen FILTER_BY_MULTIPLE_COMPANIES_TITLE=Liste durch Auswahl von ein oder mehr Unternehmen durchsuchen. LABEL_COMPANY_EMPLOYEES=Mitarbeiter FILTER_BY_MULTIPLE_COMPANY_EMPLOYEES_TITLE=Liste durch Auswahl von ein oder mehr Mitarbeiter durchsuchen. @@ -1026,3 +1026,7 @@ ADMIN_ASSIGN_COMPANY_EMPLOYEE_HEADQUARTERS=Hauptsitz einem Mitarbeiter zuweisen: ADMIN_ENTER_COMPANY_EMPLOYEE_MOBILE_NUMBER=Geschaefliche Mobilfunknummer des Mitarbeiters eingeben: ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND=Allgemeine Daten des Mitarbeiters: ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND_TITLE=Geben Sie hier die generellen Daten des Mitarbeiters an. +ADMIN_ASSIGNED_BRANCH_OFFICE=Zugewiesene Filiale: +LABEL_BRANCH_OFFICES=Filialen +ADMIN_DATE_OF_ISSUE=Ausstellungsdatum: +ADMIN_PAYMENT_TYPE=Zahlungsmethode: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 68279e60..22e3ec66 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -896,9 +896,9 @@ ADMIN_BRANCH_OFFICE_ZIP_CODE_REQUIRED=Please enter ZIP code for the branch offic ADMIN_BRANCH_OFFICE_CITY_REQUIRED=Please enter city for the branch office. ADMIN_BRANCH_OFFICE_ALREADY_CREATED=A branch office with same data already exists. ADMIN_LINK_SHOW_BRANCH_OFFICE_TITLE=Show details of this branch office. -ADMIN_LINK_SHOW_BRANCH_OFFICES_OWNER_USER_TITLE=Show the profile of the branch office entry owning user. +ADMIN_LINK_SHOW_BRANCH_OFFICE_OWNER_USER_TITLE=Show the profile of the branch office entry owning user. ADMIN_LINK_ASSIGN_BRANCH_OFFICES_OWNER_USER_TITLE=Assign a user as owner to this branch office. -ADMIN_LINK_SHOW_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Shows contact data of this branch office's contact person. +ADMIN_LINK_SHOW_BRANCH_OFFICE_CONTACT_PERSON_TITLE=Shows contact data of this branch office's contact person. ADMIN_LINK_ASSIGN_BRANCH_OFFICES_CONTACT_PERSON_TITLE=Assign a company employee as contact person for this branch office. NO_EMAIL_ADDRESS_ENTERED=No email address entered. DATA_ADDRESS=Address @@ -980,3 +980,7 @@ ADMIN_ASSIGN_COMPANY_EMPLOYEE_HEADQUARTERS=Assign headquarters to employee: ADMIN_ENTER_COMPANY_EMPLOYEE_MOBILE_NUMBER=Enter business mobile number of employee: ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND=General data of employee: ADMIN_COMPANY_EMPLOYEE_GENERAL_LEGEND_TITLE=You can enter here the general data of the employee. +ADMIN_ASSIGNED_BRANCH_OFFICE=Assigned branch office: +LABEL_BRANCH_OFFICES=Branch offices +ADMIN_DATE_OF_ISSUE=Issue date: +ADMIN_PAYMENT_TYPE=Payment type: diff --git a/web/WEB-INF/project-links.jsf.taglib.xml b/web/WEB-INF/project-links.jsf.taglib.xml new file mode 100644 index 00000000..68bbe317 --- /dev/null +++ b/web/WEB-INF/project-links.jsf.taglib.xml @@ -0,0 +1,23 @@ + + + + http://mxchange.org/jsf/jfinancials/links + diff --git a/web/WEB-INF/templates/admin/admin_menu.tpl b/web/WEB-INF/templates/admin/admin_menu.tpl index 870647c0..4db9edbd 100644 --- a/web/WEB-INF/templates/admin/admin_menu.tpl +++ b/web/WEB-INF/templates/admin/admin_menu.tpl @@ -27,7 +27,7 @@ - + diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index ae2ea043..d471bb7b 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -30,7 +30,7 @@ Generic custom JSF tags library javax.faces.FACELETS_LIBRARIES - /WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml + /WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml;/WEB-INF/project-links.jsf.taglib.xml Project stage diff --git a/web/admin/branch_office/admin_branch_office_list.xhtml b/web/admin/branch_office/admin_branch_office_list.xhtml index 9c91c184..8ff058ba 100644 --- a/web/admin/branch_office/admin_branch_office_list.xhtml +++ b/web/admin/branch_office/admin_branch_office_list.xhtml @@ -51,14 +51,21 @@ - + - + @@ -101,7 +108,7 @@ - +