From 3a65d0cd6c072bb3b1d653829c17be8df3b6de4f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= <roland@mxchange.org> Date: Wed, 19 Apr 2017 16:52:47 +0200 Subject: [PATCH] Continued porting templates: - added a lot missing templates which are used for handling fax/land-line numbers - no more cellphone, now all mobiles are welcome ... - renamed files as they belong to user (not generic) 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 | 4 +- .../localization/bundle_en_US.properties | 4 +- web/WEB-INF/faces-config.xml | 4 +- web/admin/admin_logout.xhtml | 9 +- .../cellphone/admin_cellphone_delete.xhtml | 25 --- .../cellphone/admin_cellphone_edit.xhtml | 25 --- .../cellphone/admin_cellphone_show.xhtml | 92 --------- web/admin/contact/admin_contact_delete.xhtml | 31 ++- web/admin/contact/admin_contact_edit.xhtml | 29 ++- web/admin/contact/admin_contact_export.xhtml | 25 ++- web/admin/contact/admin_contact_list.xhtml | 25 ++- web/admin/contact/admin_contact_show.xhtml | 47 +++-- .../unlink/admin_contact_fax_unlink.xhtml | 77 +++++++ .../admin_contact_landline_unlink.xhtml | 77 +++++++ .../unlink/admin_contact_mobile_unlink.xhtml | 77 +++++++ web/admin/country/admin_country_delete.xhtml | 5 +- web/admin/country/admin_country_edit.xhtml | 4 +- web/admin/country/admin_country_list.xhtml | 10 +- web/admin/fax/admin_fax_delete.xhtml | 57 ++++++ web/admin/fax/admin_fax_edit.xhtml | 52 +++++ web/admin/fax/admin_fax_list.xhtml | 69 +++++++ web/admin/fax/admin_fax_show.xhtml | 96 +++++++++ web/admin/index.xhtml | 4 +- .../landline/admin_landline_delete.xhtml | 57 ++++++ web/admin/landline/admin_landline_edit.xhtml | 52 +++++ web/admin/landline/admin_landline_list.xhtml | 69 +++++++ web/admin/landline/admin_landline_show.xhtml | 96 +++++++++ .../admin_contact_mobile_list.xhtml} | 2 +- .../admin_contact_mobile_unlink.xhtml} | 0 web/admin/mobile/admin_mobile_delete.xhtml | 57 ++++++ web/admin/mobile/admin_mobile_edit.xhtml | 52 +++++ web/admin/mobile/admin_mobile_list.xhtml | 80 ++++++++ web/admin/mobile/admin_mobile_show.xhtml | 96 +++++++++ .../admin_mobile_provider_delete.xhtml | 4 +- .../admin_mobile_provider_edit.xhtml | 4 +- .../admin_mobile_provider_list.xhtml | 12 +- .../admin_mobile_provider_show.xhtml | 4 +- web/admin/user/admin_user_activity_log.xhtml | 115 +++++++++++ web/admin/user/admin_user_delete.xhtml | 57 +++++- web/admin/user/admin_user_edit.xhtml | 33 +-- web/admin/user/admin_user_export.xhtml | 24 ++- web/admin/user/admin_user_list.xhtml | 52 +++-- web/admin/user/admin_user_lock.xhtml | 49 +++-- .../admin_user_resend_confirmation_link.xhtml | 70 +++++++ web/admin/user/admin_user_show.xhtml | 192 +++--------------- web/admin/user/admin_user_unlock.xhtml | 81 ++++++-- web/exception.xhtml | 4 +- web/guest/user/confirm_account.xhtml | 50 ----- web/guest/user/user_confirm_account.xhtml | 58 ++++++ web/guest/user/user_list.xhtml | 70 +++---- web/guest/user/user_login.xhtml | 46 +++++ ...st_passwd.xhtml => user_lost_passwd.xhtml} | 17 +- web/guest/user/user_profile.xhtml | 37 +++- .../{register.xhtml => user_register.xhtml} | 20 +- ...er_done.xhtml => user_register_done.xhtml} | 4 +- ..._page2.xhtml => user_register_page2.xhtml} | 9 +- ...send_done.xhtml => user_resend_done.xhtml} | 4 +- ...send_link.xhtml => user_resend_link.xhtml} | 23 ++- ...book.xhtml => user_show_addressbook.xhtml} | 0 .../user/user_show_addressbook_entries.xhtml | 22 ++ web/imprint.xhtml | 4 +- web/index.xhtml | 35 +++- web/privacy.xhtml | 4 +- web/terms.xhtml | 4 +- web/user/login_data_saved.xhtml | 4 +- web/user/login_index.xhtml | 6 +- web/user/login_logout.xhtml | 9 +- .../login_user_change_email_address.xhtml | 78 +++---- web/user/login_user_change_password.xhtml | 125 ++++++------ .../login_user_change_personal_data.xhtml | 42 ++-- web/user/login_user_contact_data_saved.xhtml | 42 ++++ web/user/login_user_data_saved.xhtml | 4 +- 72 files changed, 2098 insertions(+), 729 deletions(-) delete mode 100644 web/admin/cellphone/admin_cellphone_delete.xhtml delete mode 100644 web/admin/cellphone/admin_cellphone_edit.xhtml delete mode 100644 web/admin/cellphone/admin_cellphone_show.xhtml create mode 100644 web/admin/contact/unlink/admin_contact_fax_unlink.xhtml create mode 100644 web/admin/contact/unlink/admin_contact_landline_unlink.xhtml create mode 100644 web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml create mode 100644 web/admin/fax/admin_fax_delete.xhtml create mode 100644 web/admin/fax/admin_fax_edit.xhtml create mode 100644 web/admin/fax/admin_fax_list.xhtml create mode 100644 web/admin/fax/admin_fax_show.xhtml create mode 100644 web/admin/landline/admin_landline_delete.xhtml create mode 100644 web/admin/landline/admin_landline_edit.xhtml create mode 100644 web/admin/landline/admin_landline_list.xhtml create mode 100644 web/admin/landline/admin_landline_show.xhtml rename web/admin/{cellphone/admin_contact_cellphone_list.xhtml => mobile/admin_contact_mobile_list.xhtml} (76%) rename web/admin/{cellphone/admin_contact_cellphone_unlink.xhtml => mobile/admin_contact_mobile_unlink.xhtml} (100%) create mode 100644 web/admin/mobile/admin_mobile_delete.xhtml create mode 100644 web/admin/mobile/admin_mobile_edit.xhtml create mode 100644 web/admin/mobile/admin_mobile_list.xhtml create mode 100644 web/admin/mobile/admin_mobile_show.xhtml create mode 100644 web/admin/user/admin_user_activity_log.xhtml create mode 100644 web/admin/user/admin_user_resend_confirmation_link.xhtml delete mode 100644 web/guest/user/confirm_account.xhtml create mode 100644 web/guest/user/user_confirm_account.xhtml create mode 100644 web/guest/user/user_login.xhtml rename web/guest/user/{lost_passwd.xhtml => user_lost_passwd.xhtml} (81%) rename web/guest/user/{register.xhtml => user_register.xhtml} (66%) rename web/guest/user/{register_done.xhtml => user_register_done.xhtml} (90%) rename web/guest/user/{register_page2.xhtml => user_register_page2.xhtml} (79%) rename web/guest/user/{resend_done.xhtml => user_resend_done.xhtml} (87%) rename web/guest/user/{resend_link.xhtml => user_resend_link.xhtml} (72%) rename web/guest/user/{show_addressbook.xhtml => user_show_addressbook.xhtml} (100%) create mode 100644 web/guest/user/user_show_addressbook_entries.xhtml create mode 100644 web/user/login_user_contact_data_saved.xhtml diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index d2043782..f8678729 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -122,8 +122,8 @@ MENU_LOGOUT_TITLE=Ausloggen CLICK_HERE=hier GUEST_ALREADY_USER_CONTINUE_LOGIN_1=Sie sind bereits angemeldet? Dann GUEST_ALREADY_USER_CONTINUE_LOGIN_2=einloggen. -PAGE_TITLE_LOGIN_HOME=Willkommen zum Benutzerbereich -CONTENT_TITLE_LOGIN_HOME=\u00dcbersicht Ihrer Bewerbungen: +PAGE_TITLE_USER_LOGIN_HOME=Willkommen zum Benutzerbereich +CONTENT_TITLE_USER_LOGIN_HOME=\u00dcbersicht Ihrer Bewerbungen: LINK_LOGIN_LOGOUT=Ausloggen COUNTRY_GERMANY=Deutschland COUNTRY_PHILIPPINES=Philippinen diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index c72724a3..efbec523 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -122,8 +122,8 @@ MENU_LOGOUT_TITLE=Logout CLICK_HERE=here GUEST_ALREADY_USER_CONTINUE_LOGIN_1=Already registered? Then click GUEST_ALREADY_USER_CONTINUE_LOGIN_2=to login. -PAGE_TITLE_LOGIN_HOME=Welcome to user area -CONTENT_TITLE_LOGIN_HOME=Overview of your applications: +PAGE_TITLE_USER_LOGIN_HOME=Welcome to user area +CONTENT_TITLE_USER_LOGIN_HOME=Overview of your applications: LINK_LOGIN_LOGOUT=Logout PAGE_TITLE_LOGIN_AREA=User area COUNTRY_GERMANY=Germany diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 01afd1f1..60130680 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -164,11 +164,11 @@ </navigation-case> <navigation-case> <from-outcome>user_show_addressbook</from-outcome> - <to-view-id>/guest/user/show_addressbook.xhtml</to-view-id> + <to-view-id>/guest/user/user_show_addressbook.xhtml</to-view-id> </navigation-case> <navigation-case> <from-outcome>show_addressbook_entries</from-outcome> - <to-view-id>/guest/user/show_addressbook_entries.xhtml</to-view-id> + <to-view-id>/guest/user/user_show_addressbook_entries.xhtml</to-view-id> </navigation-case> </navigation-rule> <navigation-rule> diff --git a/web/admin/admin_logout.xhtml b/web/admin/admin_logout.xhtml index faec4153..7e5a13f3 100644 --- a/web/admin/admin_logout.xhtml +++ b/web/admin/admin_logout.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LOGOUT}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LOGOUT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LOGOUT}" /> @@ -16,7 +18,7 @@ <ui:define name="content"> <h:form id="form_admin_logout"> - <div class="table"> + <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_LOGOUT_TITLE}" /> </div> @@ -26,10 +28,9 @@ </div> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" action="#{userLoginController.doAdminLogout()}" value="#{msg.BUTTON_USER_LOGOUT}" /> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/cellphone/admin_cellphone_delete.xhtml b/web/admin/cellphone/admin_cellphone_delete.xhtml deleted file mode 100644 index 072aae18..00000000 --- a/web/admin/cellphone/admin_cellphone_delete.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html - lang="#{localizationController.language}" xml:lang="#{localizationController.language}" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - > - - <f:metadata> - <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> - </f:metadata> - - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_CELLPHONE}</ui:define> - - <ui:define name="content_header"> - <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_CELLPHONE}" /> - </ui:define> - - <ui:define name="content"> - Here goes your content. - </ui:define> - </ui:composition> -</html> diff --git a/web/admin/cellphone/admin_cellphone_edit.xhtml b/web/admin/cellphone/admin_cellphone_edit.xhtml deleted file mode 100644 index e48c4042..00000000 --- a/web/admin/cellphone/admin_cellphone_edit.xhtml +++ /dev/null @@ -1,25 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html - lang="#{localizationController.language}" xml:lang="#{localizationController.language}" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - > - - <f:metadata> - <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> - </f:metadata> - - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_CELLPHONE}</ui:define> - - <ui:define name="content_header"> - <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_CELLPHONE}" /> - </ui:define> - - <ui:define name="content"> - Here goes your content. - </ui:define> - </ui:composition> -</html> diff --git a/web/admin/cellphone/admin_cellphone_show.xhtml b/web/admin/cellphone/admin_cellphone_show.xhtml deleted file mode 100644 index bd140ab7..00000000 --- a/web/admin/cellphone/admin_cellphone_show.xhtml +++ /dev/null @@ -1,92 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html - lang="#{localizationController.language}" xml:lang="#{localizationController.language}" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - > - - <f:metadata> - <f:viewParam name="phoneId" value="#{adminPhoneController.cellPhone}" converter="CellphoneConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> - </f:metadata> - - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CELLPHONE}</ui:define> - - <ui:define name="content_header"> - <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_CELLPHONE}" /> - </ui:define> - - <ui:define name="content"> - <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_data.tpl"> - <ui:param name="isShowPage" value="#{true}" /> - </ui:include> - - <h:dataTable id="contact_cellphone_link" var="contact" value="#{contactPhoneController.allMobileContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_CELLPHONE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> - <f:facet name="header"> - <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CELLPHONE_LINKS}"> - <f:param value="#{adminPhoneController.cellPhone.phoneId}" /> - </h:outputFormat> - </f:facet> - - <h:column> - <h:outputLabel for="contactId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" /> - - <h:link id="contactId" styleClass="data_field" outcome="admin_show_contact"> - <h:outputText value="#{contact.contactId}" /> - <f:param name="contactId" value="#{contact.contactId}" /> - </h:link> - </h:column> - - <h:column> - <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" /> - - <h:outputText id="contactGender" styleClass="data_field" value="#{msg[contact.contactGender.messageKey]}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" /> - - <h:outputText id="contactTitle" styleClass="data_field" value="#{contact.contactTitle}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" /> - - <h:outputText id="contactFirstName" styleClass="data_field" value="#{contact.contactFirstName}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" /> - - <h:outputText id="contactFamilyName" styleClass="data_field" value="#{contact.contactFamilyName}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" /> - - <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{contact.contactEmailAddress}"> - <h:outputText value="#{contact.contactEmailAddress}" /> - </h:outputLink> - </h:column> - - <h:column> - <h:outputLabel styleClass="data_label" value="#{msg.ADMIN_SHOW_CELLPHONE_UNLINK}" /> - - <div class="data_field"> - <ul class="mini_nav"> - <li class="mini_link"> - <h:link outcome="admin_unlink_contact_cellphone"> - <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" /> - <f:param name="phoneId" value="#{adminPhoneController.cellPhone.phoneId}" /> - <f:param name="contactId" value="#{contact.contactId}" /> - </h:link> - </li> - </ul> - </div> - </h:column> - </h:dataTable> - </ui:define> - </ui:composition> -</html> diff --git a/web/admin/contact/admin_contact_delete.xhtml b/web/admin/contact/admin_contact_delete.xhtml index c332e485..9707352b 100644 --- a/web/admin/contact/admin_contact_delete.xhtml +++ b/web/admin/contact/admin_contact_delete.xhtml @@ -7,23 +7,32 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyContactToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_CONTACT}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyContactToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_CONTACT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_CONTACT}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" /> + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}"> - <div class="table"> + <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_TITLE}"> <f:param value="#{beanHelper.contact.contactId}" /> @@ -34,13 +43,13 @@ <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_NOTICE}" /> </div> - <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" /> + <ui:include src="/WEB-INF/templates/admin/contact/admin_show_contact_data.tpl" /> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="delete_button" type="submit" id="delete_contact" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" /> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/contact/admin_contact_edit.xhtml b/web/admin/contact/admin_contact_edit.xhtml index 2026b38f..000a0b7d 100644 --- a/web/admin/contact/admin_contact_edit.xhtml +++ b/web/admin/contact/admin_contact_edit.xhtml @@ -7,23 +7,32 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyContactToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_CONTACT}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + <f:viewAction action="#{beanHelper.copyContactToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_CONTACT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_CONTACT}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" /> + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <h:form id="form_admin_edit_user" rendered="#{not empty beanHelper.contact}"> - <div class="table"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputFormat value="#{msg.ADMIN_EDIT_CONTACT_TITLE}"> <f:param value="#{beanHelper.contact.contactId}" /> @@ -39,10 +48,10 @@ </ui:include> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="edit_contact" value="#{msg.BUTTON_ADMIN_EDIT_CONTACT}" action="#{adminContactController.editContactData()}" /> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/contact/admin_contact_export.xhtml b/web/admin/contact/admin_contact_export.xhtml index 6ba68ed4..e42651ff 100644 --- a/web/admin/contact/admin_contact_export.xhtml +++ b/web/admin/contact/admin_contact_export.xhtml @@ -9,21 +9,30 @@ xmlns:p="http://primefaces.org/ui"> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EXPORT_CONTACT}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EXPORT_CONTACT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EXPORT_CONTACT}" /> </ui:define> <ui:define name="content"> - <h:form id="form_export_contacts"> - <p:dataTable id="table_export_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table_big" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}" rendered="#{not contactController.allContacts().isEmpty()}"> + <ui:fragment rendered="#{contactController.allContacts().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_CONTACT_LIST_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:form id="form_export_contacts" rendered="#{not contactController.allContacts().isEmpty()}"> + <p:dataTable id="table_export_contacts" var="contact" value="#{contactController.allContacts()}" tableStyleClass="table_full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_CONTACT}"> <p:column exportable="false"> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_ID}" /> </f:facet> - <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_TITLE}" value="#{contact.contactId}"> + <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}"> <f:param name="contactId" value="#{contact.contactId}" /> </h:link> </p:column> @@ -120,10 +129,10 @@ <p:column> <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_CELLPHONE_NUMBER}" /> + <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_MOBILE_NUMBER}" /> </f:facet> - <h:outputText value="#{adminContactController.generateCellphoneNumber(contact.contactCellphoneNumber)}" /> + <h:outputText value="#{adminContactController.generateMobileNumber(contact.contactMobileNumber)}" /> </p:column> <p:column> @@ -153,7 +162,7 @@ </p:column> </p:dataTable> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_EXPORT_CONTACTS_TITLE}" /> </div> @@ -167,7 +176,7 @@ <p:dataExporter type="xls" target="table_export_contacts" fileName="all_contacts" /> </h:commandButton> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/contact/admin_contact_list.xhtml b/web/admin/contact/admin_contact_list.xhtml index 5a101fd7..5f2cae8c 100644 --- a/web/admin/contact/admin_contact_list.xhtml +++ b/web/admin/contact/admin_contact_list.xhtml @@ -8,20 +8,29 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT}" /> </ui:define> <ui:define name="content"> - <h:dataTable id="table_list_contacts" var="contact" value="#{contactController.allContacts()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" rendered="#{not contactController.allContacts().isEmpty()}"> + <ui:fragment rendered="#{contactController.allContacts().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_CONTACT_LIST_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:dataTable id="table_list_contacts" var="contact" value="#{contactController.allContacts()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CONTACT}" rendered="#{not contactController.allContacts().isEmpty()}"> <h:column> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_CONTACT_ID}" /> </f:facet> - <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_TITLE}" value="#{contact.contactId}"> + <h:link outcome="admin_show_contact" title="#{msg.ADMIN_LINK_SHOW_CONTACT_DATA_TITLE}" value="#{contact.contactId}"> <f:param name="contactId" value="#{contact.contactId}" /> </h:link> </h:column> @@ -69,8 +78,8 @@ </h:column> </h:dataTable> - <div class="table_medium"> - <h:form id="form_admin_add_contact"> + <h:form id="form_admin_add_contact"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_ADD_CONTACT_TITLE}" /> </div> @@ -82,11 +91,11 @@ <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl" /> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="add_contact" value="#{msg.BUTTON_ADMIN_ADD_CONTACT}" action="#{adminContactController.addContact()}" /> </div> - </h:form> - </div> + </h:panelGroup> + </h:form> </ui:define> </ui:composition> </html> diff --git a/web/admin/contact/admin_contact_show.xhtml b/web/admin/contact/admin_contact_show.xhtml index facf5b99..b8368b89 100644 --- a/web/admin/contact/admin_contact_show.xhtml +++ b/web/admin/contact/admin_contact_show.xhtml @@ -7,30 +7,49 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyContactToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyContactToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_CONTACT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_CONTACT}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty beanHelper.contact}" /> + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{not empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/admin/contact/admin_show_contact_data.tpl" /> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl" /> + </div> - <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" /> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl" /> + </div> - <div> - <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl" /> - </div> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl" /> + </div> - <div> - <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl" /> - </div> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl" /> + </div> + </ui:fragment> </ui:define> </ui:composition> </html> diff --git a/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml new file mode 100644 index 00000000..92b938f3 --- /dev/null +++ b/web/admin/contact/unlink/admin_contact_fax_unlink.xhtml @@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_unlink_contact_fax" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber == beanHelper.faxNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_FAX_NUMBER_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" /> + </div> + + <div class="para"> + <h:link outcome="admin_show_contact"> + <h:outputText value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}" /> + <f:param name="contactId" value="#{beanHelper.contact.contactId}" /> + </h:link> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="unlink_button" type="submit" id="unlink_fax" value="#{msg.BUTTON_ADMIN_UNLINK_FAX_NUMBER}" action="#{adminContactPhoneController.unlinkFaxContactData()}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.faxNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_FAX_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.faxNumber and not empty beanHelper.contact and beanHelper.contact.contactFaxNumber != beanHelper.faxNumber}"> + <f:param value="#{beanHelper.faxNumber.phoneId}" /> + <f:param value="#{beanHelper.contact.contactId}" /> + </h:outputFormat> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml new file mode 100644 index 00000000..83c4aec9 --- /dev/null +++ b/web/admin/contact/unlink/admin_contact_landline_unlink.xhtml @@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_unlink_contact_landline" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber == beanHelper.landLineNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_LAND_LINE_NUMBER_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" /> + </div> + + <div class="para"> + <h:link outcome="admin_show_contact"> + <h:outputText value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}" /> + <f:param name="contactId" value="#{beanHelper.contact.contactId}" /> + </h:link> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="unlink_button" type="submit" id="unlink_landline" value="#{msg.BUTTON_ADMIN_UNLINK_LAND_LINE_NUMBER}" action="#{adminContactPhoneController.unlinkLandLineContactData()}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_LAND_LINE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.landLineNumber and not empty beanHelper.contact and beanHelper.contact.contactLandLineNumber != beanHelper.landLineNumber}"> + <f:param value="#{beanHelper.landLineNumber.phoneId}" /> + <f:param value="#{beanHelper.contact.contactId}" /> + </h:outputFormat> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml new file mode 100644 index 00000000..ef2a67d5 --- /dev/null +++ b/web/admin/contact/unlink/admin_contact_mobile_unlink.xhtml @@ -0,0 +1,77 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewParam name="contactId" value="#{beanHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLINK_CONTACT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_unlink_contact_mobile" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber == beanHelper.mobileNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_UNLINK_CONTACT_MOBILE_NUMBER_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data_mini.tpl" /> + </div> + + <div class="para"> + <h:link outcome="admin_show_contact"> + <h:outputText value="#{msg.ADMIN_SHOW_FULL_CONTACT_DATA}" /> + <f:param name="contactId" value="#{beanHelper.contact.contactId}" /> + </h:link> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="unlink_button" type="submit" id="unlink_mobile" value="#{msg.BUTTON_ADMIN_UNLINK_MOBILE_NUMBER}" action="#{adminContactPhoneController.unlinkMobileContactData()}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{empty beanHelper.contact}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_CONTACT_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_MOBILE_NUMBER_CONTACT_NOT_LINKED}" rendered="#{not empty beanHelper.mobileNumber and not empty beanHelper.contact and beanHelper.contact.contactMobileNumber != beanHelper.mobileNumber}"> + <f:param value="#{beanHelper.mobileNumber.phoneId}" /> + <f:param value="#{beanHelper.contact.contactId}" /> + </h:outputFormat> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/country/admin_country_delete.xhtml b/web/admin/country/admin_country_delete.xhtml index cfe3270c..256dc932 100644 --- a/web/admin/country/admin_country_delete.xhtml +++ b/web/admin/country/admin_country_delete.xhtml @@ -1,3 +1,4 @@ + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="#{localizationController.language}" xml:lang="#{localizationController.language}" @@ -8,7 +9,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_COUNTRY}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_COUNTRY}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_COUNTRY}" /> diff --git a/web/admin/country/admin_country_edit.xhtml b/web/admin/country/admin_country_edit.xhtml index 6183baa3..f52766e4 100644 --- a/web/admin/country/admin_country_edit.xhtml +++ b/web/admin/country/admin_country_edit.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_COUNTRY}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_COUNTRY}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_COUNTRY}" /> diff --git a/web/admin/country/admin_country_list.xhtml b/web/admin/country/admin_country_list.xhtml index 21463e08..d821574a 100644 --- a/web/admin/country/admin_country_list.xhtml +++ b/web/admin/country/admin_country_list.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_COUNTRY}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_COUNTRY}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_COUNTRY}" /> @@ -52,7 +54,7 @@ </h:dataTable> <h:form id="form_add_country"> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_ADD_COUNTRY_TITLE}" /> </div> @@ -60,10 +62,10 @@ <ui:include src="/WEB-INF/templates/admin/country/admin_form_country_data.tpl" /> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="add_country" value="#{msg.BUTTON_ADMIN_ADD_COUNTRY}" action="#{adminCountryController.addCountry()}" /> </div> - </div> + </h:panelGroup> <div class="para notice"> <h:outputText value="#{msg.ADMIN_ADD_COUNTRY_NOTICES}" /> diff --git a/web/admin/fax/admin_fax_delete.xhtml b/web/admin/fax/admin_fax_delete.xhtml new file mode 100644 index 00000000..6c575941 --- /dev/null +++ b/web/admin/fax/admin_fax_delete.xhtml @@ -0,0 +1,57 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_FAX}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_FAX}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_delete_fax" rendered="#{not empty beanHelper.faxNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_DELETE_FAX_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="para"> + <h:outputText value="#{msg.ADMIN_DELETE_FAX_DATA_NOTICE}" /> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="delete_button" type="submit" id="delete_fax" value="#{msg.BUTTON_ADMIN_DELETE_FAX}" action="#{adminPhoneController.deleteFaxData(beanHelper.faxNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.faxNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/fax/admin_fax_edit.xhtml b/web/admin/fax/admin_fax_edit.xhtml new file mode 100644 index 00000000..984dcfe2 --- /dev/null +++ b/web/admin/fax/admin_fax_edit.xhtml @@ -0,0 +1,52 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewAction action="#{beanHelper.copyFaxNumberToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_edit_fax" rendered="#{not empty beanHelper.faxNumber}"> + <h:panelGroup styleClass="table_medium" layout="block"> + <div class="table_header"> + <h:outputFormat value="#{msg.ADMIN_EDIT_FAX_NUMBER_TITLE}"> + <f:param value="#{beanHelper.faxNumber.phoneId}" /> + </h:outputFormat> + </div> + + <ui:include src="/WEB-INF/templates/admin/fax/admin_form_fax_data.tpl" /> + + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="submit" type="submit" id="edit_fax" value="#{msg.BUTTON_ADMIN_EDIT_FAX_NUMBER}" action="#{adminPhoneController.editFaxData(beanHelper.faxNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.faxNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_FAX_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/fax/admin_fax_list.xhtml b/web/admin/fax/admin_fax_list.xhtml new file mode 100644 index 00000000..e6606f80 --- /dev/null +++ b/web/admin/fax/admin_fax_list.xhtml @@ -0,0 +1,69 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:dataTable id="table_list_fax" var="faxNumber" value="#{phoneController.allFaxNumbers()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_FAXS}" rendered="#{not phoneController.allFaxNumbers().isEmpty()}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </f:facet> + + <h:link outcome="admin_show_fax"> + <h:outputText value="#{faxNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{faxNumber.phoneId}" /> + </h:link> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputLabel for="faxNumber" value="#{msg.ADMIN_SHOW_PHONE_NUMBER}" /> + </f:facet> + + <h:outputText id="faxNumber" value="#{faxNumber.phoneCountry.countryAbroadDialPrefix}#{faxNumber.phoneCountry.countryPhoneCode} (#{faxNumber.phoneAreaCode}) #{faxNumber.phoneNumber}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" /> + </f:facet> + + <h:outputText value="#{faxNumber.phoneEntryCreated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" /> + </f:facet> + + <h:outputText value="#{faxNumber.phoneEntryUpdated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + </h:dataTable> + + <ui:fragment rendered="#{phoneController.allFaxNumbers().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_LIST_FAX_NUMBER_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/fax/admin_fax_show.xhtml b/web/admin/fax/admin_fax_show.xhtml new file mode 100644 index 00000000..1c2773d3 --- /dev/null +++ b/web/admin/fax/admin_fax_show.xhtml @@ -0,0 +1,96 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.faxNumber}" converter="FaxNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_FAX_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_data.tpl"> + <ui:param name="isShowPage" value="#{true}" /> + </ui:include> + + <h:dataTable id="contact_fax_link" var="contact" value="#{contactPhoneController.allFaxNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> + <f:facet name="header"> + <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_FAX_NUMBER_LINKS}"> + <f:param value="#{beanHelper.faxNumber.phoneId}" /> + </h:outputFormat> + </f:facet> + + <h:column> + <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" /> + + <h:link id="contactId" styleClass="table_data_field" outcome="admin_show_contact"> + <h:outputText value="#{contact.contactId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </h:column> + + <h:column> + <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" /> + + <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[contact.contactGender.messageKey]}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" /> + + <h:outputText id="contactTitle" styleClass="table_data_field" value="#{contact.contactTitle}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" /> + + <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{contact.contactFirstName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" /> + + <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{contact.contactFamilyName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" /> + + <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{contact.contactEmailAddress}"> + <h:outputText value="#{contact.contactEmailAddress}" /> + </h:outputLink> + </h:column> + + <h:column> + <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_UNLINK_DATA}" /> + + <div class="table_data_field"> + <ul class="mini_nav"> + <li class="mini_link"> + <h:link outcome="admin_unlink_contact_fax"> + <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{beanHelper.faxNumber.phoneId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </li> + </ul> + </div> + </h:column> + </h:dataTable> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/index.xhtml b/web/admin/index.xhtml index c764ee06..4f9e2292 100644 --- a/web/admin/index.xhtml +++ b/web/admin/index.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_WELCOME}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_WELCOME}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_WELCOME}" /> diff --git a/web/admin/landline/admin_landline_delete.xhtml b/web/admin/landline/admin_landline_delete.xhtml new file mode 100644 index 00000000..a3a1bbba --- /dev/null +++ b/web/admin/landline/admin_landline_delete.xhtml @@ -0,0 +1,57 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_LAND_LINE}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_LAND_LINE}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_delete_landline" rendered="#{not empty beanHelper.landLineNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_DELETE_LAND_LINE_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="para"> + <h:outputText value="#{msg.ADMIN_DELETE_LAND_LINE_DATA_NOTICE}" /> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="delete_button" type="submit" id="delete_landline" value="#{msg.BUTTON_ADMIN_DELETE_LAND_LINE}" action="#{adminPhoneController.deleteLandLineData(beanHelper.landLineNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/landline/admin_landline_edit.xhtml b/web/admin/landline/admin_landline_edit.xhtml new file mode 100644 index 00000000..ce87dc57 --- /dev/null +++ b/web/admin/landline/admin_landline_edit.xhtml @@ -0,0 +1,52 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewAction action="#{beanHelper.copyLandLineNumberToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_edit_landline" rendered="#{not empty beanHelper.landLineNumber}"> + <h:panelGroup styleClass="table_medium" layout="block"> + <div class="table_header"> + <h:outputFormat value="#{msg.ADMIN_EDIT_LAND_LINE_NUMBER_TITLE}"> + <f:param value="#{beanHelper.landLineNumber.phoneId}" /> + </h:outputFormat> + </div> + + <ui:include src="/WEB-INF/templates/admin/landline/admin_form_landline_data.tpl" /> + + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="submit" type="submit" id="edit_landline" value="#{msg.BUTTON_ADMIN_EDIT_LAND_LINE_NUMBER}" action="#{adminPhoneController.editLandLineData(beanHelper.landLineNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.landLineNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_LAND_LINE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/landline/admin_landline_list.xhtml b/web/admin/landline/admin_landline_list.xhtml new file mode 100644 index 00000000..354478e6 --- /dev/null +++ b/web/admin/landline/admin_landline_list.xhtml @@ -0,0 +1,69 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:dataTable id="table_list_landline" var="landLineNumber" value="#{phoneController.allLandLineNumbers()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_LAND_LINES}" rendered="#{not phoneController.allLandLineNumbers().isEmpty()}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </f:facet> + + <h:link outcome="admin_show_landline"> + <h:outputText value="#{landLineNumber.phoneId}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{landLineNumber.phoneId}" /> + </h:link> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_NUMBER}" /> + </f:facet> + + <h:outputText value="#{landLineNumber.phoneCountry.countryAbroadDialPrefix}#{landLineNumber.phoneCountry.countryPhoneCode} (#{landLineNumber.phoneAreaCode}) #{landLineNumber.phoneNumber}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" /> + </f:facet> + + <h:outputText value="#{landLineNumber.phoneEntryCreated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" /> + </f:facet> + + <h:outputText value="#{landLineNumber.phoneEntryUpdated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + </h:dataTable> + + <ui:fragment rendered="#{phoneController.allLandLineNumbers().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_LIST_LAND_LINE_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/landline/admin_landline_show.xhtml b/web/admin/landline/admin_landline_show.xhtml new file mode 100644 index 00000000..e14c2bc7 --- /dev/null +++ b/web/admin/landline/admin_landline_show.xhtml @@ -0,0 +1,96 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.landLineNumber}" converter="LandLineNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_LAND_LINE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_data.tpl"> + <ui:param name="isShowPage" value="#{true}" /> + </ui:include> + + <h:dataTable id="contact_landline_link" var="contact" value="#{contactPhoneController.allLandLineNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> + <f:facet name="header"> + <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_LAND_LINE_NUMBER_LINKS}"> + <f:param value="#{beanHelper.landLineNumber.phoneId}" /> + </h:outputFormat> + </f:facet> + + <h:column> + <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" /> + + <h:link id="contactId" styleClass="table_data_field" outcome="admin_show_contact"> + <h:outputText value="#{contact.contactId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </h:column> + + <h:column> + <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" /> + + <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[contact.contactGender.messageKey]}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" /> + + <h:outputText id="contactTitle" styleClass="table_data_field" value="#{contact.contactTitle}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" /> + + <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{contact.contactFirstName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" /> + + <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{contact.contactFamilyName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" /> + + <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{contact.contactEmailAddress}"> + <h:outputText value="#{contact.contactEmailAddress}" /> + </h:outputLink> + </h:column> + + <h:column> + <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_UNLINK_DATA}" /> + + <div class="table_data_field"> + <ul class="mini_nav"> + <li class="mini_link"> + <h:link outcome="admin_unlink_contact_landline"> + <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{beanHelper.landLineNumber.phoneId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </li> + </ul> + </div> + </h:column> + </h:dataTable> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/cellphone/admin_contact_cellphone_list.xhtml b/web/admin/mobile/admin_contact_mobile_list.xhtml similarity index 76% rename from web/admin/cellphone/admin_contact_cellphone_list.xhtml rename to web/admin/mobile/admin_contact_mobile_list.xhtml index 2881b151..b8c0d07b 100644 --- a/web/admin/cellphone/admin_contact_cellphone_list.xhtml +++ b/web/admin/mobile/admin_contact_mobile_list.xhtml @@ -15,7 +15,7 @@ </ui:define> <ui:define name="content"> - <h:dataTable id="table_list_cellphones" var="cellphone" value="#{phoneController.allCellphones()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CELLPHONES}" rendered="#{not phoneController.allCellphones().isEmpty()}"> + <h:dataTable id="table_list_mobiles" var="mobile" value="#{phoneController.allCellphones()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_CELLPHONES}" rendered="#{not phoneController.allCellphones().isEmpty()}"> <h:column> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_SHOW_CELLPHONE_ID}" /> diff --git a/web/admin/cellphone/admin_contact_cellphone_unlink.xhtml b/web/admin/mobile/admin_contact_mobile_unlink.xhtml similarity index 100% rename from web/admin/cellphone/admin_contact_cellphone_unlink.xhtml rename to web/admin/mobile/admin_contact_mobile_unlink.xhtml diff --git a/web/admin/mobile/admin_mobile_delete.xhtml b/web/admin/mobile/admin_mobile_delete.xhtml new file mode 100644 index 00000000..de23aa3f --- /dev/null +++ b/web/admin/mobile/admin_mobile_delete.xhtml @@ -0,0 +1,57 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_delete_mobile" rendered="#{not empty beanHelper.mobileNumber}"> + <h:panelGroup styleClass="table" layout="block"> + <div class="table_header"> + <h:outputText value="#{msg.ADMIN_DELETE_MOBILE_TITLE}" /> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl"> + <ui:param name="isShowPage" value="#{false}" /> + <ui:param name="showAdminLinks" value="#{false}" /> + </ui:include> + </div> + + <div class="para"> + <h:outputText value="#{msg.ADMIN_DELETE_MOBILE_DATA_NOTICE}" /> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="delete_button" type="submit" id="delete_mobile" value="#{msg.BUTTON_ADMIN_DELETE_MOBILE_NUMBER}" action="#{adminPhoneController.deleteMobileData(beanHelper.mobileNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/mobile/admin_mobile_edit.xhtml b/web/admin/mobile/admin_mobile_edit.xhtml new file mode 100644 index 00000000..88328ed0 --- /dev/null +++ b/web/admin/mobile/admin_mobile_edit.xhtml @@ -0,0 +1,52 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + <f:viewAction action="#{beanHelper.copyMobileNumberToController()}" /> + </f:metadata> + </ui:define> + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:form id="form_edit_mobile" rendered="#{not empty beanHelper.mobileNumber}"> + <h:panelGroup styleClass="table_medium" layout="block"> + <div class="table_header"> + <h:outputFormat value="#{msg.ADMIN_EDIT_MOBILE_NUMBER_TITLE}"> + <f:param value="#{beanHelper.mobileNumber.phoneId}" /> + </h:outputFormat> + </div> + + <ui:include src="/WEB-INF/templates/admin/mobile/admin_form_mobile_data.tpl" /> + + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="submit" type="submit" id="edit_mobile" value="#{msg.BUTTON_ADMIN_EDIT_MOBILE_NUMBER}" action="#{adminPhoneController.editMobileData(beanHelper.mobileNumber)}" /> + </div> + </h:panelGroup> + </h:form> + + <ui:fragment rendered="#{empty beanHelper.mobileNumber}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_BEAN_HELPER_MOBILE_NUMBER_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/mobile/admin_mobile_list.xhtml b/web/admin/mobile/admin_mobile_list.xhtml new file mode 100644 index 00000000..6c4dcad1 --- /dev/null +++ b/web/admin/mobile/admin_mobile_list.xhtml @@ -0,0 +1,80 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_CONTACT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_CONTACT_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content"> + <h:dataTable id="table_list_mobile" var="mobile" value="#{phoneController.allMobileNumbers()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILES}" rendered="#{not phoneController.allMobileNumbers().isEmpty()}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_ID}" /> + </f:facet> + + <h:link outcome="admin_show_mobile"> + <h:outputText value="#{mobile.phoneId}" title="#{msg.ADMIN_LINK_SHOW_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{mobile.phoneId}" /> + </h:link> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_MOBILE_PROVIDER_NAME}" /> + </f:facet> + + <h:link outcome="admin_show_mobile_provider"> + <f:param name="providerId" value="#{mobile.mobileProvider.providerId}" /> + <h:outputText value="#{mobile.mobileProvider.providerName}" /> + </h:link> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_MOBILE_NUMBER_COMPLETE}" /> + </f:facet> + + <h:outputText value="#{mobile.mobileProvider.providerCountry.countryExternalDialPrefix}#{mobile.mobileProvider.providerDialPrefix}-#{mobile.phoneNumber}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_CREATED}" /> + </f:facet> + + <h:outputText value="#{mobile.phoneEntryCreated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PHONE_UPDATED}" /> + </f:facet> + + <h:outputText value="#{mobile.phoneEntryUpdated.time}"> + <f:convertDateTime type="both" /> + </h:outputText> + </h:column> + </h:dataTable> + + <ui:fragment rendered="#{phoneController.allMobileNumbers().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_LIST_MOBILE_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/mobile/admin_mobile_show.xhtml b/web/admin/mobile/admin_mobile_show.xhtml new file mode 100644 index 00000000..8332a7c1 --- /dev/null +++ b/web/admin/mobile/admin_mobile_show.xhtml @@ -0,0 +1,96 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="phoneId" value="#{beanHelper.mobileNumber}" converter="MobileNumberConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_PHONE_ID_NOT_SET}" /> + </f:metadata> + </ui:define> + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_MOBILE_NUMBER}" /> + </ui:define> + + <ui:define name="content_header"> + #{msg.CONTENT_TITLE_ADMIN_SHOW_MOBILE_NUMBER} + </ui:define> + + <ui:define name="content"> + <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_data.tpl"> + <ui:param name="isShowPage" value="#{true}" /> + </ui:include> + + <h:dataTable id="contact_mobile_link" var="contact" value="#{contactPhoneController.allMobileNumberContacts()}" summary="#{msg.TABLE_SUMMARY_ADMIN_SHOW_ADMINISTRATIVE_LINKS}" headerClass="table_header_column" styleClass="table_medium"> + <f:facet name="header"> + <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_MOBILE_NUMBER_LINKS}"> + <f:param value="#{beanHelper.mobileNumber.phoneId}" /> + </h:outputFormat> + </f:facet> + + <h:column> + <h:outputLabel for="contactId" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_ID}" /> + + <h:link id="contactId" styleClass="table_data_field" outcome="admin_show_contact"> + <h:outputText value="#{contact.contactId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </h:column> + + <h:column> + <h:outputLabel for="contactGender" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_GENDER}" /> + + <h:outputText id="contactGender" styleClass="table_data_field" value="#{msg[contact.contactGender.messageKey]}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactTitle" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_TITLE}" /> + + <h:outputText id="contactTitle" styleClass="table_data_field" value="#{contact.contactTitle}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFirstName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" /> + + <h:outputText id="contactFirstName" styleClass="table_data_field" value="#{contact.contactFirstName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactFamilyName" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" /> + + <h:outputText id="contactFamilyName" styleClass="table_data_field" value="#{contact.contactFamilyName}" /> + </h:column> + + <h:column> + <h:outputLabel for="contactEmailAddress" styleClass="table_data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" /> + + <h:outputLink id="contactEmailAddress" styleClass="table_data_field" value="mailto:#{contact.contactEmailAddress}"> + <h:outputText value="#{contact.contactEmailAddress}" /> + </h:outputLink> + </h:column> + + <h:column> + <h:outputLabel styleClass="table_data_label" value="#{msg.ADMIN_UNLINK_DATA}" /> + + <div class="table_data_field"> + <ul class="mini_nav"> + <li class="mini_link"> + <h:link outcome="admin_unlink_contact_mobile"> + <h:outputText styleClass="unlink_link" value="#{msg.ADMIN_LINK_UNLINK_SHORT}" title="#{msg.ADMIN_LINK_UNLINK_SHORT_TITLE}" /> + <f:param name="phoneId" value="#{beanHelper.mobileNumber.phoneId}" /> + <f:param name="contactId" value="#{contact.contactId}" /> + </h:link> + </li> + </ul> + </div> + </h:column> + </h:dataTable> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/mobile_provider/admin_mobile_provider_delete.xhtml b/web/admin/mobile_provider/admin_mobile_provider_delete.xhtml index 04eba36c..1553f750 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_delete.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_delete.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_DELETE}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_DELETE}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_DELETE}" /> diff --git a/web/admin/mobile_provider/admin_mobile_provider_edit.xhtml b/web/admin/mobile_provider/admin_mobile_provider_edit.xhtml index 16242a6d..b4a05224 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_edit.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_edit.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_EDIT}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_EDIT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_EDIT}" /> diff --git a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml index 557e4726..6593d0d7 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_list.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_list.xhtml @@ -8,14 +8,16 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_MOBILE_PROVIDER_LIST}" /> </ui:define> <ui:define name="content"> - <h:dataTable id="table_list_mobile" var="mobile" value="#{mobileProviderController.allMobileProvider()}" styleClass="table_medium" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_MOBILE_PROVIDERS}" rendered="#{mobileProviderController.hasMobileProvider()}"> + <h:dataTable id="table_list_mobile" var="mobile" value="#{mobileProviderController.allMobileProviders()}" styleClass="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_LIST_MOBILE_PROVIDER_ID}" /> @@ -62,7 +64,7 @@ </h:dataTable> <h:form id="form_add_mobile_provider"> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_TITLE}" /> </div> @@ -70,10 +72,10 @@ <ui:include src="/WEB-INF/templates/admin/mobile_provider/admin_form_mobile_provider.tpl" /> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="add_mobile_provider" value="#{msg.BUTTON_ADMIN_ADD_MOBILE_PROVIDER}" action="#{adminMobileProviderController.addMobileProvider()}" /> </div> - </div> + </h:panelGroup> <div class="para notice"> <h:outputText value="#{msg.ADMIN_ADD_MOBILE_PROVIDER_NOTICES}" /> diff --git a/web/admin/mobile_provider/admin_mobile_provider_show.xhtml b/web/admin/mobile_provider/admin_mobile_provider_show.xhtml index 85ed97ce..fb95c150 100644 --- a/web/admin/mobile_provider/admin_mobile_provider_show.xhtml +++ b/web/admin/mobile_provider/admin_mobile_provider_show.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_MOBILE_PROVIDER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_MOBILE_PROVIDER}" /> diff --git a/web/admin/user/admin_user_activity_log.xhtml b/web/admin/user/admin_user_activity_log.xhtml new file mode 100644 index 00000000..84858cab --- /dev/null +++ b/web/admin/user/admin_user_activity_log.xhtml @@ -0,0 +1,115 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_USER_ACTIVITY_LOG}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_USER_ACTIVITY_LOG}" /> + </ui:define> + + <ui:define name="content"> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:dataTable id="table_user_activity_log" var="userActivity" value="#{userActivityController.fetchCurrentUsersActivityLog()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USER_ACTIVITY_LOG}" rendered="#{not empty beanHelper.user}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_ID}" /> + </f:facet> + + <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{userActivity.activityUser.userId}"> + <f:param name="userId" value="#{userActivity.activityUser.userId}" /> + </h:link> + </h:column> + + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" /> + </f:facet> + + <h:outputText value="#{userActivity.activityUserName}" /> + </h:column> + </ui:fragment> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_SHOW_PRINCIPAL_NAME}" /> + </f:facet> + + <h:outputText value="#{userActivity.activityPrincipalName}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_GENDER}" /> + </f:facet> + + <h:outputText value="#{msg[userActivity.activityContactGender.messageKey]}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_FIRST_NAME}" /> + </f:facet> + + <h:outputText value="#{userActivity.activityContactFirstName}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_FAMILY_NAME}" /> + </f:facet> + + <h:outputText value="#{userActivity.activityContactFamilyName}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_ACTIVIRY_LOG_MESSAGE}" /> + </f:facet> + + <h:outputText value="#{userActivity.activityMessage}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_ACTIVIRY_LOG_TYPE}" /> + </f:facet> + + <h:outputText value="#{msg[userActivityController.expandAdminActivityType(userActivity.activityType)]}" /> + </h:column> + + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_ACTIVITY_LOG_TIMESTAMP}" /> + </f:facet> + + <h:outputText id="userCreated" value="#{userActivity.activityTimestamp.time}"> + <f:convertDateTime for="userCreated" type="both" timeStyle="short" dateStyle="short" /> + </h:outputText> + </h:column> + </h:dataTable> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/user/admin_user_delete.xhtml b/web/admin/user/admin_user_delete.xhtml index d6d207cb..f62ff88c 100644 --- a/web/admin/user/admin_user_delete.xhtml +++ b/web/admin/user/admin_user_delete.xhtml @@ -7,22 +7,63 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyUserToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_DELETE_USER}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_DELETE_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_DELETE_USER}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" /> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:form id="form_admin_delete_user" rendered="#{not empty beanHelper.user}"> + <h:panelGroup styleClass="table_medium" layout="block"> + <div class="table_header"> + <h:outputFormat value="#{msg.ADMIN_DELETE_USER_TITLE}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + </div> + + <div class="para notice"> + <h:outputFormat value="#{msg.ADMIN_DELETE_USER_NOTICE}" /> + </div> + + <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl" /> + + <div class="table_row"> + <div class="table_left25_medium"> + <h:outputLabel for="userDeleteReason" value="#{msg.ADMIN_USER_DELETE_REASON}" /> + </div> + + <div class="table_right75_medium"> + <h:inputTextarea id="userDeleteReason" styleClass="input" value="#{adminUserController.userDeleteReason}" rows="8" cols="45" /> + </div> + + <div class="clear"></div> + </div> - Here goes your content. + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="delete_button" type="submit" id="delete_user" value="#{msg.BUTTON_ADMIN_DELETE_USER}" action="#{adminUserController.deleteUserData(beanHelper.user)}" /> + </div> + </h:panelGroup> + </h:form> </ui:define> </ui:composition> </html> diff --git a/web/admin/user/admin_user_edit.xhtml b/web/admin/user/admin_user_edit.xhtml index ab76d04b..8a706644 100644 --- a/web/admin/user/admin_user_edit.xhtml +++ b/web/admin/user/admin_user_edit.xhtml @@ -7,29 +7,38 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyUserToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EDIT_USER}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EDIT_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EDIT_USER}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" /> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <h:form id="form_edit_user" rendered="#{not empty beanHelper.user}"> - <div class="table"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> - #{msg.ADMIN_EDIT_USER_TITLE} + <h:outputText value="#{msg.ADMIN_EDIT_USER_TITLE}" /> </div> <div class="para notice"> - #{msg.ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE} + <h:outputText value="#{msg.ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE}" /> </div> <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_data.tpl"> @@ -37,10 +46,10 @@ </ui:include> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="edit_user" value="#{msg.BUTTON_ADMIN_EDIT_USER}" action="#{adminUserController.editUserData()}" /> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/user/admin_user_export.xhtml b/web/admin/user/admin_user_export.xhtml index 0d87a41a..49638be8 100644 --- a/web/admin/user/admin_user_export.xhtml +++ b/web/admin/user/admin_user_export.xhtml @@ -5,19 +5,27 @@ xmlns:ui="http://xmlns.jcp.org/jsf/facelets" xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core" - xmlns:p="http://primefaces.org/ui"> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_EXPORT_USER}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_EXPORT_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_EXPORT_USER}" /> </ui:define> <ui:define name="content"> - <h:form id="form_export_users"> - <p:dataTable id="table_export_users" var="user" value="#{userController.allUsers()}" tableStyleClass="table_big" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_USER}" rendered="#{not userController.allUsers().isEmpty()}"> + <ui:fragment rendered="#{userController.allUsers().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_USER_LIST_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:form id="form_export_users" rendered="#{not userController.allUsers().isEmpty()}"> + <p:dataTable id="table_export_users" var="user" value="#{userController.allUsers()}" tableStyleClass="table_full" paginator="true" rows="10" summary="#{msg.TABLE_SUMMARY_ADMIN_EXPORT_USER}"> <p:column exportable="false"> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_EXPORT_USER_ID}" /> @@ -138,10 +146,10 @@ <p:column> <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_CELLPHONE_NUMBER}" /> + <h:outputText value="#{msg.ADMIN_EXPORT_CONTACT_MOBILE_NUMBER}" /> </f:facet> - <h:outputText value="#{adminContactController.generateCellphoneNumber(user.userContact.contactCellphoneNumber)}" /> + <h:outputText value="#{adminContactController.generateMobileNumber(user.userContact.contactMobileNumber)}" /> </p:column> <p:column> @@ -171,7 +179,7 @@ </p:column> </p:dataTable> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_EXPORT_USERS_TITLE}" /> </div> @@ -185,7 +193,7 @@ <p:dataExporter type="xls" target="table_export_users" fileName="all_users" /> </h:commandButton> </div> - </div> + </h:panelGroup> </h:form> </ui:define> </ui:composition> diff --git a/web/admin/user/admin_user_list.xhtml b/web/admin/user/admin_user_list.xhtml index f6a238f6..02a58ddb 100644 --- a/web/admin/user/admin_user_list.xhtml +++ b/web/admin/user/admin_user_list.xhtml @@ -8,14 +8,23 @@ > <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LIST_USER}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LIST_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LIST_USER}" /> </ui:define> <ui:define name="content"> - <h:dataTable id="table_list_users" var="user" value="#{userController.allUsers()}" styleClass="table_big" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{not userController.allUsers().isEmpty()}"> + <ui:fragment rendered="#{userController.allUsers().isEmpty()}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ADMIN_USER_LIST_EMPTY}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:dataTable id="table_list_users" var="user" value="#{userController.allUsers()}" styleClass="table_full" headerClass="table_header_column" summary="#{msg.TABLE_SUMMARY_ADMIN_LIST_USERS}" rendered="#{not userController.allUsers().isEmpty()}"> <h:column> <f:facet name="header"> <h:outputText value="#{msg.ADMIN_LIST_USER_ID}" /> @@ -26,13 +35,15 @@ </h:link> </h:column> - <h:column> - <f:facet name="header"> - <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" /> - </f:facet> + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}"> + <h:column> + <f:facet name="header"> + <h:outputText value="#{msg.ADMIN_LIST_USER_NAME}" /> + </f:facet> - <h:outputText value="#{user.userName}" /> - </h:column> + <h:outputText value="#{user.userName}" /> + </h:column> + </ui:fragment> <h:column> <f:facet name="header"> @@ -85,14 +96,15 @@ </h:column> </h:dataTable> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <h:form id="admin_add_user"> <div class="table_header"> <h:outputText value="#{msg.ADMIN_ADD_USER_TITLE}" /> </div> - <div class="para"> - <fieldset id="user_contact"> + <!-- Whether select contact data .. //--> + <div id="admin_user_personal_data_option_1" class="para"> + <fieldset class="fieldset" id="user_contact"> <legend title="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND_TITLE}"> <h:outputText value="#{msg.ADMIN_SELECT_USER_CONTACT_LEGEND}" /> </legend> @@ -103,8 +115,7 @@ </div> <div class="table_right_medium"> - <h:selectOneMenu styleClass="select" id="userContact" value="#{beanHelper.contact}"> - <f:converter converterId="ContactConverter" /> + <h:selectOneMenu styleClass="select" id="userContact" value="#{beanHelper.contact}" converter="ContactConverter"> <f:selectItem itemValue="" itemLabel="#{msg.NONE_SELECTED}" /> <f:selectItems value="#{contactController.selectableContacts()}" var="contact" itemValue="#{contact}" itemLabel="#{contact.contactId}: #{msg[contact.contactGender.messageKey]} #{contact.contactFirstName} #{contact.contactFamilyName}" /> </h:selectOneMenu> @@ -116,17 +127,24 @@ </div> <div class="para"> - <h:outputText value="#{msg.ADMIN_ADD_USER_OR_ENTER_CONTACT_DATA}" /> + <h:outputText value="#{msg.ADMIN_ADD_OR_ENTER_CONTACT_DATA}" /> + </div> + + <!-- ... or enter it directly together it creating user account //--> + <div id="admin_user_personal_data_option_2"> + <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" /> </div> - <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_personal_data.tpl" /> + <ui:include src="/WEB-INF/templates/admin/user/admin_form_user_data.tpl"> + <ui:param name="mode" value="add" /> + </ui:include> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="add_user" value="#{msg.BUTTON_ADMIN_ADD_USER}" action="#{adminUserController.addUser()}" /> </div> </h:form> - </div> + </h:panelGroup> </ui:define> </ui:composition> </html> diff --git a/web/admin/user/admin_user_lock.xhtml b/web/admin/user/admin_user_lock.xhtml index 1468eaca..74860144 100644 --- a/web/admin/user/admin_user_lock.xhtml +++ b/web/admin/user/admin_user_lock.xhtml @@ -8,23 +8,32 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyUserToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_LOCK_USER}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_LOCK_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_LOCK_USER}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" /> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'CONFIRMED'}"> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputFormat value="#{msg.ADMIN_LOCK_USER_TITLE}"> <f:param value="#{beanHelper.user.userName}" /> @@ -38,7 +47,7 @@ </div> <div> - <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> + <h:outputFormat id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> </div> </div> @@ -48,7 +57,7 @@ </div> <div> - <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" /> + <h:outputFormat id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" /> </div> </div> @@ -58,7 +67,7 @@ </div> <div> - <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" /> + <h:outputFormat id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" /> </div> </div> @@ -68,21 +77,27 @@ </div> <div> - <h:inputTextarea id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}" /> - - <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" /> + <h:inputTextarea styleClass="input" id="userLockReason" value="#{adminUserController.userLockReason}" cols="50" rows="10" required="true" requiredMessage="#{msg.ADMIN_USER_UNLOCK_REASON_REQUIRED}" /> </div> </div> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.lockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_LOCK_USER_ACCOUNT}" /> </div> - </div> + </h:panelGroup> </h:form> - <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" /> + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_LOCK_USER_ACCOUNT_LOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> </ui:define> </ui:composition> </html> diff --git a/web/admin/user/admin_user_resend_confirmation_link.xhtml b/web/admin/user/admin_user_resend_confirmation_link.xhtml new file mode 100644 index 00000000..036f97cc --- /dev/null +++ b/web/admin/user/admin_user_resend_confirmation_link.xhtml @@ -0,0 +1,70 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_RESEND_USER_CONFIRMATION_LINK}" /> + </ui:define> + + <ui:define name="content"> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"> + <h:panelGroup styleClass="table_medium" layout="block"> + <div class="table_header"> + <h:outputFormat value="#{msg.ADMIN_RESEND_USER_CONFIRMATION_LINK_TITLE}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + </div> + + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data_mini.tpl" /> + </div> + + <div class="para"> + <h:outputText styleClass="notice" value="#{msg.ADMIN_RESEND_USER_CONFIRMATION_LINK_NOTICE}" /> + </div> + + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + + <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.resendConfirmationLink(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_RESEND_USER_CONFIRMATION_LINK_ACCOUNT}" /> + </div> + </h:panelGroup> + </h:form> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_UNLOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_RESEND_USER_CONFIRMATION_LINK_ACCOUNT_LOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + </ui:define> + </ui:composition> +</html> diff --git a/web/admin/user/admin_user_show.xhtml b/web/admin/user/admin_user_show.xhtml index e92cee10..cbe6b44a 100644 --- a/web/admin/user/admin_user_show.xhtml +++ b/web/admin/user/admin_user_show.xhtml @@ -7,184 +7,46 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyUserToController()}" /> - </f:metadata> - <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_SHOW_USER}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> + + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_SHOW_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_SHOW_USER}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" /> - - <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_USER}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty beanHelper.user}"> - <f:facet name="header"> - <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_USER}"> - <f:param value="#{beanHelper.user.userName}" /> - <f:param value="#{beanHelper.user.userId}" /> - </h:outputFormat> - </f:facet> - - <h:column> - <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_USER_ID}" /> - - <h:outputText id="userId" styleClass="data_field" value="#{beanHelper.user.userId}" /> - </h:column> - - <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}"> - <h:column> - <h:outputLabel for="userName" styleClass="data_label" value="#{msg.ADMIN_USER_NAME}" /> - - <h:outputText id="userName" styleClass="data_field" value="#{beanHelper.user.userName}" /> - </h:column> - </ui:fragment> - - <h:column> - <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CREATED}" /> - - <h:outputText id="userCreated" styleClass="data_field" value="#{beanHelper.user.userCreated.time}"> - <f:convertDateTime for="userCreated" type="both" /> - </h:outputText> - </h:column> - - <h:column> - <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_UPDATED}" /> - - <h:outputText id="userUpdated" styleClass="data_field" value="#{beanHelper.user.userUpdated.time}"> - <f:convertDateTime for="userUpdated" type="both" /> - </h:outputText> - </h:column> - - <h:column> - <h:outputLabel for="userAccountStatus" styleClass="data_label" value="#{msg.ADMIN_USER_ACCOUNT_STATUS}" /> - - <h:outputText id="userAccountStatus" styleClass="data_field #{beanHelper.user.userAccountStatus.styleClass}" value="#{msg[beanHelper.user.userAccountStatus.messageKey]}" /> - </h:column> - - <h:column> - <h:outputLabel for="userProfileMode" styleClass="data_label" value="#{msg.ADMIN_USER_PROFILE_MODE}" /> - - <h:outputText id="userProfileMode" styleClass="data_field" value="#{msg[beanHelper.user.userProfileMode.messageKey]}" /> - </h:column> - - <h:column> - <h:outputLabel for="userLastLocked" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED}" /> - - <h:outputText id="userLastLocked" styleClass="data_field" value="#{beanHelper.user.userLastLocked.time}"> - <f:convertDateTime for="userLastLocked" type="both" /> - </h:outputText> - </h:column> - - <h:column> - <h:outputLabel for="lastLockedReason" styleClass="data_label" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" /> - - <h:outputText id="lastLockedReason" styleClass="data_field" value="#{beanHelper.user.userLastLockedReason}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactCreated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_CREATED}" /> - - <h:outputText id="contactCreated" styleClass="data_field" value="#{beanHelper.user.userContact.contactCreated.time}"> - <f:convertDateTime for="contactCreated" type="both" /> - </h:outputText> - </h:column> - - <h:column> - <h:outputLabel for="contactUpdated" styleClass="data_label" value="#{msg.ADMIN_USER_CONTACT_UPDATED}" /> - - <h:outputText id="contactUpdated" styleClass="data_field" value="#{beanHelper.user.userContact.contactUpdated.time}"> - <f:convertDateTime for="contactUpdated" type="both" /> - </h:outputText> - </h:column> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> - <h:column> - <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" /> + <ui:include src="/WEB-INF/templates/admin/user/admin_show_user_data.tpl" /> - <h:outputText id="isOwnContact" styleClass="data_field" value="#{beanHelper.user.userContact.isOwnContact()}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactGender" styleClass="data_label" value="#{msg.ADMIN_CONTACT_GENDER}" /> - - <h:outputText id="contactGender" styleClass="data_field" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactTitle" styleClass="data_label" value="#{msg.ADMIN_CONTACT_TITLE}" /> - - <h:outputText id="contactTitle" styleClass="data_field" value="#{beanHelper.user.userContact.contactTitle}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactFirstName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FIRST_NAME}" /> - - <h:outputText id="contactFirstName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFirstName}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactFamilyName" styleClass="data_label" value="#{msg.ADMIN_CONTACT_FAMILY_NAME}" /> - - <h:outputText id="contactFamilyName" styleClass="data_field" value="#{beanHelper.user.userContact.contactFamilyName}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactStreet" styleClass="data_label" value="#{msg.ADMIN_CONTACT_STREET}" /> - - <h:outputText id="contactStreet" styleClass="data_field" value="#{beanHelper.user.userContact.contactStreet}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactHouseNumber" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER}" /> - - <h:outputText id="contactHouseNumber" styleClass="data_field" value="#{beanHelper.user.userContact.contactHouseNumber}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactHouseNumberExtension" styleClass="data_label" value="#{msg.ADMIN_CONTACT_HOUSE_NUMBER_EXTENSION}" /> - - <h:outputText id="contactHouseNumberExtension" styleClass="data_field" value="#{beanHelper.user.userContact.contactHouseNumberExtension}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactZipCode" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ZIP_CODE}" /> - - <h:outputText id="contactZipCode" styleClass="data_field" value="#{beanHelper.user.userContact.contactZipCode}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactCity" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CITY}" /> - - <h:outputText id="contactCity" styleClass="data_field" value="#{beanHelper.user.userContact.contactCity}" /> - </h:column> - - <h:column> - <h:outputLabel for="contactEmailAddress" styleClass="data_label" value="#{msg.ADMIN_CONTACT_EMAIL_ADDRESS}" /> - - <h:outputLink id="contactEmailAddress" styleClass="data_field" value="mailto:#{beanHelper.user.userContact.contactEmailAddress}"> - <h:outputText value="#{beanHelper.user.userContact.contactEmailAddress}" /> - </h:outputLink> - </h:column> - - <h:column> - <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" /> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl" /> + </div> - <h:outputText id="contactBirthday" styleClass="data_field" value="#{beanHelper.user.userContact.contactBirthday.time}"> - <f:convertDateTime for="contactBirthday" type="date" /> - </h:outputText> - </h:column> - </h:panelGrid> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/landline/admin_landline_add_show.tpl" /> + </div> - <div> - <ui:include src="/WEB-INF/templates/admin/user/admin_user_links.tpl" /> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/mobile/admin_mobile_add_show.tpl" /> </div> - <div> - <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl" /> + <div class="para"> + <ui:include src="/WEB-INF/templates/admin/fax/admin_fax_add_show.tpl" /> </div> </ui:define> </ui:composition> diff --git a/web/admin/user/admin_user_unlock.xhtml b/web/admin/user/admin_user_unlock.xhtml index d5b45feb..ec1edd88 100644 --- a/web/admin/user/admin_user_unlock.xhtml +++ b/web/admin/user/admin_user_unlock.xhtml @@ -7,23 +7,32 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <f:metadata> - <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> - <f:viewAction action="#{beanHelper.copyUserToController()}" /> - </f:metadata> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="userId" value="#{beanHelper.user}" converter="UserConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_USER_ID_NOT_SET}" /> + <f:viewAction onPostback="true" action="#{beanHelper.copyUserToController()}" /> + </f:metadata> + </ui:define> <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl"> - <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}</ui:define> + <ui:define name="admin_title"> + <h:outputText value="#{msg.PAGE_TITLE_ADMIN_UNLOCK_USER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_ADMIN_UNLOCK_USER}" /> </ui:define> <ui:define name="content"> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_ID_NOT_FOUND}" rendered="#{empty beanHelper.user}" /> + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_ID_NOT_FOUND}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <h:form id="form_admin_user_unlock" rendered="#{not empty beanHelper.user and beanHelper.user.userAccountStatus == 'LOCKED'}"> - <div class="table_medium"> + <h:panelGroup styleClass="table_medium" layout="block"> <div class="table_header"> <h:outputFormat value="#{msg.ADMIN_UNLOCK_USER_TITLE}"> <f:param value="#{beanHelper.user.userName}" /> @@ -32,56 +41,86 @@ </div> <div class="para"> - <div> + <div class="table_data_label"> + <h:outputText value="#{msg.ADMIN_SHOW_USER_ID}" /> + </div> + + <div class="table_data_field"> + <h:link outcome="admin_show_user" title="#{msg.ADMIN_LINK_SHOW_USER_TITLE}" value="#{beanHelper.user.userId}"> + <f:param name="userId" value="#{beanHelper.user.userId}" /> + </h:link> + </div> + </div> + + <div class="para"> + <div class="table_data_label"> <h:outputLabel for="contactGender" value="#{msg.PERSONAL_DATA_GENDER}" /> </div> - <div> + <div class="table_data_field"> <h:outputText id="contactGender" value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> </div> </div> <div class="para"> - <div> + <div class="table_data_label"> <h:outputLabel for="contactFirstName" value="#{msg.PERSONAL_DATA_FIRST_NAME}" /> </div> - <div> + <div class="table_data_field"> <h:outputText id="contactFirstName" value="#{beanHelper.user.userContact.contactFirstName}" /> </div> </div> <div class="para"> - <div> + <div class="table_data_label"> <h:outputLabel for="contactFamilyName" value="#{msg.PERSONAL_DATA_FAMILY_NAME}" /> </div> - <div> + <div class="table_data_field"> <h:outputText id="contactFamilyName" value="#{beanHelper.user.userContact.contactFamilyName}" /> </div> </div> <div class="para"> - <div> - <h:outputLabel for="userLockReason" value="#{msg.ADMIN_ENTER_USER_LOCK_REASON}" /> + <div class="table_data_label"> + <h:outputLabel for="userLastLocked" value="#{msg.ADMIN_USER_LAST_LOCKED}" /> </div> - <div> - <h:outputText value="#{adminUserController.userLockReason}" rendered="#{beanHelper.user.userAccountStatus == 'LOCKED'}" /> + <div class="table_data_field"> + <h:outputText id="userLastLocked" value="#{beanHelper.user.userLastLocked.time}"> + <f:convertDateTime for="userLastLocked" type="both" /> + </h:outputText> + </div> + </div> + + <div class="para"> + <div class="table_data_label"> + <h:outputLabel for="userLockReason" value="#{msg.ADMIN_USER_LAST_LOCKED_REASON}" /> + </div> - <h:outputText value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" /> + <div class="table_data_field"> + <h:outputText id="userLockReason" value="#{beanHelper.user.userLastLockedReason}" /> </div> </div> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" action="#{adminUserController.unlockUserAccount(beanHelper.user)}" value="#{msg.BUTTON_ADMIN_UNLOCK_USER_ACCOUNT}" /> </div> - </div> + </h:panelGroup> </h:form> - <h:outputText styleClass="errors" value="#{msg.ERROR_CANNOT_UN_LOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}" /> + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNCONFIRMED}" rendered="#{beanHelper.user.userAccountStatus == 'UNCONFIRMED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> + + <h:outputFormat styleClass="errors" value="#{msg.ERROR_ADMIN_CANNOT_UNLOCK_USER_ACCOUNT_UNLOCKED}" rendered="#{beanHelper.user.userAccountStatus == 'CONFIRMED'}"> + <f:param value="#{beanHelper.user.userName}" /> + <f:param value="#{beanHelper.user.userId}" /> + </h:outputFormat> </ui:define> </ui:composition> </html> diff --git a/web/exception.xhtml b/web/exception.xhtml index 296d7284..0e145b20 100644 --- a/web/exception.xhtml +++ b/web/exception.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_EXCEPTION_THROWN}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_EXCEPTION_THROWN}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_EXCEPTION_THROWN}" /> diff --git a/web/guest/user/confirm_account.xhtml b/web/guest/user/confirm_account.xhtml deleted file mode 100644 index c38d0f63..00000000 --- a/web/guest/user/confirm_account.xhtml +++ /dev/null @@ -1,50 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html - lang="#{localizationController.language}" xml:lang="#{localizationController.language}" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core" - > - - <f:metadata> - <f:viewParam name="confirmKey" value="#{confirmationLinkController.confirmationKey}" /> - <f:viewAction onPostback="true" action="#{confirmationLinkController.maybeConfirmUserAccount()}" /> - </f:metadata> - - <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_CONFIRM_ACCOUNT}</ui:define> - - <ui:define name="content_header"> - <h:outputText value="#{msg.CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT}" /> - </ui:define> - - <ui:define name="content"> - <ui:fragment rendered="#{not empty confirmationLinkController.confirmationKey}"> - <ui:fragment rendered="#{not empty beanHelper.user}"> - <div class="table"> - <div class="table_header"> - <h:outputText value="#{msg.GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE}" /> - </div> - - <div class="table_row"> - <h:outputFormat value="#{msg.GUEST_USER_CONFIRM_ACCOUNT_DONE}"> - <f:param value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> - <f:param value="#{beanHelper.user.userContact.contactFirstName}" /> - <f:param value="#{beanHelper.user.userContact.contactFamilyName}" /> - </h:outputFormat> - </div> - </div> - </ui:fragment> - - <ui:fragment rendered="#{empty beanHelper.user}"> - <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" /> - </ui:fragment> - </ui:fragment> - - <ui:fragment rendered="#{empty confirmationLinkController.confirmationKey}"> - <h:outputText styleClass="errors" value="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" /> - </ui:fragment> - </ui:define> - </ui:composition> -</html> diff --git a/web/guest/user/user_confirm_account.xhtml b/web/guest/user/user_confirm_account.xhtml new file mode 100644 index 00000000..f394d378 --- /dev/null +++ b/web/guest/user/user_confirm_account.xhtml @@ -0,0 +1,58 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam name="confirmKey" value="#{confirmationLinkController.confirmationKey}" /> + <f:viewAction onPostback="true" action="#{confirmationLinkController.maybeConfirmUserAccount()}" /> + </f:metadata> + </ui:define> + + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_CONFIRM_ACCOUNT}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_INDEX_CONFIRM_ACCOUNT}" /> + </ui:define> + + <ui:define name="content"> + <ui:fragment rendered="#{not empty confirmationLinkController.confirmationKey}"> + <h:panelGroup styleClass="table" layout="block" rendered="#{not empty beanHelper.user}"> + <div class="table_header"> + <h:outputText value="#{msg.GUEST_CONFIRM_USER_ACCOUNT_DONE_TITLE}" /> + </div> + + <div class="table_row"> + <h:outputFormat value="#{msg.GUEST_USER_CONFIRM_ACCOUNT_DONE}"> + <f:param value="#{msg[beanHelper.user.userContact.contactGender.messageKey]}" /> + <f:param value="#{beanHelper.user.userContact.contactFirstName}" /> + <f:param value="#{beanHelper.user.userContact.contactFamilyName}" /> + </h:outputFormat> + </div> + </h:panelGroup> + + <ui:fragment rendered="#{empty beanHelper.user}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.GUEST_CONFIRMATION_LINK_INVALID}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:fragment> + + <ui:fragment rendered="#{empty confirmationLinkController.confirmationKey}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.GUEST_CONFIRMATION_KEY_NOT_SET}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/guest/user/user_list.xhtml b/web/guest/user/user_list.xhtml index 897b9ef9..38fcfdbc 100644 --- a/web/guest/user/user_list.xhtml +++ b/web/guest/user/user_list.xhtml @@ -2,57 +2,45 @@ <html lang="#{localizationController.language}" xml:lang="#{localizationController.language}" xmlns="http://www.w3.org/1999/xhtml" - xmlns:ui="http://xmlns.jcp.org/jsf/facelets" - xmlns:h="http://xmlns.jcp.org/jsf/html" - xmlns:f="http://xmlns.jcp.org/jsf/core"> + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core"> <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_USER_LIST}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LIST}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_LIST}" /> </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{featureController.isFeatureEnabled('user_list')}"> - <div class="table_big"> - <div class="table_header"> - <h:outputText value="#{msg.TABLE_HEADER_USER_LIST}" /> - </div> - - <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}"> - <h:column> - <f:facet name="header">#{msg.USER_NAME}</f:facet> - <ui:include src="/WEB-INF/templates/user/user_profile_link.tpl"> - <ui:param name="user" value="#{user}" /> - </ui:include> - </h:column> - - <h:column> - <f:facet name="header">#{msg.USER_CREATED}</f:facet> - <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" /> - </h:column> - - <h:column> - <f:facet name="header">#{msg.USER_CREATED}</f:facet> - <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" /> - </h:column> - - <h:column> - <f:facet name="header">#{msg.USER_LIST_SHARING_ADDRESSBOOKS}</f:facet> - <ui:fragment rendered="#{loginController.isUserLoggedIn()}"> - <h:link outcome="login_list_sharing_addressbooks" value="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS}" title="#{msg.LINK_LOGIN_LIST_SHARING_ADDRESSBOOKS_TITLE}"> - <f:param name="userId" value="#{user.userId}" /> - </h:link> - </ui:fragment> - <ui:fragment rendered="#{not loginController.isUserLoggedIn()}"> - <h:outputText id="userShared" value="#{addressbookController.countAllUserSharedAddressbooks(user)}" /> - </ui:fragment> - </h:column> - </h:dataTable> + <h:panelGroup styleClass="table_full" layout="block" rendered="#{featureController.isFeatureEnabled('user_list')}"> + <div class="table_header"> + <h:outputText value="#{msg.TABLE_HEADER_USER_LIST}" /> </div> - <h:outputText styleClass="errors" value="#{msg.ERROR_USER_LIST_DISABLED}" rendered="#{featureController.isFeatureEnabled('user_list')}" /> + <h:dataTable id="userList" var="user" value="#{userController.allVisibleUsers()}" headerClass="table_header_column25" summary="#{msg.TABLE_SUMMARY_USER_LIST}" rendered="#{userController.isVisibleUserFound()}"> + <h:column> + <f:facet name="header">#{msg.USER_NAME}</f:facet> + <ui:include src="/WEB-INF/templates/user/user_profile_link.tpl"> + <ui:param name="user" value="#{user}" /> + </ui:include> + </h:column> + + <h:column> + <f:facet name="header">#{msg.USER_CREATED}</f:facet> + <h:outputFormat id="userCreated" value="#{user.userCreated.time}" title="#{msg.USER_CREATED_TITLE}" /> + </h:column> + </h:dataTable> + </h:panelGroup>> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_list')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_USER_LIST_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/user_login.xhtml b/web/guest/user/user_login.xhtml new file mode 100644 index 00000000..fe615ac7 --- /dev/null +++ b/web/guest/user/user_login.xhtml @@ -0,0 +1,46 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl" id="user_login"> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_USER_LOGIN}" /> + </ui:define> + + <ui:define name="content"> + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}"> + <h:panelGroup styleClass="para" layout="block" rendered="#{featureController.isFeatureEnabled('user_registration')}"> + <h:outputText value="#{msg.GUEST_USER_NO_ACCOUNT_YET_QUESTION}" /> + + <h:outputText value=" " /> + + <h:link id="user_register" outcome="user_register" title="#{msg.LINK_GUEST_USER_NO_ACCOUNT_TITLE}" value="#{msg.LINK_GUEST_USER_NO_ACCOUNT_YET}" /> + </h:panelGroup> + + <div class="para"> + <ui:include src="/WEB-INF/templates/guest/user/guest_login_form.tpl" /> + </div> + + <h:panelGroup styleClass="para" layout="block" rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}"> + <h:link id="user_lost_password" outcome="user_lost_passwd" title="#{msg.LINK_TITLE_GUEST_LOGIN_LOST_PASSWORD}" value="#{msg.LINK_GUEST_LOGIN_LOST_PASSWORD}" /> + </h:panelGroup> + </ui:fragment> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_USER_LOGIN_DEACTIVATED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/guest/user/lost_passwd.xhtml b/web/guest/user/user_lost_passwd.xhtml similarity index 81% rename from web/guest/user/lost_passwd.xhtml rename to web/guest/user/user_lost_passwd.xhtml index 835a0505..ebd1e8fa 100644 --- a/web/guest/user/lost_passwd.xhtml +++ b/web/guest/user/user_lost_passwd.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_LOST_PASSWORD}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOST_PASSWORD}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_LOST_PASSWORD}" /> @@ -18,12 +20,12 @@ <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required') and featureController.isFeatureEnabled('user_password_recovery')}"> <div class="para" id="user_lost_password_content"> <h:form id="form_lost_password"> - <div class="table"> + <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> <h:outputText value="#{msg.GUEST_LOST_PASSWORD_TITLE}" /> </div> - <fieldset id="login_data"> + <fieldset class="fieldset" id="login_data"> <legend title="#{msg.GUEST_LOST_PASSWORD_LEGEND_TITLE}"> <h:outputText value="#{msg.GUEST_LOST_PASSWORD_LEGEND}" /> </legend> @@ -59,16 +61,19 @@ </fieldset> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" value="#{msg.BUTTON_CONTINUE_STEP_2}" action="#{passwordRecoveryController.doLostPasswordStep2()}" /> </div> - </div> + </h:panelGroup> </h:form> </div> </ui:fragment> <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_name_required') or not featureController.isFeatureEnabled('user_password_recovery')}"> - <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" /> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_USER_RECOVER_PASSWORD_DEACTIVATED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/user_profile.xhtml b/web/guest/user/user_profile.xhtml index ec67dbcc..55f8af2a 100644 --- a/web/guest/user/user_profile.xhtml +++ b/web/guest/user/user_profile.xhtml @@ -6,16 +6,23 @@ xmlns:h="http://xmlns.jcp.org/jsf/html" xmlns:f="http://xmlns.jcp.org/jsf/core"> - <f:metadata> - <f:viewParam id="userId" name="userId" value="#{userController.userId}" required="true" requiredMessage="#{msg.PARAMETER_USER_ID_MISSING}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" validatorMessage="#{msg.PARAMETER_USER_ID_NOT_FOUND}"> - <f:convertNumber for="userId" type="number" minIntegerDigits="1" maxIntegerDigits="20" /> - <f:validator for="userId" validatorId="UserIdValidator" /> - </f:viewParam> - </f:metadata> - <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_USER_LOGIN_USER_PROFILE}</ui:define> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_USER_PROFILE}</ui:define> + <ui:define name="metadata"> + <f:metadata> + <f:viewParam id="userId" name="userId" value="#{userController.userId}" required="true" requiredMessage="#{msg.PARAMETER_USER_ID_MISSING}" converterMessage="#{msg.PARAMETER_USER_ID_INVALID}" validatorMessage="#{msg.PARAMETER_USER_ID_NOT_FOUND}"> + <f:convertNumber for="userId" type="number" minIntegerDigits="1" maxIntegerDigits="20" /> + <f:validator for="userId" validatorId="UserIdValidator" /> + </f:viewParam> + </f:metadata> + </ui:define> + + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_USER_PROFILE}" /> + </ui:define> + + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_USER_PROFILE}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_USER_PROFILE}" /> @@ -27,7 +34,12 @@ <ui:include src="/WEB-INF/templates/user/userid_error.tpl" /> </ui:fragment> - <h:outputText value="#{msg.ERROR_PROFILE_NOT_VISIBLE}" rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}" /> + <ui:fragment rendered="#{not profileController.isProfileLinkVisibleById(userController.userId)}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_PROFILE_NOT_VISIBLE}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> <ui:fragment rendered="#{profileController.isProfileLinkVisibleById(userController.userId)}"> <div align="center"> @@ -41,7 +53,10 @@ </ui:fragment> <ui:fragment rendered="#{not userController.isPublicUserProfileEnabled()}"> - <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" /> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_USER_PROFILE_DEACTIVATED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/register.xhtml b/web/guest/user/user_register.xhtml similarity index 66% rename from web/guest/user/register.xhtml rename to web/guest/user/user_register.xhtml index 32b24579..17c6ad47 100644 --- a/web/guest/user/register.xhtml +++ b/web/guest/user/user_register.xhtml @@ -8,18 +8,22 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_REGISTER}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_REGISTER}" /> </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration')}"> + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration_in_index') and featureController.isFeatureEnabled('user_registration')}"> <ui:fragment rendered="#{featureController.isFeatureEnabled('user_name_required')}"> <div class="para"> <h:outputText value="#{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_1}" /> + <h:outputText value=" " /> <h:link outcome="user_login" value="#{msg.CLICK_HERE}" /> + <h:outputText value=" " /> <h:outputText value="#{msg.GUEST_ALREADY_USER_CONTINUE_LOGIN_2}" /> </div> </ui:fragment> @@ -36,7 +40,17 @@ </ui:fragment> <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration')}"> - <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" /> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTRATION_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration_in_index')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTRATION_IN_INDEX_ENABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/register_done.xhtml b/web/guest/user/user_register_done.xhtml similarity index 90% rename from web/guest/user/register_done.xhtml rename to web/guest/user/user_register_done.xhtml index c0e4757c..65b3bda1 100644 --- a/web/guest/user/register_done.xhtml +++ b/web/guest/user/user_register_done.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER_DONE}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_REGISTER_DONE}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_REGISTER_DONE}" /> diff --git a/web/guest/user/register_page2.xhtml b/web/guest/user/user_register_page2.xhtml similarity index 79% rename from web/guest/user/register_page2.xhtml rename to web/guest/user/user_register_page2.xhtml index d6176438..35557e62 100644 --- a/web/guest/user/register_page2.xhtml +++ b/web/guest/user/user_register_page2.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_REGISTER_PAGE2}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_REGISTER_PAGE2}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_REGISTER_PAGE2}" /> @@ -30,7 +32,10 @@ </ui:fragment> <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_register_multiple_page')}"> - <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" /> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_REGISTER_MULTIPLE_PAGE_NOT_ENABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/guest/user/resend_done.xhtml b/web/guest/user/user_resend_done.xhtml similarity index 87% rename from web/guest/user/resend_done.xhtml rename to web/guest/user/user_resend_done.xhtml index 3c2ae96a..c062782f 100644 --- a/web/guest/user/resend_done.xhtml +++ b/web/guest/user/user_resend_done.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_USER_RESEND_DONE}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_RESEND_DONE}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_USER_RESEND_DONE}" /> diff --git a/web/guest/user/resend_link.xhtml b/web/guest/user/user_resend_link.xhtml similarity index 72% rename from web/guest/user/resend_link.xhtml rename to web/guest/user/user_resend_link.xhtml index b4d2f8be..c4da123a 100644 --- a/web/guest/user/resend_link.xhtml +++ b/web/guest/user/user_resend_link.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_RESEND_LINK}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_RESEND_LINK}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_RESEND_LINK}" /> @@ -16,12 +18,12 @@ <ui:define name="content"> <h:form id="form_resend_link" rendered="#{featureController.isFeatureEnabled('user_resend_confirmation_link')}"> - <div class="table"> + <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> <h:outputText value="#{msg.GUEST_RESEND_LINK_TITLE}" /> </div> - <fieldset id="email_address_notice"> + <fieldset class="fieldset" id="email_address_notice"> <legend title="#{msg.RESEND_CONFIRMATION_LINK_LEGEND_TITLE}"> <h:outputText value="#{msg.RESEND_CONFIRMATION_LINK_LEGEND}" /> </legend> @@ -39,22 +41,27 @@ </div> </fieldset> - <div> + <h:panelGroup styleClass="error_container" layout="block"> <h:message for="resendEmailAddress" errorClass="errors" warnClass="warnings" fatalClass="errors" /> - </div> + </h:panelGroup> <div class="table_row"> <h:outputText value="#{msg.GUEST_RESEND_CONFIRMATION_LINK_NOTICE}" /> </div> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" id="resend_link" value="#{msg.BUTTON_RESEND_CONFIRMATION_LINK}" action="#{resendController.doResendLink()}" /> </div> - </div> + </h:panelGroup> </h:form> - <h:outputText styleClass="errors" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}" /> + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_resend_confirmation_link')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_GUEST_USER_RESEND_LINK_DEACTIVATED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> </ui:define> </ui:composition> </html> diff --git a/web/guest/user/show_addressbook.xhtml b/web/guest/user/user_show_addressbook.xhtml similarity index 100% rename from web/guest/user/show_addressbook.xhtml rename to web/guest/user/user_show_addressbook.xhtml diff --git a/web/guest/user/user_show_addressbook_entries.xhtml b/web/guest/user/user_show_addressbook_entries.xhtml new file mode 100644 index 00000000..88472995 --- /dev/null +++ b/web/guest/user/user_show_addressbook_entries.xhtml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> + <ui:define name="login_title">#{msg.PAGE_TITLE_USER_SHOW_ADDRESSBOOK_ENTRIES}</ui:define> + + <ui:define name="content_header"> + #{msg.CONTENT_TITLE_USER_SHOW_ADDRESSBOOK_ENTRIES} + </ui:define> + + <ui:define name="content"> + Here goes your content. + </ui:define> + </ui:composition> +</html> diff --git a/web/imprint.xhtml b/web/imprint.xhtml index 91448b82..3a54f92c 100644 --- a/web/imprint.xhtml +++ b/web/imprint.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_IMPRINT}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_IMPRINT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_IMPRINT}" /> diff --git a/web/index.xhtml b/web/index.xhtml index 82729b88..044fe92a 100644 --- a/web/index.xhtml +++ b/web/index.xhtml @@ -13,7 +13,9 @@ //--> <ui:composition template="/WEB-INF/templates/guest/guest_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_WELCOME}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_WELCOME}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_WELCOME}" /> @@ -31,7 +33,7 @@ <h:column> <div id="main_item_container"> <div class="item_title"> - #{product.productTitle} + <h:outputText value="#{product.productTitle}" /> </div> <div class="item_content"> @@ -52,8 +54,8 @@ <ui:fragment rendered="#{basketController.isProductAdded(product)}"> <div class="item_amount"> - #{msg.ITEM_ORDER_AMOUNT} - #{basketController.getItemAmount(product)} + <h:outputText value="#{msg.ITEM_ORDER_AMOUNT}" /> + <h:outputText value="#{basketController.getItemAmount(product)}" /> </div> <div class="item_basket_link"> @@ -67,14 +69,14 @@ <div class="table_right"> <div class="item_price"> - #{msg.SINGLE_PRODUCT_PRICE} + <h:outputText value="#{msg.SINGLE_PRODUCT_PRICE}" /> <h:outputText styleClass="price" value="#{product.productPrice}"> <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> </h:outputText> </div> <div class="item_total_price"> - #{msg.TOTAL_ITEM_PRICE} + <h:outputText value="#{msg.TOTAL_ITEM_PRICE}" /> <h:outputText styleClass="price" value="#{msg.ITEM_NOT_ORDERED}" rendered="#{!basketController.isProductAdded(product)}" /> <h:outputText styleClass="price" value="#{basketController.calculateCurrentItemPrice()}" rendered="#{basketController.isProductAdded(product)}"> <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> @@ -89,11 +91,30 @@ </h:dataTable> <div id="totals_container"> - #{msg.TOTAL_ORDER_PRICE} + <h:outputText value="#{msg.TOTAL_ORDER_PRICE}" /> <h:outputText styleClass="price" id="total_sum" value="#{basketController.calculateTotalPrice()}"> <f:convertNumber type="currency" minFractionDigits="2" maxFractionDigits="2" locale="de_DE" /> </h:outputText> </div> + + <!-- + @TODO Make this working: + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_registration_in_index')}"> + <div class="registration_form"> + <ui:fragment rendered="#{featureController.isFeatureEnabled('user_register_multiple_page')}"> + <ui:include src="/WEB-INF/templates/guest/user/register/guest_form_register_page1.tpl" /> + </ui:fragment> + </div> + + <div class="para"> + <h:outputText value="#{msg.CONTENT_PAGE_INDEX_PARA3}" /> + </div> + </ui:fragment> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_registration_in_index')}"> + <ui:include src="/WEB-INF/templates/guest/guest_index.tpl" /> + </ui:fragment> + //--> </ui:define> </ui:composition> </html> diff --git a/web/privacy.xhtml b/web/privacy.xhtml index 0a113dee..01a29d18 100644 --- a/web/privacy.xhtml +++ b/web/privacy.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_PRIVACY}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_PRIVACY}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_PRIVACY}" /> diff --git a/web/terms.xhtml b/web/terms.xhtml index 6b4a3b65..c6be672e 100644 --- a/web/terms.xhtml +++ b/web/terms.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/#{userLoginController.baseTemplatePathName}_base.tpl"> - <ui:define name="guest_title">#{msg.PAGE_TITLE_INDEX_TERMS}</ui:define> + <ui:define name="guest_title"> + <h:outputText value="#{msg.PAGE_TITLE_INDEX_TERMS}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_INDEX_TERMS}" /> diff --git a/web/user/login_data_saved.xhtml b/web/user/login_data_saved.xhtml index 388ba92c..2e95fcc8 100644 --- a/web/user/login_data_saved.xhtml +++ b/web/user/login_data_saved.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_DATA_SAVED}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_DATA_SAVED}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_DATA_SAVED}" /> diff --git a/web/user/login_index.xhtml b/web/user/login_index.xhtml index 7a892786..c8f9c836 100644 --- a/web/user/login_index.xhtml +++ b/web/user/login_index.xhtml @@ -8,10 +8,12 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_HOME}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_HOME}" /> + </ui:define> <ui:define name="content_header"> - <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_HOME}" /> + <h:outputText value="#{msg.CONTENT_TITLE_USER_LOGIN_HOME}" /> </ui:define> <ui:define name="content"> diff --git a/web/user/login_logout.xhtml b/web/user/login_logout.xhtml index 7b55cc85..10efa901 100644 --- a/web/user/login_logout.xhtml +++ b/web/user/login_logout.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_LOGOUT}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_LOGIN_USER_LOGOUT}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_LOGOUT}" /> @@ -16,7 +18,7 @@ <ui:define name="content"> <h:form id="form_user_logout" rendered="#{userLoginController.isUserLoggedIn()}"> - <div class="table"> + <h:panelGroup styleClass="table" layout="block"> <div class="table_header"> <h:outputText value="#{msg.LOGIN_USER_LOGOUT_TITLE}" /> </div> @@ -26,10 +28,9 @@ </div> <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> <h:commandButton styleClass="submit" type="submit" action="#{userLoginController.doUserLogout()}" value="#{msg.BUTTON_USER_LOGOUT}" /> </div> - </div> + </h:panelGroup> </h:form> <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> diff --git a/web/user/login_user_change_email_address.xhtml b/web/user/login_user_change_email_address.xhtml index 95827a75..e8f52fda 100644 --- a/web/user/login_user_change_email_address.xhtml +++ b/web/user/login_user_change_email_address.xhtml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="#{localizationController.language}" xml:lang="#{localizationController.language}" @@ -7,61 +8,62 @@ xmlns:f="http://xmlns.jcp.org/jsf/core" > - <ui:composition template="/WEB-INF/templates/login/login_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_CHANGE_EMAIL_ADDRESS}</ui:define> + <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_EMAIL_ADDRESS}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_EMAIL_ADDRESS}" /> </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> - <div class="table"> - <div class="table_header"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_ADDRESS_TITLE}" /> - </div> - - <h:form id="form_login_user_change_email_address"> - <div class="para"> - <fieldset id="change_email"> - <legend title="#{msg.LOGIN_USER_CHANGE_EMAIL_LEGEND_TITLE}"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_LEGEND}" /> - </legend> + <h:panelGroup styleClass="table" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('user_change_email_address')}"> + <div class="table_header"> + <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_ADDRESS_TITLE}" /> + </div> - <div class="table_row"> - <div class="table_left"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_EMAIL_OLD_ADDRESS}" /> - </div> + <h:form id="form_user_change_email_address"> + <div class="para"> + <fieldset class="fieldset" id="change_email"> + <legend title="#{msg.LOGIN_CHANGE_EMAIL_LEGEND_TITLE}"> + <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_LEGEND}" /> + </legend> - <div class="table_right"> - <h:outputText value="#{contactController.emailAddress}" /> - </div> + <div class="table_row"> + <div class="table_left"> + <h:outputText value="#{msg.LOGIN_CHANGE_EMAIL_OLD_ADDRESS}" /> + </div> - <div class="clear"></div> + <div class="table_right"> + <h:outputText value="#{contactController.emailAddress}" /> </div> - <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" /> - </fieldset> - </div> + <div class="clear"></div> + </div> - <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" /> + <ui:include src="/WEB-INF/templates/login/user/user_change_email_address_repeat_fields.tpl" /> + </fieldset> + </div> - <div class="table_footer"> - <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> - <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doUserChangeEmailAddress()}" /> - </div> - </h:form> - </div> - </ui:fragment> + <ui:include src="/WEB-INF/templates/login/login_enter_current_password.tpl" /> - <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" /> + <div class="table_footer"> + <h:commandButton class="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton class="submit" type="submit" id="change_email" value="#{msg.BUTTON_CHANGE_EMAIL_ADDRESS}" action="#{emailChangeController.doChangeEmailAddress()}" /> + </div> + </h:form> + </h:panelGroup> - <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> - <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> + <ui:fragment rendered="#{not featureController.isFeatureEnabled('user_change_email_address')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_CHANGE_EMAIL_ADDRESS_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> - <ui:fragment rendered="#{not loginController.isUserLoggedIn()}"> - <ui:include id="login_only" src="/WEB-INF/templates/generic/user_not_logged_in.tpl" /> + <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> + <ui:include id="login_only" src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> </ui:fragment> </ui:define> </ui:composition> diff --git a/web/user/login_user_change_password.xhtml b/web/user/login_user_change_password.xhtml index 339571e0..d55eb2be 100644 --- a/web/user/login_user_change_password.xhtml +++ b/web/user/login_user_change_password.xhtml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="#{localizationController.language}" xml:lang="#{localizationController.language}" @@ -8,92 +9,88 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_CHANGE_PASSWORD}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PASSWORD}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_PASSWORD}" /> </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}"> - <ui:fragment rendered="#{featureController.isFeatureEnabled('change_user_password')}"> - <div class="table"> - <div class="table_header"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_PASSWORD_TITLE}" /> - </div> - - <h:form id="form_user_change_password"> - <div class="para"> - <fieldset id="change_password"> - <legend title="#{msg.LOGIN_USER_CHANGE_PASSWORD_LEGEND_TITLE}"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_PASSWORD_LEGEND}" /> - </legend> + <ui:fragment rendered="#{userLoginController.loggedInUser.userMustChangePassword == true}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.USER_MUST_CHANGE_PASSWORD_NOTICE}" /> + </ui:include> + </ui:fragment> - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="userCurrentPassword" value="#{msg.LOGIN_ENTER_CURRENT_PASSWORD}" /> - </div> + <ui:fragment rendered="#{userLoginController.isUserLoggedIn()}"> + <h:panelGroup styleClass="table" layout="block" rendered="#{featureController.isFeatureEnabled('change_user_password')}"> + <div class="table_header"> + <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_TITLE}" /> + </div> - <div class="table_right"> - <h:inputSecret styleClass="input" id="userCurrentPassword" size="10" maxlength="255" value="#{userPasswordController.userCurrentPassword}" required="true" requiredMessage="#{msg.USER_CURRENT_PASSWORD_REQUIRED}" /> - </div> + <h:form id="form_user_change_password"> + <div class="para"> + <fieldset class="fieldset" id="change_password"> + <legend title="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND_TITLE}"> + <h:outputText value="#{msg.LOGIN_CHANGE_PASSWORD_LEGEND}" /> + </legend> - <div class="clear"></div> + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="userPassword" value="#{msg.USER_ENTER_NEW_PASSWORD}" /> </div> - <div class="error_container"> - <h:message for="userCurrentPassword" errorClass="errors" fatalClass="errors" warnClass="errors" /> + <div class="table_right"> + <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" /> </div> - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="userPassword" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD}" /> - </div> - - <div class="table_right"> - <h:inputSecret styleClass="input" id="userPassword" size="10" maxlength="255" value="#{userPasswordController.userPassword}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REQUIRED}" /> - </div> + <div class="clear"></div> + </div> - <div class="clear"></div> - </div> + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> - <div class="error_container"> - <h:message for="userPassword" errorClass="errors" fatalClass="errors" warnClass="errors" /> + <div class="table_row"> + <div class="table_left"> + <h:outputLabel for="userPasswordRepeat" value="#{msg.USER_ENTER_NEW_PASSWORD_REPEAT}" /> </div> - <div class="table_row"> - <div class="table_left"> - <h:outputLabel for="userPasswordRepeat" value="#{msg.GUEST_REGISTRATION_ENTER_PASSWORD_REPEAT}" /> - </div> - - <div class="table_right"> - <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" /> - </div> - - <div class="clear"></div> + <div class="table_right"> + <h:inputSecret styleClass="input" id="userPasswordRepeat" size="10" maxlength="255" value="#{userPasswordController.userPasswordRepeat}" required="true" requiredMessage="#{msg.USER_NEW_PASSWORD_REPEAT_REQUIRED}" /> </div> - <div class="error_container"> - <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" /> - </div> - </fieldset> - </div> - - <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> - <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" /> - </div> - </h:form> - </div> + <div class="clear"></div> + </div> - <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" /> + <h:panelGroup styleClass="error_container" layout="block"> + <h:message for="userPasswordRepeat" errorClass="errors" fatalClass="errors" warnClass="errors" /> + </h:panelGroup> + </fieldset> + </div> - <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('change_user_password')}" /> - </ui:fragment> + <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" /> - <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> - <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> - </ui:fragment> + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="submit" type="submit" id="change_password" value="#{msg.BUTTON_USER_CHANGE_PASSWORD}" action="#{userPasswordController.doChangePassword()}" /> + </div> + </h:form> + </h:panelGroup> + </ui:fragment> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_password')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> + <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> + </ui:fragment> </ui:define> </ui:composition> </html> diff --git a/web/user/login_user_change_personal_data.xhtml b/web/user/login_user_change_personal_data.xhtml index 0e330310..32286f30 100644 --- a/web/user/login_user_change_personal_data.xhtml +++ b/web/user/login_user_change_personal_data.xhtml @@ -1,3 +1,4 @@ +<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html lang="#{localizationController.language}" xml:lang="#{localizationController.language}" @@ -8,36 +9,41 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_CHANGE_PERSONAL_DATA}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CHANGE_PERSONAL_DATA}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_CHANGE_PERSONAL_DATA}" /> </ui:define> <ui:define name="content"> - <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('edit_user_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> - <div class="table"> - <div class="table_header"> - <h:outputText value="#{msg.LOGIN_USER_CHANGE_PERSONAL_DATA_TITLE}" /> - </div> + <h:panelGroup styleClass="table_medium" layout="block" rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> + <div class="table_header"> + <h:outputText value="#{msg.LOGIN_CHANGE_PERSONAL_DATA_TITLE}" /> + </div> - <h:form id="form_login_change_personal"> - <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" /> + <h:form id="form_login_change_personal"> + <ui:include src="/WEB-INF/templates/contact/form_contact_data.tpl" /> - <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" /> + <ui:include src="/WEB-INF/templates/login/user/user_enter_current_password.tpl" /> - <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" /> + <ui:include src="/WEB-INF/templates/guest/guest_privacy_terms.tpl" /> - <div class="table_footer"> - <h:commandButton styleClass="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> - <h:commandButton styleClass="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" /> - </div> - </h:form> - </div> + <div class="table_footer"> + <h:commandButton styleClass="reset right_space" type="reset" value="#{msg.BUTTON_RESET_FORM}" /> + <h:commandButton styleClass="submit" type="submit" id="change_personal_data" value="#{msg.BUTTON_CHANGE_PERSONAL_DATA}" action="#{userController.doChangePersonalData()}" /> + </div> + </h:form> + </h:panelGroup> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> </ui:fragment> - <h:outputText styleClass="errors" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" rendered="#{not featureController.isFeatureEnabled('edit_user_data')}" /> - <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> </ui:fragment> diff --git a/web/user/login_user_contact_data_saved.xhtml b/web/user/login_user_contact_data_saved.xhtml new file mode 100644 index 00000000..4de72ddf --- /dev/null +++ b/web/user/login_user_contact_data_saved.xhtml @@ -0,0 +1,42 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html + lang="#{localizationController.language}" xml:lang="#{localizationController.language}" + xmlns="http://www.w3.org/1999/xhtml" + xmlns:ui="http://xmlns.jcp.org/jsf/facelets" + xmlns:h="http://xmlns.jcp.org/jsf/html" + xmlns:f="http://xmlns.jcp.org/jsf/core" + > + + <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_CONTACT_DATA_SAVED}" /> + </ui:define> + + <ui:define name="content_header"> + <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_CONTACT_DATA_SAVED}" /> + </ui:define> + + <ui:define name="content"> + <ui:fragment rendered="#{userLoginController.isUserLoggedIn() and featureController.isFeatureEnabled('change_user_personal_data') and (not userLoginController.ifUserMustChangePassword() or not featureController.isFeatureEnabled('user_must_change_password'))}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.LOGIN_MESSAGE_DATA_SAVED}" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{userLoginController.ifUserMustChangePassword()}"> + <h:link outcome="user_change_password" value="#{msg.USER_LOGIN_MUST_CHANGE_PASSWORD}" /> + </ui:fragment> + + <ui:fragment rendered="#{not featureController.isFeatureEnabled('change_user_personal_data')}"> + <ui:include src="/WEB-INF/templates/generic/message_box.tpl"> + <ui:param name="message" value="#{msg.ERROR_LOGIN_USER_EDIT_DATA_DISABLED}" /> + <ui:param name="styleClass" value="errors" /> + </ui:include> + </ui:fragment> + + <ui:fragment rendered="#{not userLoginController.isUserLoggedIn()}"> + <ui:include src="/WEB-INF/templates/user/user_not_logged_in.tpl" /> + </ui:fragment> + </ui:define> + </ui:composition> +</html> diff --git a/web/user/login_user_data_saved.xhtml b/web/user/login_user_data_saved.xhtml index dd0a2451..ddb9e96b 100644 --- a/web/user/login_user_data_saved.xhtml +++ b/web/user/login_user_data_saved.xhtml @@ -8,7 +8,9 @@ > <ui:composition template="/WEB-INF/templates/login/user/user_base.tpl"> - <ui:define name="login_title">#{msg.PAGE_TITLE_LOGIN_USER_DATA_SAVED}</ui:define> + <ui:define name="login_title"> + <h:outputText value="#{msg.PAGE_TITLE_USER_LOGIN_USER_DATA_SAVED}" /> + </ui:define> <ui:define name="content_header"> <h:outputText value="#{msg.CONTENT_TITLE_LOGIN_USER_DATA_SAVED}" /> -- 2.39.5