From 5f41c30695d8d28ee1da89d4e0c144fe82221122 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org> 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 <roland@mxchange.org> --- .../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 960eb7be..ca119dce 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -426,13 +426,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 @@ -967,3 +963,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 f1018187..c8772674 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -405,13 +405,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 @@ -928,3 +924,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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- +Copyright (C) 2017 Roland Häder + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU Affero General Public License as +published by the Free Software Foundation, either version 3 of the +License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Affero General Public License for more details. + +You should have received a copy of the GNU Affero General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +--> +<facelet-taglib version="2.2" + xmlns="http://xmlns.jcp.org/xml/ns/javaee" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facelettaglibrary_2_2.xsd"> + <namespace>http://mxchange.org/jsf/core/links</namespace> + <tag> + <tag-name>outputUserProfileLink</tag-name> + <description>This tag renders a h:link JSF tag for a user profile.</description> + <source>resources/tags/profile/user/user_profile_link.tpl</source> + <attribute> + <name>user</name> + <description>An instance of a User class.</description> + <required>true</required> + <type>org.mxchange.jusercore.model.user.User</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputFaxNumberAdminMiniLinks</tag-name> + <description>This tag renders a full h:panelGroup for administrative "mini-links" for fax data.</description> + <source>resources/tags/admin/links/mini/fax/admin_fax_links.tpl</source> + <attribute> + <name>faxNumber</name> + <description>The fax instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber</type> + </attribute> + <attribute> + <name>contact</name> + <description>The contact instance that provides contact data for additional JSF links.</description> + <required>false</required> + <type>org.mxchange.jcontacts.model.contact.Contact</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether this tag is used to show mobile data (default true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputLandLineNumberAdminMiniLinks</tag-name> + <description>This tag renders a full h:panelGroup for administrative "mini-links" for land-line data.</description> + <source>resources/tags/admin/links/mini/landline/admin_landline_links.tpl</source> + <attribute> + <name>landLineNumber</name> + <description>The fax instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber</type> + </attribute> + <attribute> + <name>contact</name> + <description>The contact instance that provides contact data for additional JSF links.</description> + <required>false</required> + <type>org.mxchange.jcontacts.model.contact.Contact</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether this tag is used to show mobile data (default true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputMobileNumberAdminMiniLinks</tag-name> + <description>This tag renders a full h:panelGroup for administrative "mini-links" for mobile data.</description> + <source>resources/tags/admin/links/mini/mobile/admin_mobile_links.tpl</source> + <attribute> + <name>mobileNumber</name> + <description>The mobile number instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber</type> + </attribute> + <attribute> + <name>contact</name> + <description>The contact instance that provides contact data for additional JSF links.</description> + <required>false</required> + <type>org.mxchange.jcontacts.model.contact.Contact</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether this tag is used to show mobile data (default true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputMobileProviderAdminMiniLinks</tag-name> + <description>This tag renders a full h:panelGroup for administrative "mini-links" for mobile provider data.</description> + <source>resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl</source> + <attribute> + <name>mobileProvider</name> + <description>The mobile provider instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jphone.model.phonenumbers.mobileprovider.MobileProvider</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether this tag is used to show mobile data (default true).</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputBasicDataAdminMiniLinks</tag-name> + <description>This tag renders administrative "mini-links" for given basicData instance.</description> + <source>resources/tags/admin/links/mini/basic_data/admin_basic_data_links.tpl</source> + <attribute> + <name>basicData</name> + <description>The basic company data for this tag.</description> + <required>true</required> + <type>org.mxchange.jcontactsbusiness.model.basicdata.BusinessBasicData</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show basic data" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputBranchOfficeAdminMiniLinks</tag-name> + <description>This tag renders administrative "mini-links" for given branchOffice instance.</description> + <source>resources/tags/admin/links/mini/branch_office/admin_branch_office_links.tpl</source> + <attribute> + <name>branchOffice</name> + <description>The branch office instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show branch office" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputContactAdminMiniLinks</tag-name> + <description>This tag renders administrative "mini-links" for given contact instance.</description> + <source>resources/tags/admin/links/mini/contact/admin_contact_links.tpl</source> + <attribute> + <name>contact</name> + <description>The contact instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jcontacts.model.contact.Contact</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show contact" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputCountryAdminMiniLinks</tag-name> + <description>This tag renders administrative "mini-links" for given country instance.</description> + <source>resources/tags/admin/links/mini/country/admin_country_links.tpl</source> + <attribute> + <name>country</name> + <description>The country instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jcountry.model.data.Country</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show branch office" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputUserAdminMiniLinks</tag-name> + <description>This tag renders administrative "mini-links" for given user instance.</description> + <source>resources/tags/admin/links/mini/user/admin_user_links.tpl</source> + <attribute> + <name>user</name> + <description>The user instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jusercore.model.user.User</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show user" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> + <tag> + <tag-name>outputUserAdminLinks</tag-name> + <description>This tag renders administrative links for given user instance.</description> + <source>resources/tags/admin/links/user/admin_user_links.tpl</source> + <attribute> + <name>user</name> + <description>The user instance that provides the data for this tag.</description> + <required>true</required> + <type>org.mxchange.jusercore.model.user.User</type> + </attribute> + <attribute> + <name>renderShowLink</name> + <description>Whether to render (default: true) "show user" link.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>renderContactLinks</name> + <description>Whether to render (default: false) contact links.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>renderHeader</name> + <description>Whether to render (default: false) table header.</description> + <required>false</required> + <type>java.langBoolean</type> + </attribute> + <attribute> + <name>rendered</name> + <description>Whether this tag is being rendered by JSF engine.</description> + <required>false</required> + <type>java.lang.Boolean</type> + </attribute> + </tag> +</facelet-taglib> 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 @@ +<?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"> + + <ui:fragment rendered="#{empty rendered or rendered}"> + <ul class="navbar-mini"> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> + <li class="navlink-mini"> + <h:link outcome="admin_show_branch_office" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_BASIC_COMAPNY_DATA_TITLE}"> + <f:param name="branchOfficeId" value="#{branchOffice.branchOfficeId}" /> + </h:link> + </li> + </ui:fragment> + + <li class="navlink-mini"> + <h:link outcome="admin_edit_branch_office" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_BASIC_COMAPNY_DATA_TITLE}"> + <f:param name="branchOfficeId" value="#{branchOffice.branchOfficeId}" /> + </h:link> + </li> + + <li class="navlink-mini"> + <h:link outcome="admin_delete_branch_office"> + <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_BASIC_COMAPNY_DATA_TITLE}" /> + <f:param name="branchOfficeId" value="#{branchOffice.branchOfficeId}" /> + </h:link> + </li> + </ul> + </ui:fragment> +</ui:composition> 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"> <ul class="navbar-mini"> - <ui:fragment rendered="#{empty isShowPage or not isShowPage}"> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> <li class="navlink-mini"> <h:link outcome="admin_show_fax" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_FAX_NUMBER_TITLE}"> <f:param name="phoneId" value="#{faxNumber.phoneId}" /> diff --git a/web/WEB-INF/resources/tags/admin/links/landline/admin_landline_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/landline/admin_landline_links.tpl similarity index 96% rename from web/WEB-INF/resources/tags/admin/links/landline/admin_landline_links.tpl rename to web/WEB-INF/resources/tags/admin/links/mini/landline/admin_landline_links.tpl index e047f651..db19df5b 100644 --- a/web/WEB-INF/resources/tags/admin/links/landline/admin_landline_links.tpl +++ b/web/WEB-INF/resources/tags/admin/links/mini/landline/admin_landline_links.tpl @@ -8,7 +8,7 @@ <ui:fragment rendered="#{not empty landLineNumber}"> <ul class="navbar-mini"> - <ui:fragment rendered="#{empty isShowPage or not isShowPage}"> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> <li class="navlink-mini"> <h:link outcome="admin_show_landline" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_LANDLINE_NUMBER_TITLE}"> <f:param name="phoneId" value="#{landLineNumber.phoneId}" /> diff --git a/web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/mobile/admin_mobile_links.tpl similarity index 95% rename from web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl rename to web/WEB-INF/resources/tags/admin/links/mini/mobile/admin_mobile_links.tpl index 26ee5a28..ad4afd00 100644 --- a/web/WEB-INF/resources/tags/admin/links/mobile/admin_mobile_links.tpl +++ b/web/WEB-INF/resources/tags/admin/links/mini/mobile/admin_mobile_links.tpl @@ -7,7 +7,7 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> <ul class="navbar-mini"> - <ui:fragment rendered="#{empty isShowPage or not isShowPage}"> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> <li class="navlink-mini"> <h:link outcome="admin_show_mobile" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_MOBILE_NUMBER_TITLE}"> <f:param name="phoneId" value="#{mobileNumber.phoneId}" /> diff --git a/web/WEB-INF/resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl new file mode 100644 index 00000000..61071686 --- /dev/null +++ b/web/WEB-INF/resources/tags/admin/links/mini/mobile_provider/admin_mobile_provider_links.tpl @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<ui:composition + xmlns="http://www.w3.org/1999/xhtml" + xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:f="http://java.sun.com/jsf/core" + xmlns:h="http://java.sun.com/jsf/html" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> + + <ul class="navbar-mini"> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> + <li class="navlink-mini"> + <h:link outcome="admin_show_mobile" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_MOBILE_NUMBER_TITLE}"> + <f:param name="providerId" value="#{mobileProvider.providerId}" /> + </h:link> + </li> + </ui:fragment> + + <li class="navlink-mini"> + <h:link outcome="admin_edit_mobile" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_MOBILE_NUMBER_TITLE}"> + <f:param name="providerId" value="#{mobileProvider.providerId}" /> + </h:link> + </li> + + <li class="navlink-mini"> + <h:link outcome="admin_delete_mobile"> + <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_SHORT}" title="#{msg.ADMIN_LINK_DELETE_MOBILE_NUMBER_TITLE}" /> + <f:param name="providerId" value="#{mobileProvider.providerId}" /> + </h:link> + </li> + </ul> +</ui:composition> diff --git a/web/WEB-INF/resources/tags/admin/links/mini/user/admin_user_links.tpl b/web/WEB-INF/resources/tags/admin/links/mini/user/admin_user_links.tpl new file mode 100644 index 00000000..9d7c2900 --- /dev/null +++ b/web/WEB-INF/resources/tags/admin/links/mini/user/admin_user_links.tpl @@ -0,0 +1,53 @@ +<?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:panelGroup styleClass="table" layout="block"> + <h:panelGroup styleClass="table-header" layout="block" rendered="#{not empty renderHeader and renderHeader}"> + <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" /> + </h:panelGroup> + + <h:panelGroup styleClass="table-row" layout="block"> + <ul> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> + <li> + <h:link outcome="admin_show_user" value="#{msg.ADMIN_LINK_SHOW_SHORT}" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + </ui:fragment> + + <li> + <h:link outcome="admin_edit_user" value="#{msg.ADMIN_LINK_EDIT_SHORT}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + + <li> + <h:link outcome="admin_resend_user_confirm_link" value="#{msg.ADMIN_LINK_RESEND_CONFIRMATION_SHORT}" title="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE}" rendered="#{user.userAccountStatus == 'UNCONFIRMED'}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + + <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_SHORT}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{user.userAccountStatus == 'LOCKED'}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + + <h:link outcome="admin_lock_user"> + <h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_LOCK_SHORT}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{user.userAccountStatus == 'CONFIRMED'}" /> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + + <li> + <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_SHORT}"> + <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_USER}" /> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + </ul> + </h:panelGroup> + </h:panelGroup> +</ui:composition> diff --git a/web/WEB-INF/resources/tags/admin/links/user/admin_user_links.tpl b/web/WEB-INF/resources/tags/admin/links/user/admin_user_links.tpl new file mode 100644 index 00000000..8b4f0cc1 --- /dev/null +++ b/web/WEB-INF/resources/tags/admin/links/user/admin_user_links.tpl @@ -0,0 +1,75 @@ +<?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:panelGroup styleClass="table" layout="block"> + <h:panelGroup styleClass="table-header" layout="block" rendered="#{not empty renderHeader and renderHeader}"> + <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" /> + </h:panelGroup> + + <h:panelGroup styleClass="table-row" layout="block"> + <ul> + <ui:fragment rendered="#{empty renderShowLink or renderShowLink}"> + <li> + <h:link outcome="admin_show_user" value="#{msg.ADMIN_LINK_SHOW_USER}" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + </ui:fragment> + + <li> + <h:link outcome="admin_edit_user" value="#{msg.ADMIN_LINK_EDIT_USER}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + + <ui:fragment rendered="#{not empty renderContactLinks and renderContactLinks}"> + <li> + <h:link outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_CONTACT}" title="#{msg.ADMIN_LINK_EDIT_CONTACT_TITLE}"> + <f:param name="contactId" value="#{user.userContact.contactId}" /> + </h:link> + </li> + </ui:fragment> + + <li> + <h:link outcome="admin_resend_user_confirm_link" value="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK}" title="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE}" rendered="#{user.userAccountStatus == 'UNCONFIRMED'}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + + <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{user.userAccountStatus == 'LOCKED'}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + + <h:link outcome="admin_lock_user"> + <h:outputText styleClass="link-warning" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{user.userAccountStatus == 'CONFIRMED'}" /> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + + <li> + <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}"> + <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_USER}" /> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + + <ui:fragment rendered="#{not empty renderContactLinks and renderContactLinks}"> + <li> + <h:link outcome="admin_show_contact" value="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA}" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}"> + <f:param name="contactId" value="#{user.userContact.contactId}" /> + </h:link> + </li> + </ui:fragment> + + <li> + <h:link outcome="admin_show_user_activity_log" value="#{msg.ADMIN_LINK_SHOW_USER_ACTIVITY_LOG}" title="#{msg.ADMIN_LINK_SHOW_USER_ACTIVITY_LOG_TITLE}"> + <f:param name="userId" value="#{user.userId}" /> + </h:link> + </li> + </ul> + </h:panelGroup> + </h:panelGroup> +</ui:composition> diff --git a/web/WEB-INF/resources/tags/admin/panel_grids/fax/admin_fax_data.tpl b/web/WEB-INF/resources/tags/admin/panel_grids/fax/admin_fax_data.tpl index bc0dd680..197917c6 100644 --- a/web/WEB-INF/resources/tags/admin/panel_grids/fax/admin_fax_data.tpl +++ b/web/WEB-INF/resources/tags/admin/panel_grids/fax/admin_fax_data.tpl @@ -2,6 +2,7 @@ <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> @@ -43,11 +44,11 @@ </h:outputText> </h:column> - <h:column rendered="#{empty showAdminLinks or showAdminLinks == true}"> + <h:column rendered="#{empty showAdminMiniLinks or showAdminMiniLinks == true}"> <h:outputLabel styleClass="table-data-label" value="#{msg.ADMIN_SHOW_ADMINISTRATIVE_LINKS}" /> <div class="table-data-field"> - <widgets:outputAdminFaxLinks faxNumber="#{faxNumber}" contact="#{contact}" isShowPage="#{isShowPage}" /> + <links:outputFaxNumberAdminMiniLinks faxNumber="#{faxNumber}" contact="#{contact}" renderShowLink="#{renderShowLink}" /> </div> </h:column> </h:panelGrid> diff --git a/web/WEB-INF/resources/tags/admin/panel_grids/landline/admin_landline_data.tpl b/web/WEB-INF/resources/tags/admin/panel_grids/landline/admin_landline_data.tpl index 69febe51..e7a75daa 100644 --- a/web/WEB-INF/resources/tags/admin/panel_grids/landline/admin_landline_data.tpl +++ b/web/WEB-INF/resources/tags/admin/panel_grids/landline/admin_landline_data.tpl @@ -2,6 +2,7 @@ <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> @@ -43,11 +44,11 @@ </h:outputText> </h:column> - <h:column rendered="#{empty showAdminLinks or showAdminLinks == true}"> + <h:column rendered="#{empty showAdminMiniLinks or showAdminMiniLinks == true}"> <h:outputLabel styleClass="table-data-label" value="#{msg.ADMIN_SHOW_ADMINISTRATIVE_LINKS}" /> <div class="table-data-field"> - <widgets:outputAdminLandLineLinks landLineNumber="#{landLineNumber}" contact="#{contact}" isShowPage="#{isShowPage}" /> + <links:outputLandLineNumberAdminMiniLinks landLineNumber="#{landLineNumber}" contact="#{contact}" renderShowLink="#{renderShowLink}" /> </div> </h:column> </h:panelGrid> diff --git a/web/WEB-INF/resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl b/web/WEB-INF/resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl index ec622509..616f8917 100644 --- a/web/WEB-INF/resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl +++ b/web/WEB-INF/resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl @@ -2,6 +2,7 @@ <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> @@ -52,11 +53,11 @@ </h:outputText> </h:column> - <h:column rendered="#{empty showAdminLinks or showAdminLinks == true}"> + <h:column rendered="#{empty showAdminMiniLinks or showAdminMiniLinks == true}"> <h:outputLabel styleClass="table-data-label" value="#{msg.ADMIN_SHOW_ADMINISTRATIVE_LINKS}" /> <div class="table-data-field"> - <widgets:outputAdminMobileLinks mobileNumber="#{mobileNumber}" contact="#{contact}" isShowPage="#{isShowPage}" /> + <links:outputMobileNumberAdminMiniLinks mobileNumber="#{mobileNumber}" contact="#{contact}" renderShowLink="#{renderShowLink}" /> </div> </h:column> </h:panelGrid> diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl deleted file mode 100644 index 907110d7..00000000 --- a/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<ui:composition - xmlns="http://www.w3.org/1999/xhtml" - xmlns:widgets="http://mxchange.org/jsf/core/widgets" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.contact}" /> - - <h:panelGroup styleClass="table" layout="block" rendered="#{not empty beanHelper.contact}"> - <div class="table-header"> - <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" /> - </div> - - <h:panelGroup styleClass="table-row" layout="block"> - <ul> - <li> - <h:link outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_CONTACT}" title="#{msg.ADMIN_LINK_EDIT_CONTACT_TITLE}"> - <f:param name="contactId" value="#{beanHelper.contact.contactId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_delete_contact" title="#{msg.ADMIN_LINK_DELETE_CONTACT_TITLE}"> - <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_CONTACT}" /> - <f:param name="contactId" value="#{beanHelper.contact.contactId}" /> - </h:link> - </li> - </ul> - </h:panelGroup> - </h:panelGroup> -</ui:composition> diff --git a/web/WEB-INF/templates/admin/user/admin_user_links.tpl b/web/WEB-INF/templates/admin/user/admin_user_links.tpl deleted file mode 100644 index a95ef3c6..00000000 --- a/web/WEB-INF/templates/admin/user/admin_user_links.tpl +++ /dev/null @@ -1,65 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<ui:composition - xmlns="http://www.w3.org/1999/xhtml" - xmlns:widgets="http://mxchange.org/jsf/core/widgets" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets"> - - <widgets:outputMessageBox message="#{msg.ERROR_BEAN_HELPER_USER_NOT_SET}" messageStyleClass="alert-danger" rendered="#{empty beanHelper.user}" /> - - <h:panelGroup styleClass="table" layout="block" rendered="#{not empty beanHelper.user}"> - <div class="table-header"> - <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" /> - </div> - - <h:panelGroup styleClass="table-row" layout="block"> - <ul> - <li> - <h:link outcome="admin_edit_user" value="#{msg.ADMIN_LINK_EDIT_USER}" title="#{msg.ADMIN_LINK_EDIT_USER_TITLE}"> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_CONTACT}" title="#{msg.ADMIN_LINK_EDIT_CONTACT_TITLE}"> - <f:param name="contactId" value="#{beanHelper.user.userContact.contactId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_resend_user_confirm_link" value="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK}" title="#{msg.ADMIN_LINK_RESEND_USER_CONFIRMATION_LINK_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - - <h:link outcome="admin_unlock_user" value="#{msg.ADMIN_LINK_UNLOCK_USER}" title="#{msg.ADMIN_LINK_UNLOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}"> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - - <h:link outcome="admin_lock_user" value="#{msg.ADMIN_LINK_LOCK_USER}" title="#{msg.ADMIN_LINK_LOCK_USER_TITLE}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}"> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_delete_user" title="#{msg.ADMIN_LINK_DELETE_USER_TITLE}"> - <h:outputText styleClass="link-danger" value="#{msg.ADMIN_LINK_DELETE_USER}" /> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_show_contact" value="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA}" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}"> - <f:param name="contactId" value="#{beanHelper.user.userContact.contactId}" /> - </h:link> - </li> - - <li> - <h:link outcome="admin_show_user_activity_log" value="#{msg.ADMIN_LINK_SHOW_USER_ACTIVITY_LOG}" title="#{msg.ADMIN_LINK_SHOW_USER_ACTIVITY_LOG_TITLE}"> - <f:param name="userId" value="#{beanHelper.user.userId}" /> - </h:link> - </li> - </ul> - </h:panelGroup> - </h:panelGroup> -</ui:composition> diff --git a/web/WEB-INF/web.xml b/web/WEB-INF/web.xml index 52a56e9d..73fada2a 100644 --- a/web/WEB-INF/web.xml +++ b/web/WEB-INF/web.xml @@ -10,7 +10,7 @@ <context-param> <description>Generic custom JSF tags library</description> <param-name>javax.faces.FACELETS_LIBRARIES</param-name> - <param-value>/WEB-INF/widgets.jsf.taglib.xml</param-value> + <param-value>/WEB-INF/widgets.jsf.taglib.xml;/WEB-INF/links.jsf.taglib.xml</param-value> </context-param> <context-param> <description>Project stage</description> diff --git a/web/WEB-INF/widgets.jsf.taglib.xml b/web/WEB-INF/widgets.jsf.taglib.xml index 02d2aca3..e6704a5e 100644 --- a/web/WEB-INF/widgets.jsf.taglib.xml +++ b/web/WEB-INF/widgets.jsf.taglib.xml @@ -206,23 +206,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <type>java.lang.String</type> </attribute> </tag> - <tag> - <tag-name>outputUserProfileLink</tag-name> - <description>This tag renders a h:link JSF tag for a user profile.</description> - <source>resources/tags/profile/user/user_profile_link.tpl</source> - <attribute> - <name>user</name> - <description>An instance of a User class.</description> - <required>true</required> - <type>org.mxchange.jusercore.model.user.User</type> - </attribute> - </tag> <tag> <tag-name>outputAdminFaxPanelGrid</tag-name> <description>This tag renders a full h:panelGrid for administrative purposes for fax data.</description> <source>resources/tags/admin/panel_grids/fax/admin_fax_data.tpl</source> <attribute> - <name>isShowPage</name> + <name>renderShowLink</name> <description>Whether this tag is used to show mobile data (default true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -246,7 +235,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <type>java.lang.Boolean</type> </attribute> <attribute> - <name>showAdminLinks</name> + <name>showAdminMiniLinks</name> <description>Whether to show administrative links to other pages (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -257,7 +246,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <description>This tag renders a full h:panelGrid for administrative purposes for land-line data.</description> <source>resources/tags/admin/panel_grids/landline/admin_landline_data.tpl</source> <attribute> - <name>isShowPage</name> + <name>renderShowLink</name> <description>Whether this tag is used to show mobile data (default true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -281,7 +270,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <type>java.lang.Boolean</type> </attribute> <attribute> - <name>showAdminLinks</name> + <name>showAdminMiniLinks</name> <description>Whether to show administrative links to other pages (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -292,7 +281,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <description>This tag renders a full h:panelGrid for administrative purposes for mobile data.</description> <source>resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl</source> <attribute> - <name>isShowPage</name> + <name>renderShowLink</name> <description>Whether this tag is used to show mobile data (default true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -316,7 +305,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <type>java.lang.Boolean</type> </attribute> <attribute> - <name>showAdminLinks</name> + <name>showAdminMiniLinks</name> <description>Whether to show administrative links to other pages (default: true).</description> <required>false</required> <type>java.lang.Boolean</type> @@ -370,114 +359,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. <type>java.lang.Boolean</type> </attribute> </tag> - <tag> - <tag-name>outputAdminFaxLinks</tag-name> - <description>This tag renders a full h:panelGroup for administrative links for fax data.</description> - <source>resources/tags/admin/links/fax/admin_fax_data.tpl</source> - <attribute> - <name>isShowPage</name> - <description>Whether this tag is used to show mobile data (default true).</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - <attribute> - <name>faxNumber</name> - <description>The fax instance that provides the data for this tag.</description> - <required>true</required> - <type>org.mxchange.jphone.model.phonenumbers.fax.DialableFaxNumber</type> - </attribute> - <attribute> - <name>contact</name> - <description>The contact instance that provides contact data for additional JSF links.</description> - <required>false</required> - <type>org.mxchange.jcontacts.model.contact.Contact</type> - </attribute> - <attribute> - <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - </tag> - <tag> - <tag-name>outputAdminLandLineLinks</tag-name> - <description>This tag renders a full h:panelGroup for administrative links for land-line data.</description> - <source>resources/tags/admin/panel_grids/landline/admin_landline_data.tpl</source> - <attribute> - <name>isShowPage</name> - <description>Whether this tag is used to show mobile data (default true).</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - <attribute> - <name>landLineNumber</name> - <description>The fax instance that provides the data for this tag.</description> - <required>true</required> - <type>org.mxchange.jphone.model.phonenumbers.landline.DialableLandLineNumber</type> - </attribute> - <attribute> - <name>contact</name> - <description>The contact instance that provides contact data for additional JSF links.</description> - <required>false</required> - <type>org.mxchange.jcontacts.model.contact.Contact</type> - </attribute> - <attribute> - <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - </tag> - <tag> - <tag-name>outputAdminMobileLinks</tag-name> - <description>This tag renders a full h:panelGroup for administrative links for mobile data.</description> - <source>resources/tags/admin/panel_grids/mobile/admin_mobile_data.tpl</source> - <attribute> - <name>isShowPage</name> - <description>Whether this tag is used to show mobile data (default true).</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - <attribute> - <name>mobileNumber</name> - <description>The mobile instance that provides the data for this tag.</description> - <required>true</required> - <type>org.mxchange.jphone.model.phonenumbers.mobile.DialableMobileNumber</type> - </attribute> - <attribute> - <name>contact</name> - <description>The contact instance that provides contact data for additional JSF links.</description> - <required>false</required> - <type>org.mxchange.jcontacts.model.contact.Contact</type> - </attribute> - <attribute> - <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - </tag> - <tag> - <tag-name>outputBasicDataAdminLinks</tag-name> - <description>This tag renders administrative links for given basicData instance.</description> - <source>resources/tags/admin/links/basic_data/admin_basic_data_links.tpl</source> - <attribute> - <name>basicData</name> - <description>The mobile instance that provides the data for this tag.</description> - <required>true</required> - <type></type> - </attribute> - <attribute> - <name>renderShowLink</name> - <description>Whether to render (default: yes) "show basic data" link.</description> - <required>false</required> - <type>java.langBoolean</type> - </attribute> - <attribute> - <name>rendered</name> - <description>Whether this tag is being rendered by JSF engine.</description> - <required>false</required> - <type>java.lang.Boolean</type> - </attribute> - </tag> </facelet-taglib> diff --git a/web/admin/basic_company_data/admin_basic_company_data_list.xhtml b/web/admin/basic_company_data/admin_basic_company_data_list.xhtml index f993a082..422a93d3 100644 --- a/web/admin/basic_company_data/admin_basic_company_data_list.xhtml +++ b/web/admin/basic_company_data/admin_basic_company_data_list.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -97,7 +98,7 @@ <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> </f:facet> - <widgets:outputBasicDataAdminLinks basicData="#{basicData}" /> + <links:outputBasicDataAdminMiniLinks basicData="#{basicData}" /> </h:column> </h:dataTable> diff --git a/web/admin/branch_offices/admin_branch_offices_list.xhtml b/web/admin/branch_offices/admin_branch_offices_list.xhtml index f432dd86..0a5e5b41 100644 --- a/web/admin/branch_offices/admin_branch_offices_list.xhtml +++ b/web/admin/branch_offices/admin_branch_offices_list.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -95,6 +96,14 @@ <f:convertDateTime for="branchCreated" type="both" timeStyle="short" dateStyle="short" /> </h:outputText> </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> + </f:facet> + + <links:outputBranchOfficeAdminMiniLinks branchOffice="#{branchOffice}" /> + </h:column> </h:dataTable> <h:form id="form_admin_add_branch_office"> diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index 2a04a577..286769a3 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -69,6 +70,14 @@ <f:convertDateTime for="contactCreated" type="both" timeStyle="short" dateStyle="short" /> </h:outputText> </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> + </f:facet> + + <links:outputContactAdminMiniLinks contact="#{contact}" /> + </h:column> </h:dataTable> <h:form id="form_admin_add_contact"> diff --git a/web/admin/contact/admin_contact_show.xhtml b/web/admin/contact/admin_contact_show.xhtml index 810e2310..6014cdc5 100644 --- a/web/admin/contact/admin_contact_show.xhtml +++ b/web/admin/contact/admin_contact_show.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -30,7 +31,7 @@ </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> - <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl" /> + <links:outputContactAdminMiniLinks contact="#{beanHelper.contact}" renderShowLink="false" /> </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> diff --git a/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml index 4b099c8c..ae302cd2 100644 --- a/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml @@ -43,7 +43,7 @@ </div> <div class="para"> - <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" contact="#{beanHelper.contact}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" contact="#{beanHelper.contact}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="table-footer"> diff --git a/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml index c3399e2d..2e51f891 100644 --- a/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml @@ -43,7 +43,7 @@ </div> <div class="para"> - <widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" contact="#{beanHelper.contact}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" contact="#{beanHelper.contact}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="table-footer"> diff --git a/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml index e758515e..9e532fd6 100644 --- a/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml +++ b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml @@ -43,7 +43,7 @@ </div> <div class="para"> - <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" contact="#{beanHelper.contact}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" contact="#{beanHelper.contact}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="table-footer"> diff --git a/web/admin/country/admin_country_list.xhtml b/web/admin/country/admin_country_list.xhtml index 9bb415b3..353859b1 100644 --- a/web/admin/country/admin_country_list.xhtml +++ b/web/admin/country/admin_country_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -48,6 +49,14 @@ <h:outputText value="#{msg[country.countryI18nKey]}" /> </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> + </f:facet> + + <links:outputCountryAdminMiniLinks country="#{country}" /> + </h:column> </h:dataTable> <h:form id="form_add_country"> diff --git a/web/admin/fax/admin_fax_delete.xhtml b/web/admin/fax/admin_fax_delete.xhtml index f63c5a79..78438eb2 100644 --- a/web/admin/fax/admin_fax_delete.xhtml +++ b/web/admin/fax/admin_fax_delete.xhtml @@ -31,7 +31,7 @@ </div> <div class="para"> - <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="para"> diff --git a/web/admin/fax/admin_fax_show.xhtml b/web/admin/fax/admin_fax_show.xhtml index 4fdeb105..56886416 100644 --- a/web/admin/fax/admin_fax_show.xhtml +++ b/web/admin/fax/admin_fax_show.xhtml @@ -22,7 +22,7 @@ </ui:define> <ui:define name="content"> - <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" isShowPage="true" /> + <widgets:outputAdminFaxPanelGrid faxNumber="#{beanHelper.faxNumber}" /> <h:dataTable id="contact_fax_link" var="contact" value="#{contactPhoneController.allCurrentFaxNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table-header-column" styleClass="table table-medium"> <f:facet name="header"> diff --git a/web/admin/landline/admin_landline_delete.xhtml b/web/admin/landline/admin_landline_delete.xhtml index 02b94bfa..51bfab4c 100644 --- a/web/admin/landline/admin_landline_delete.xhtml +++ b/web/admin/landline/admin_landline_delete.xhtml @@ -31,7 +31,7 @@ </div> <div class="para"> - <widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminLandLinePanelGrid landLineNumber="#{beanHelper.landLineNumber}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="para"> diff --git a/web/admin/mobile/admin_mobile_delete.xhtml b/web/admin/mobile/admin_mobile_delete.xhtml index 68e71060..d5f46a64 100644 --- a/web/admin/mobile/admin_mobile_delete.xhtml +++ b/web/admin/mobile/admin_mobile_delete.xhtml @@ -31,7 +31,7 @@ </div> <div class="para"> - <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" isShowPage="false" showAdminLinks="false" /> + <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" renderShowLink="false" showAdminMiniLinks="false" /> </div> <div class="para"> diff --git a/web/admin/mobile/admin_mobile_show.xhtml b/web/admin/mobile/admin_mobile_show.xhtml index d77a3866..722a3815 100644 --- a/web/admin/mobile/admin_mobile_show.xhtml +++ b/web/admin/mobile/admin_mobile_show.xhtml @@ -22,7 +22,7 @@ </ui:define> <ui:define name="content"> - <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" isShowPage="true" /> + <widgets:outputAdminMobilePanelGrid mobileNumber="#{beanHelper.mobileNumber}" /> <h:dataTable id="contact_mobile_link" var="contact" value="#{contactPhoneController.allCurrentMobileNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table-header-column" styleClass="table table-medium"> <f:facet name="header"> diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index e04645aa..270a7a5c 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -14,14 +15,14 @@ </ui:define> <ui:define name="content"> - <h:dataTable id="table_list_mobile" var="mobile" value="#{mobileProviderController.allMobileProviders()}" styleClass="table table-medium" headerClass="table-header-column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{not mobileProviderController.allMobileProviders().isEmpty()}"> + <h:dataTable id="table_list_mobile" var="mobileProvider" value="#{mobileProviderController.allMobileProviders()}" styleClass="table table-medium" headerClass="table-header-column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{not mobileProviderController.allMobileProviders().isEmpty()}"> <h:column> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_ID_NUMBER}" /> </f:facet> - <h:link outcome="admin_edit_mobile_provider" title="#{msg.ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE}" value="#{mobile.providerId}"> - <f:param name="providerId" value="#{mobile.providerId}" /> + <h:link outcome="admin_edit_mobile_provider" title="#{msg.ADMIN_LINK_EDIT_DELETE_MOBILE_PROVIDER_TITLE}" value="#{mobileProvider.providerId}"> + <f:param name="providerId" value="#{mobileProvider.providerId}" /> </h:link> </h:column> @@ -30,7 +31,7 @@ <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_NAME}" /> </f:facet> - <h:outputText value="#{mobile.providerName}" /> + <h:outputText value="#{mobileProvider.providerName}" /> </h:column> <h:column> @@ -38,7 +39,7 @@ <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_DIAL_PREFIX}" /> </f:facet> - <h:outputText value="#{mobile.providerDialPrefix}" /> + <h:outputText value="#{mobileProvider.providerDialPrefix}" /> </h:column> <h:column> @@ -46,7 +47,7 @@ <h:outputText value="#{msg.ADMIN_LIST_MOBILE_PROVIDER_COUNTRY}" /> </f:facet> - <h:outputText value="#{msg[mobile.providerCountry.countryI18nKey]}" /> + <h:outputText value="#{msg[mobileProvider.providerCountry.countryI18nKey]}" /> </h:column> <h:column> @@ -54,10 +55,18 @@ <h:outputText value="#{msg.ADMIN_LIST_ENTRY_CREATED}" /> </f:facet> - <h:outputText id="providerEntryCreated" value="#{mobile.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}"> + <h:outputText id="providerEntryCreated" value="#{mobileProvider.providerEntryCreated.time}" title="#{msg.ADMIN_MOBILE_PROVIDER_ENTRY_CREATED_TITLE}"> <f:convertDateTime for="providerEntryCreated" type="both" timeStyle="short" dateStyle="short" /> </h:outputText> </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> + </f:facet> + + <links:outputMobileProviderAdminMiniLinks mobileProvider="#{mobileProvider}" /> + </h:column> </h:dataTable> <h:form id="form_add_mobile_provider"> diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index 4b3f72a3..d3c5660c 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -87,6 +88,14 @@ <f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" /> </h:outputText> </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_ACTION_LINKS}" /> + </f:facet> + + <links:outputUserAdminMiniLinks user="#{user}" /> + </h:column> </h:dataTable> <h:panelGroup styleClass="table table-medium" layout="block"> diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index 37c80d32..f7bc6033 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -27,7 +28,7 @@ <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data.tpl" /> <h:panelGroup styleClass="para" layout="block"> - <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl" /> + <links:outputUserAdminLinks user="#{beanHelper.user}" renderShowLink="false" renderContactLinks="true" renderHeader="true" /> </h:panelGroup> <h:panelGroup styleClass="para" layout="block"> diff --git a/web/guest/user/user_list.xhtml b/web/guest/user/user_list.xhtml index b1726a33..a2fc13bf 100644 --- a/web/guest/user/user_list.xhtml +++ b/web/guest/user/user_list.xhtml @@ -2,6 +2,7 @@ <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" xmlns="http://www.w3.org/1999/xhtml" xmlns:widgets="http://mxchange.org/jsf/core/widgets" + xmlns:links="http://mxchange.org/jsf/core/links" xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> @@ -29,7 +30,7 @@ <h:outputText value="#{msg.USER_NAME}" /> </f:facet> - <widgets:outputUserProfileLink user="#{user}" /> + <links:outputUserProfileLink user="#{user}" /> </h:column> <h:column> -- 2.39.5