]> git.mxchange.org Git - pizzaservice-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 18:48:03 +0000 (20:48 +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 c3b044908b11ba0c506380a0d11abbb68d1d71f1..b30638dc97d54f57c132f7dd990debf586bc8827 100644 (file)
@@ -2,58 +2,58 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/customer/admin_customer_delete.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="customer/checkout2.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="privacy.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="150" y="600" zoom="true"/>
-        <Node id="admin/index.xhtml" x="900" y="1050" zoom="true"/>
-        <Node id="customer/register.xhtml" x="400" y="300" zoom="true"/>
-        <Node id="admin/category/admin_category_list.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="item_added.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="customer/lost_passwd.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="index.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="customer/checkout_done.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="customer/login.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="*" x="150" y="1350" zoom="true"/>
-        <Node id="admin/customer/admin_customer_unlock.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="admin/product/admin_product_edit.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="login/login_contact_data_saved.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_edit.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="customer/checkout.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="admin/product/admin_product_delete.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="basket.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="exception.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="admin/category/admin_category_delete.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="terms.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="login/login_user_data_saved.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="admin/category/admin_category_edit.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="logout.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/contact/admin_contact_delete.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="imprint.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="admin/customer/admin_customer_list.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="admin/product/admin_product_list.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/customer/admin_customer_show.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="customer/empty_basket.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/customer/admin_customer_delete.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="customer/checkout2.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="privacy.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="customer/register.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="item_added.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/category/admin_category_list.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="customer/lost_passwd.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="index.xhtml" x="1400" y="150" zoom="true"/>
+        <Node id="customer/checkout_done.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="*" x="650" y="300" zoom="true"/>
+        <Node id="customer/login.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="admin/customer/admin_customer_unlock.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="admin/product/admin_product_edit.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="login/login_contact_data_saved.xhtml" x="150" y="1050" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="admin/customer/admin_customer_edit.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="600" zoom="true"/>
+        <Node id="customer/checkout.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/product/admin_product_delete.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="basket.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="exception.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="admin/category/admin_category_delete.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="terms.xhtml" x="400" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="login/login_user_data_saved.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/category/admin_category_edit.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="logout.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="imprint.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="admin/customer/admin_customer_list.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/product/admin_product_list.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/customer/admin_customer_show.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="customer/empty_basket.xhtml" x="1400" y="450" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index aeff4ec1a474b6f764a4a280463c9af5b3a4834d..cec1aaec1696a04a0291d0f726ffd844c74154fb 100644 (file)
@@ -135,7 +135,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_USER_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:
@@ -370,3 +370,14 @@ ADMIN_LINK_UNLOCK_CUSTOMER=Kunde ent-/sperren
 ADMIN_LINK_DELETE_CUSTOMER=Kundendaten l\u00f6schen
 ADMIN_LINK_DELETE_CUSTOMER_TITLE=Kundendaten l\u00f6schen (mit Best\u00e4tigung).
 ADMIN_LINK_UNLOCK_CUSTOMER_TITLE=Kunde sperren oder entsperren. Bitte einen Grund mit angeben.
+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 309ba566ff76a505e7050c6287aab1a6d75a04b3..ff183ae680500d1ac416a65f35910d56f8dd8c00 100644 (file)
@@ -136,7 +136,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_USER_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:
@@ -371,3 +371,14 @@ ADMIN_LINK_UNLOCK_CUSTOMER=Un-/lock customer
 ADMIN_LINK_DELETE_CUSTOMER=Delete customer data
 ADMIN_LINK_DELETE_CUSTOMER_TITLE=Delete customer data (with confirmation).
 ADMIN_LINK_UNLOCK_CUSTOMER_TITLE=Lock or unlock customer. Please provide a reason.
+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 d7d03f2e592f6b7ea749042481f69956e191c917..ee7a6fe68d88ca5feb5118557fd09b9207a3fa1e 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 1b92701f98da955fbe964cb449668e148adcb325..9f608238f43ac19c311c024346acef08305b8446 100644 (file)
@@ -32,7 +32,7 @@
                                        </div>
 
                                        <div class="para notice">
-                                               #{msg.ADMIN_USER_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 f61e527c5e3e47e6b34a7a1fdbafdddcd4c2b26d..2c80675ed4c2d1303c4a0944ef256f9780667fca 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;
+}