]> git.mxchange.org Git - addressbook-war.git/commitdiff
Continued with contacts:
authorRoland Häder <roland@mxchange.org>
Fri, 29 Apr 2016 09:46:33 +0000 (11:46 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 29 Apr 2016 19:04:08 +0000 (21:04 +0200)
- showing contact data is "basicly finished"
- introduced template admin_contact_data.tpl"
- added missing navigation cases
- contact personal data is not user - fixed
- include always gender
- added new page for deleting contact data
- added CSS class for delete buttons
- added template for administrative contact links
- added missing i18n strings

Signed-off-by: Roland Häder <roland@mxchange.org>
nbproject/faces-config.NavData
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/faces-config.xml
web/WEB-INF/templates/admin/contact/admin_contact_data.tpl [new file with mode: 0644]
web/WEB-INF/templates/admin/contact/admin_contact_links.tpl [new file with mode: 0644]
web/admin/contact/admin_contact_delete.xhtml [new file with mode: 0644]
web/admin/contact/admin_contact_edit.xhtml
web/admin/contact/admin_contact_show.xhtml
web/resources/css/cssLayout.css

index 625aecb2c1dbda8109ef0165b98b09f10770d5b2..1c2b05905e438c615befa4486f03f6345b7628f5 100644 (file)
@@ -2,63 +2,63 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="privacy.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="login/login_change_password.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="login/login_start_sharing_addressbook.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="user/resend_link.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="index.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="user/register_done.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="*" x="1900" y="300" zoom="true"/>
-        <Node id="user/login_error.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="user/show_addressbook_entries.xhtml" x="150" y="1500" zoom="true"/>
-        <Node id="user/lost_passwd.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="login/login_list_sharing_addressbooks.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="user/login.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="login/login_contact_data_saved.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="2400" y="300" zoom="true"/>
-        <Node id="login/login_shared_addressbooks.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="basket.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="login/login_data_saved.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="exception.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="user/register.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="login/login_add_addressbook.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="privacy.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="1350" zoom="true"/>
+        <Node id="login/login_start_sharing_addressbook.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="user/resend_link.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="1400" y="450" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="index.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="user/register_done.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="*" x="2400" y="300" zoom="true"/>
+        <Node id="user/login_error.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="user/show_addressbook_entries.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="user/lost_passwd.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="login/login_list_sharing_addressbooks.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="user/login.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="login/login_contact_data_saved.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="login/login_shared_addressbooks.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="basket.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="exception.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="login/login_data_saved.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="1500" zoom="true"/>
+        <Node id="user/register.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="login/login_add_addressbook.xhtml" x="150" y="1050" zoom="true"/>
         <Node id="login/login_index.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="login/login_own_addressbooks.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_own_addressbooks.xhtml" x="1150" y="750" zoom="true"/>
         <Node id="admin/user/admin_user_edit.xhtml" x="2650" y="150" zoom="true"/>
-        <Node id="terms.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="user/user_list.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="login/login_user_data_saved.xhtml" x="650" y="1200" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="logout.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="login/login_change_personal_data.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="user/show_addressbook.xhtml" x="400" y="450" zoom="true"/>
-        <Node id="imprint.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="login/login_other_addressbooks.xhtml" x="400" y="1350" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="login/login_change_email_address.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_show.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="terms.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="login/login_user_data_saved.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="user/user_list.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="logout.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="imprint.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="user/show_addressbook.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="login/login_other_addressbooks.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="login/login_change_email_address.xhtml" x="650" y="900" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 27963bf45a6a7ab72ed5487b50afc5220566617e..b79eb70ab62b3ceae920c09c2136da5009c4bdfb 100644 (file)
@@ -252,7 +252,7 @@ PAGE_TITLE_ADMIN_ADD_USER=Neues Benutzeraccount hinzufuegen
 CONTENT_TITLE_ADMIN_ADD_USER=Neues Benutzeraccount hinzufuegen:
 TABLE_SUMMARY_ADMIN_LIST_USERS=Administration, alle Benutzer auflisten
 ADMIN_ADD_USER_TITLE=Neues Benutzeraccount anlegen
-ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Bitte geben Sie mindestens Vor- und Nachnamen, sowie Benutzernamen und Email-Adresse ein.
+ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE=Bitte geben Sie mindestens Anrede, Vor- und Nachnamen, sowie Benutzernamen und Email-Adresse ein.
 ADMIN_CONTACT_PERSONAL_DATA_LEGEND=Pers\u00f6nliche Daten des Benutzers:
 ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE=Geben Sie hier die pers\u00f6nlichen Daten des neuen Benutzers ein.
 ADMIN_PERSONAL_DATA_GENDER=Anrede ausw\u00e4hlen:
@@ -447,3 +447,14 @@ LINK_ADMIN_LIST_CONTACT=Kontaktdaten auflisten
 LINK_ADMIN_LIST_CONTACT_TITLE=Listet alle Kontaktdaten auf, egal wo her sie angelegt wurden.
 ERROR_PARAMETER_CELLPHONE_NUMBER_CONTACT_NOT_SET=Fehler: Parameter 'cellphoneNumber' und 'contact' nicht gesetzt.
 ADMIN_ADD_CONTACT_MINIMUM_DATA=Bitte geben Sie mindestens Anrede, Vorname und Nachname an.
+ERROR_PARAMETER_CONTACT_NOT_SET=Fehler: Parameter 'contact' nicht gesetzt.
+ADMIN_HEADER_SHOW_CONTACT=Kontaktdaten f\u00fcr {0}:
+ADMIN_CONTACT_UPDATED=Kontaktdaten aktualisiert:
+ADMIN_LINK_DELETE_CONTACT=Kontaktdaten l\u00f6schen
+ADMIN_LINK_DELETE_CONTACT_TITLE=L\u00f6scht die Kontaktdaten, es wird eine Best\u00e4tigung verlangt.
+PAGE_TITLE_ADMIN_DELETE_CONTACT=Kontaktdaten l\u00f6schen
+CONTENT_TITLE_ADMIN_DELETE_CONTACT=Kontakdaten l\u00f6schen:
+ADMIN_DELETE_CONTACT_TITLE=Kontaktdaten unwiederruflich l\u00f6schen
+BUTTON_ADMIN_DELETE_CONTACT=Kontaktdaten l\u00f6schen
+ADMIN_DELETE_CONTACT_NOTICE=Sie wollen Kontaktdaten l\u00f6schen. Diese k\u00f6nnten noch evtl. mit anderen Daten verkn\u00fcft sein, was zu Fehlern f\u00fchrt. Bitte l\u00f6schen Sie nur, wenn Sie sich absolut sicher sind, dass keine fremden Daten auf diesen Datensatz mehr verweisen.
+ADMIN_CONTACT_PERSONAL_DATA_MINIMUM_NOTICE=Bitte geben Sie mindestens Anrede, Vor- und Nachnamen ein.
index 1896c41b4bd5f3716518f043f6b407535bc6168c..a9995905978040fd9e7d53776323b0bb17ad9336 100644 (file)
@@ -231,7 +231,7 @@ PAGE_TITLE_ADMIN_ADD_USER=Add new user account
 CONTENT_TITLE_ADMIN_ADD_USER=Add new user account:
 TABLE_SUMMARY_ADMIN_LIST_USERS=Administration, list all users
 ADMIN_ADD_USER_TITLE=Create a new user account
-ADMIN_PERSONAL_DATA_MINIMUM_NOTICE=Please enter at least first name, family name, user name and email address.
+ADMIN_USER_PERSONAL_DATA_MINIMUM_NOTICE=Please enter at least gender, first name, family name, user name and email address.
 ADMIN_CONTACT_PERSONAL_DATA_LEGEND=Personal data of the user:
 ADMIN_CONTACT_PERSONAL_DATA_LEGEND_TITLE=Here you can enter the personal data of the new user.
 ADMIN_PERSONAL_DATA_GENDER=Select gender:
@@ -425,3 +425,14 @@ LINK_ADMIN_LIST_CONTACT=List contact data
 LINK_ADMIN_LIST_CONTACT_TITLE=Lists all contact data regardless where they was created.
 ERROR_PARAMETER_CELLPHONE_NUMBER_CONTACT_NOT_SET=Error: Parameter 'cellphoneNumber' and 'contact' are not set.
 ADMIN_ADD_CONTACT_MINIMUM_DATA=Please enter at least gender, first name and family name.
+ERROR_PARAMETER_CONTACT_NOT_SET=Error: Parameter 'contact' is not set.
+ADMIN_HEADER_SHOW_CONTACT=Contact data for {0}:
+ADMIN_CONTACT_UPDATED=Contact data updated:
+ADMIN_LINK_DELETE_CONTACT=Kontakt l\u00f6schen
+ADMIN_LINK_DELETE_CONTACT_TITLE=Deletes contact data, a confirmation is needed.
+PAGE_TITLE_ADMIN_DELETE_CONTACT=Delete contact data
+CONTENT_TITLE_ADMIN_DELETE_CONTACT=Delete contact data:
+ADMIN_DELETE_CONTACT_TITLE=Delete contact data unreverseable
+BUTTON_ADMIN_DELETE_CONTACT=Delete contact data
+ADMIN_DELETE_CONTACT_NOTICE=You want to delete contact data. This data could be still linked with other data which could lead to errors. Please delete only, if you are sure that no foreign data links to this record.
+ADMIN_CONTACT_PERSONAL_DATA_MINIMUM_NOTICE=Please enter at least gender, first name and family name.
index 66cbdb2b99987233aac59400f5f5bbec3de2b47c..2ea7f93c61ac6c6e2301206435068c830ef0274b 100644 (file)
                        <to-view-id>/admin/contact/admin_contact_edit.xhtml</to-view-id>
                </navigation-case>
        </navigation-rule>
+       <navigation-rule>
+               <from-view-id>/admin/contact/admin_contact_show.xhtml</from-view-id>
+               <navigation-case>
+                       <from-outcome>admin_edit_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_edit.xhtml</to-view-id>
+               </navigation-case>
+               <navigation-case>
+                       <from-outcome>admin_delete_contact</from-outcome>
+                       <to-view-id>/admin/contact/admin_contact_delete.xhtml</to-view-id>
+               </navigation-case>
+       </navigation-rule>
        <navigation-rule>
                <from-view-id>/admin/cellphone/admin_contact_cellphone_list.xhtml</from-view-id>
                <navigation-case>
diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_data.tpl
new file mode 100644 (file)
index 0000000..997d827
--- /dev/null
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:panelGrid id="user_profile" summary="#{msg.ADMIN_TABLE_SUMMARY_SHOW_CONTACT}" headerClass="table_header_column" styleClass="table_big" columns="3" rendered="#{not empty adminHelper.contact}">
+               <f:facet name="header">
+                       <h:outputFormat value="#{msg.ADMIN_HEADER_SHOW_CONTACT}">
+                               <f:param value="#{adminHelper.contact.contactId}" />
+                       </h:outputFormat>
+               </f:facet>
+
+               <h:column>
+                       <h:outputLabel for="userId" styleClass="data_label" value="#{msg.ADMIN_CONTACT_ID}" />
+
+                       <h:outputText id="userId" styleClass="data_field" value="#{adminHelper.contact.contactId}" />
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="userCreated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_CREATED}" />
+
+                       <h:outputText id="userCreated" styleClass="data_field" value="#{adminHelper.contact.contactCreated.time}">
+                               <f:convertDateTime for="userCreated" type="both" />
+                       </h:outputText>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="userUpdated" styleClass="data_label" value="#{msg.ADMIN_CONTACT_UPDATED}" />
+
+                       <h:outputText id="userUpdated" styleClass="data_field" value="#{adminHelper.contact.contactUpdated.time}">
+                               <f:convertDateTime for="userUpdated" type="both" />
+                       </h:outputText>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="isOwnContact" styleClass="data_label" value="#{msg.ADMIN_CONTACT_IS_OWN_CONTACT}" />
+
+                       <h:outputText id="isOwnContact" styleClass="data_field" value="#{adminHelper.contact.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[adminHelper.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="#{adminHelper.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="#{adminHelper.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="#{adminHelper.contact.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="#{adminHelper.contact.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="#{adminHelper.contact.contactHouseNumber}" />
+               </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="#{adminHelper.contact.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="#{adminHelper.contact.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:#{adminHelper.contact.contactEmailAddress}">
+                               <h:outputText value="#{adminHelper.contact.contactEmailAddress}" />
+                       </h:outputLink>
+               </h:column>
+
+               <h:column>
+                       <h:outputLabel for="contactBirthday" styleClass="data_label" value="#{msg.ADMIN_CONTACT_BIRTHDAY}" />
+
+                       <h:outputText id="contactBirthday" styleClass="data_field" value="#{adminHelper.contact.contactBirthday.time}">
+                               <f:convertDateTime for="contactBirthday" type="date" />
+                       </h:outputText>
+               </h:column>
+       </h:panelGrid>
+</ui:composition>
diff --git a/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl b/web/WEB-INF/templates/admin/contact/admin_contact_links.tpl
new file mode 100644 (file)
index 0000000..26f287c
--- /dev/null
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<ui:composition
+       xmlns="http://www.w3.org/1999/xhtml"
+       xmlns:f="http://java.sun.com/jsf/core"
+       xmlns:h="http://java.sun.com/jsf/html"
+       xmlns:ui="http://xmlns.jcp.org/jsf/facelets">
+
+       <h:outputText styleClass="errors" value="#{msg.ERROR_PARAMETER_CONTACT_NOT_SET}" rendered="#{empty contact}" />
+
+       <ui:fragment rendered="#{not empty contact}">
+               <div class="table">
+                       <div class="table_header">
+                               <h:outputText value="#{msg.ADMIN_LINKS_HEADER}" />
+                       </div>
+
+                       <div class="table_row">
+                               <ul>
+                                       <li>
+                                               <h:link outcome="admin_edit_contact" value="#{msg.ADMIN_LINK_EDIT_CONTACT}" title="#{msg.ADMIN_LINK_EDIT_CONTACT_TITLE}">
+                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                               </h:link>
+                                       </li>
+
+                                       <li>
+                                               <h:link outcome="admin_delete_contact" title="#{msg.ADMIN_LINK_DELETE_CONTACT_TITLE}">
+                                                       <h:outputText styleClass="delete_link" value="#{msg.ADMIN_LINK_DELETE_CONTACT}" />
+                                                       <f:param name="contactId" value="#{contact.contactId}" />
+                                               </h:link>
+                                       </li>
+                               </ul>
+                       </div>
+               </div>
+       </ui:fragment>
+</ui:composition>
diff --git a/web/admin/contact/admin_contact_delete.xhtml b/web/admin/contact/admin_contact_delete.xhtml
new file mode 100644 (file)
index 0000000..5ca8b08
--- /dev/null
@@ -0,0 +1,48 @@
+<?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"
+       >
+
+       <f:metadata>
+               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{adminHelper.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="content_header">
+                       #{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 adminHelper.contact}" />
+
+                       <h:form id="admin_edit_user" rendered="#{not empty adminHelper.contact}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               <h:outputFormat value="#{msg.ADMIN_DELETE_CONTACT_TITLE}">
+                                                       <f:param value="#{adminHelper.contact.contactId}" />
+                                               </h:outputFormat>
+                                       </div>
+
+                                       <div class="para notice">
+                                               #{msg.ADMIN_DELETE_CONTACT_NOTICE}
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />
+
+                                       <div class="table_footer">
+                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton class="delete_button" type="submit" id="register" value="#{msg.BUTTON_ADMIN_DELETE_CONTACT}" action="#{adminContactController.deleteContactData()}" />
+                                       </div>
+                               </div>
+                       </h:form>
+               </ui:define>
+       </ui:composition>
+</html>
index d2e7ea01ac439696c8848ffad7cdde5735e10ca0..9f608238f43ac19c311c024346acef08305b8446 100644 (file)
@@ -32,7 +32,7 @@
                                        </div>
 
                                        <div class="para notice">
-                                               #{msg.ADMIN_PERSONAL_DATA_MINIMUM_NOTICE}
+                                               #{msg.ADMIN_CONTACT_PERSONAL_DATA_MINIMUM_NOTICE}
                                        </div>
 
                                        <ui:include src="/WEB-INF/templates/admin/contact/admin_form_contact_data.tpl">
index 59f423341936769499ac23c362124c9ec9dd1f3c..fccf2ebc89c850323668c2c2916792d5eb3a687b 100644 (file)
@@ -8,6 +8,11 @@
        xmlns:f="http://xmlns.jcp.org/jsf/core"
        >
 
+       <f:metadata>
+               <f:viewParam name="contactId" value="#{adminHelper.contact}" converter="ContactConverter" required="true" requiredMessage="#{msg.ERROR_PARAMETER_CONTACT_ID_NOT_SET}" />
+               <f:viewAction action="#{adminHelper.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>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CONTACT_ID_NOT_FOUND}" rendered="#{empty adminHelper.contact}" />
+
+                       <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_data.tpl" />
+
+                       <div>
+                               <ui:include src="/WEB-INF/templates/admin/contact/admin_contact_links.tpl">
+                                       <ui:param name="contact" value="#{adminHelper.contact}" />
+                               </ui:include>
+                       </div>
+
+                       <div>
+                               <ui:include src="/WEB-INF/templates/admin/cellphone/admin_cellphone_add_show.tpl">
+                                       <ui:param name="cellphoneNumber" value="#{adminHelper.contact.contactCellphoneNumber}" />
+                                       <ui:param name="contact" value="#{adminHelper.contact}" />
+                               </ui:include>
+                       </div>
                </ui:define>
        </ui:composition>
 </html>
index 457a864641c795fb5655d7d0740d9c20edafce9a..e48de8b502f1d085385f2ab858c55818a4fb9491 100644 (file)
@@ -245,3 +245,9 @@ ul.footer_nav li.footer_copyright {
 .delete_link {
        color: #aa0000;
 }
+
+.delete_button {
+       border: #ff0000 1px groove;
+       background-color: #880000;
+       color: #ffffff;
+}