From 3ba8a7219a5d53b98af4e974d62766164e322300 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Wed, 13 Sep 2017 00:11:58 +0200 Subject: [PATCH] Please cherry-pick: - converted existing "links" templates into custom JSF tags - registered new links taglib and moved existing there - added JSF tag for administrative links to: branch office, mobile provider user (mini links) - some more generic "short" link texts for resending, locking and unlocking MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- .../localization/bundle_de_DE.properties | 7 +- .../localization/bundle_en_US.properties | 7 +- web/WEB-INF/links.jsf.taglib.xml | 300 ++++++++++++++++++ .../basic_data/admin_basic_data_links.tpl | 0 .../admin_branch_office_links.tpl | 32 ++ .../links/{ => mini}/fax/admin_fax_links.tpl | 2 +- .../landline/admin_landline_links.tpl | 2 +- .../{ => mini}/mobile/admin_mobile_links.tpl | 2 +- .../admin_mobile_provider_links.tpl | 31 ++ .../links/mini/user/admin_user_links.tpl | 53 ++++ .../admin/links/user/admin_user_links.tpl | 75 +++++ .../admin/panel_grids/fax/admin_fax_data.tpl | 5 +- .../landline/admin_landline_data.tpl | 5 +- .../panel_grids/mobile/admin_mobile_data.tpl | 5 +- .../admin/contact/admin_contact_links.tpl | 33 -- .../templates/admin/user/admin_user_links.tpl | 65 ---- web/WEB-INF/web.xml | 2 +- web/WEB-INF/widgets.jsf.taglib.xml | 133 +------- .../admin_basic_company_data_list.xhtml | 3 +- .../admin_branch_offices_list.xhtml | 9 + web/admin/contact/admin_contact_list.xhtml | 9 + web/admin/contact/admin_contact_show.xhtml | 3 +- .../unlink/admin_contact_fax_unlink.xhtml | 2 +- .../admin_contact_landline_unlink.xhtml | 2 +- .../unlink/admin_contact_mobile_unlink.xhtml | 2 +- web/admin/country/admin_country_list.xhtml | 9 + web/admin/fax/admin_fax_delete.xhtml | 2 +- web/admin/fax/admin_fax_show.xhtml | 2 +- .../landline/admin_landline_delete.xhtml | 2 +- web/admin/mobile/admin_mobile_delete.xhtml | 2 +- web/admin/mobile/admin_mobile_show.xhtml | 2 +- .../admin_mobile_provider_list.xhtml | 23 +- web/admin/user/admin_user_list.xhtml | 9 + web/admin/user/admin_user_show.xhtml | 3 +- web/guest/user/user_list.xhtml | 3 +- 35 files changed, 584 insertions(+), 262 deletions(-) create mode 100644 web/WEB-INF/links.jsf.taglib.xml rename web/WEB-INF/resources/tags/admin/links/{ => mini}/basic_data/admin_basic_data_links.tpl (100%) create mode 100644 web/WEB-INF/resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl rename web/WEB-INF/resources/tags/admin/links/{ => mini}/fax/admin_fax_links.tpl (95%) rename web/WEB-INF/resources/tags/admin/links/{ => mini}/landline/admin_landline_links.tpl (96%) rename web/WEB-INF/resources/tags/admin/links/{ => mini}/mobile/admin_mobile_links.tpl (95%) create mode 100644 web/WEB-INF/resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl create mode 100644 web/WEB-INF/resources/tags/admin/links/mini/user/admin_user_links.tpl create mode 100644 web/WEB-INF/resources/tags/admin/links/user/admin_user_links.tpl delete mode 100644 web/WEB-INF/templates/admin/contact/admin_contact_links.tpl delete mode 100644 web/WEB-INF/templates/admin/user/admin_user_links.tpl diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 51ab88fa..7e0d0b61 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -372,13 +372,9 @@ ADMIN_SHOW_MOBILE_PROVIDER_NAME=Mobilanbieter: ADMIN_SHOW_MOBILE_NUMBER_COMPLETE=Komplette Nummer: ADMIN_SHOW_ADMINISTRATIVE_LINKS=Administrative Links: ADMIN_LINK_SHOW_SHORT=Anzeigen -ADMIN_LINK_SHOW_SHORT_TITLE=Eintrag einzelnt anzeigen. ADMIN_LINK_EDIT_SHORT=Editieren -ADMIN_LINK_EDIT_SHORT_TITLE=Eintrag editieren. ADMIN_LINK_DELETE_SHORT=L\u00f6schen -ADMIN_LINK_DELETE_SHORT_TITLE=Eintrag l\u00f6schen. ADMIN_LINK_UNLINK_SHORT=Abtrennen -ADMIN_LINK_UNLINK_SHORT_TITLE=Entfernt Verkn\u00fcpfung zum Eintrag. PAGE_TITLE_ADMIN_DELETE_MOBILE_NUMBER=Mobiletelefoneintrag l\u00f6schen CONTENT_TITLE_ADMIN_DELETE_MOBILE_NUMBER=Mobiletelefoneintrag l\u00f6schen: PAGE_TITLE_ADMIN_EDIT_MOBILE_NUMBER=Mobiletelefoneintrag editieren @@ -915,3 +911,6 @@ ADMIN_LINK_EDIT_BASIC_COMAPNY_DATA_TITLE=Edieren von Grunddaten des Unternehmens #@TODO Please fix German umlauts! ADMIN_LINK_DELETE_BASIC_COMAPNY_DATA_TITLE=Loescht Grunddaten des Unternehmens. ADMIN_ACTION_LINKS=Aktionen: +ADMIN_LINK_RESEND_CONFIRMATION_SHORT=Erneut +ADMIN_LINK_UNLOCK_SHORT=Entsperren +ADMIN_LINK_LOCK_SHORT=Sperren diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index b34e2318..aa7f8c4c 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -351,13 +351,9 @@ ADMIN_SHOW_MOBILE_PROVIDER_NAME=Mobile provider: ADMIN_SHOW_MOBILE_NUMBER_COMPLETE=Complete number: ADMIN_SHOW_ADMINISTRATIVE_LINKS=Administrative links: ADMIN_LINK_SHOW_SHORT=Show -ADMIN_LINK_SHOW_SHORT_TITLE=Show single entry. ADMIN_LINK_EDIT_SHORT=Edit -ADMIN_LINK_EDIT_SHORT_TITLE=Edit entry. ADMIN_LINK_DELETE_SHORT=Delete -ADMIN_LINK_DELETE_SHORT_TITLE=Delete entry. ADMIN_LINK_UNLINK_SHORT=Unlink -ADMIN_LINK_UNLINK_SHORT_TITLE=Removes link to entry. PAGE_TITLE_ADMIN_DELETE_MOBILE_NUMBER=Delete mobile entry CONTENT_TITLE_ADMIN_DELETE_MOBILE_NUMBER=Delete mobile entry: PAGE_TITLE_ADMIN_EDIT_MOBILE_NUMBER=Edit mobile entry @@ -875,3 +871,6 @@ ADMIN_LINK_EDIT_FAX_NUMBER_TITLE=Edit of fax number. ADMIN_LINK_EDIT_BASIC_COMAPNY_DATA_TITLE=Edit of basic data of company. ADMIN_LINK_DELETE_BASIC_COMAPNY_DATA_TITLE=Deletes basic data of company. ADMIN_ACTION_LINKS=Actions: +ADMIN_LINK_RESEND_CONFIRMATION_SHORT=Resend +ADMIN_LINK_UNLOCK_SHORT=Unlock +ADMIN_LINK_LOCK_SHORT=Lock diff --git a/web/WEB-INF/links.jsf.taglib.xml b/web/WEB-INF/links.jsf.taglib.xml new file mode 100644 index 00000000..09f59252 --- /dev/null +++ b/web/WEB-INF/links.jsf.taglib.xml @@ -0,0 +1,300 @@ + + + + http://mxchange.org/jsf/core/links + + outputUserProfileLink + This tag renders a h:link JSF tag for a user profile. + resources/tags/profile/user/user_profile_link.tpl + + user + An instance of a User class. + true + org.mxchange.jusercore.model.user.User + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputFaxNumberAdminMiniLinks + This tag renders a full h:panelGroup for administrative "mini-links" for fax data. + resources/tags/admin/links/mini/fax/admin_fax_links.tpl + + faxNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber + + + contact + The contact instance that provides contact data for additional JSF links. + false + org.mxchange.jcontacts.model.contact.Contact + + + renderShowLink + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputLandLineNumberAdminMiniLinks + This tag renders a full h:panelGroup for administrative "mini-links" for land-line data. + resources/tags/admin/links/mini/landline/admin_landline_links.tpl + + landLineNumber + The fax instance that provides the data for this tag. + true + org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber + + + contact + The contact instance that provides contact data for additional JSF links. + false + org.mxchange.jcontacts.model.contact.Contact + + + renderShowLink + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputMobileNumberAdminMiniLinks + This tag renders a full h:panelGroup for administrative "mini-links" for mobile data. + resources/tags/admin/links/mini/mobile/admin_mobile_links.tpl + + mobileNumber + The mobile number instance that provides the data for this tag. + true + org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber + + + contact + The contact instance that provides contact data for additional JSF links. + false + org.mxchange.jcontacts.model.contact.Contact + + + renderShowLink + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputMobileProviderAdminMiniLinks + This tag renders a full h:panelGroup for administrative "mini-links" for mobile provider data. + resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl + + mobileProvider + The mobile provider instance that provides the data for this tag. + true + org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider + + + renderShowLink + Whether this tag is used to show mobile data (default true). + false + java.lang.Boolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputBasicDataAdminMiniLinks + This tag renders administrative "mini-links" for given basicData instance. + resources/tags/admin/links/mini/basic_data/admin_basic_data_links.tpl + + basicData + The basic company data for this tag. + true + org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData + + + renderShowLink + Whether to render (default: true) "show basic data" link. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputBranchOfficeAdminMiniLinks + This tag renders administrative "mini-links" for given branchOffice instance. + resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl + + branchOffice + The branch office instance that provides the data for this tag. + true + org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice + + + renderShowLink + Whether to render (default: true) "show branch office" link. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputContactAdminMiniLinks + This tag renders administrative "mini-links" for given contact instance. + resources/tags/admin/links/mini/contact/admin_contact_links.tpl + + contact + The contact instance that provides the data for this tag. + true + org.mxchange.jcontacts.model.contact.Contact + + + renderShowLink + Whether to render (default: true) "show contact" link. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputCountryAdminMiniLinks + This tag renders administrative "mini-links" for given country instance. + resources/tags/admin/links/mini/country/admin_country_links.tpl + + country + The country instance that provides the data for this tag. + true + org.mxchange.jcountry.model.data.Country + + + renderShowLink + Whether to render (default: true) "show branch office" link. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputUserAdminMiniLinks + This tag renders administrative "mini-links" for given user instance. + resources/tags/admin/links/mini/user/admin_user_links.tpl + + user + The user instance that provides the data for this tag. + true + org.mxchange.jusercore.model.user.User + + + renderShowLink + Whether to render (default: true) "show user" link. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + + outputUserAdminLinks + This tag renders administrative links for given user instance. + resources/tags/admin/links/user/admin_user_links.tpl + + user + The user instance that provides the data for this tag. + true + org.mxchange.jusercore.model.user.User + + + renderShowLink + Whether to render (default: true) "show user" link. + false + java.langBoolean + + + renderContactLinks + Whether to render (default: false) contact links. + false + java.langBoolean + + + renderHeader + Whether to render (default: false) table header. + false + java.langBoolean + + + rendered + Whether this tag is being rendered by JSF engine. + false + java.lang.Boolean + + + diff --git a/web/WEB-INF/resources/tags/admin/links/basic_data/admin_basic_data_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/basic_data/admin_basic_data_links.tpl similarity index 100% rename from web/WEB-INF/resources/tags/admin/links/basic_data/admin_basic_data_links.tpl rename to web/WEB-INF/resources/tags/admin/links/mini/basic_data/admin_basic_data_links.tpl diff --git a/web/WEB-INF/resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl new file mode 100644 index 00000000..0ed7ad15 --- /dev/null +++ b/web/WEB-INF/resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl @@ -0,0 +1,32 @@ + + + + + + + diff --git a/web/WEB-INF/resources/tags/admin/links/fax/admin_fax_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/fax/admin_fax_links.tpl similarity index 95% rename from web/WEB-INF/resources/tags/admin/links/fax/admin_fax_links.tpl rename to web/WEB-INF/resources/tags/admin/links/mini/fax/admin_fax_links.tpl index ec4645b1..ed70e299 100644 --- a/web/WEB-INF/resources/tags/admin/links/fax/admin_fax_links.tpl +++ b/web/WEB-INF/resources/tags/admin/links/mini/fax/admin_fax_links.tpl @@ -7,7 +7,7 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets">