]> git.mxchange.org Git - jjobs-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:38:40 +0000 (21:38 +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 d8852080391dc7a1e764340c387b93dda77067f4..af90caa5c219b3c2c51b6b63cd8e46a7853324b8 100644 (file)
@@ -2,58 +2,59 @@
 <Scene Scope="Project" version="2">
     <Scope Scope="Faces Configuration Only"/>
     <Scope Scope="Project">
-        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="900" y="600" zoom="true"/>
-        <Node id="admin/contact/admin_contact_show.xhtml" x="150" y="300" zoom="true"/>
-        <Node id="login/login_change_password.xhtml" x="1900" y="450" zoom="true"/>
-        <Node id="privacy.xhtml" x="1650" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="1900" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_show.xhtml" x="400" y="900" zoom="true"/>
-        <Node id="admin/index.xhtml" x="1650" y="450" zoom="true"/>
-        <Node id="user/resend_link.xhtml" x="900" y="300" zoom="true"/>
-        <Node id="admin/admin_logout.xhtml" x="1650" y="150" zoom="true"/>
-        <Node id="admin/user/admin_user_unlock.xhtml" x="150" y="750" zoom="true"/>
-        <Node id="index.xhtml" x="400" y="1050" zoom="true"/>
-        <Node id="user/register_done.xhtml" x="1150" y="600" zoom="true"/>
-        <Node id="admin/admin_category_delete.xhtml" x="2150" y="300" zoom="true"/>
-        <Node id="*" x="900" y="1050" zoom="true"/>
-        <Node id="user/login_error.xhtml" x="900" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="300" zoom="true"/>
-        <Node id="user/show_addressbook_entries.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_list.xhtml" x="650" y="300" zoom="true"/>
+        <Node id="admin/contact/admin_contact_show.xhtml" x="650" y="1200" zoom="true"/>
+        <Node id="login/login_change_password.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="privacy.xhtml" x="1650" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_show.xhtml" x="900" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_show.xhtml" x="900" y="450" zoom="true"/>
+        <Node id="admin/index.xhtml" x="400" y="1200" zoom="true"/>
+        <Node id="user/resend_link.xhtml" x="900" y="150" zoom="true"/>
+        <Node id="admin/admin_logout.xhtml" x="1650" y="600" zoom="true"/>
+        <Node id="admin/user/admin_user_unlock.xhtml" x="1900" y="150" zoom="true"/>
+        <Node id="index.xhtml" x="1400" y="750" zoom="true"/>
+        <Node id="user/register_done.xhtml" x="400" y="1050" zoom="true"/>
+        <Node id="*" x="400" y="300" zoom="true"/>
+        <Node id="admin/admin_category_delete.xhtml" x="1150" y="900" zoom="true"/>
+        <Node id="user/login_error.xhtml" x="900" y="600" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_edit.xhtml" x="650" y="750" zoom="true"/>
+        <Node id="user/show_addressbook_entries.xhtml" x="400" y="600" zoom="true"/>
         <Node id="user/lost_passwd.xhtml" x="150" y="1050" zoom="true"/>
-        <Node id="user/login.xhtml" x="2400" y="150" zoom="true"/>
-        <Node id="login/login_edit_user_data.xhtml" x="650" y="600" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="1400" y="300" zoom="true"/>
-        <Node id="login/login_contact_data_saved.xhtml" x="150" y="1200" zoom="true"/>
-        <Node id="admin/country/admin_country_list.xhtml" x="1400" y="750" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="650" y="900" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="900" zoom="true"/>
-        <Node id="admin/user/admin_user_delete.xhtml" x="400" y="150" zoom="true"/>
-        <Node id="exception.xhtml" x="650" y="150" zoom="true"/>
-        <Node id="login/login_data_saved.xhtml" x="900" y="450" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="900" y="900" zoom="true"/>
-        <Node id="user/register.xhtml" x="150" y="900" zoom="true"/>
-        <Node id="login/login_index.xhtml" x="1400" y="150" zoom="true"/>
-        <Node id="login/login_add_addressbook.xhtml" x="1150" y="750" zoom="true"/>
-        <Node id="login/login_own_addressbooks.xhtml" x="650" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_edit.xhtml" x="400" y="750" zoom="true"/>
-        <Node id="terms.xhtml" x="650" y="750" zoom="true"/>
-        <Node id="admin/contact/admin_contact_list.xhtml" x="150" y="150" zoom="true"/>
-        <Node id="admin/contact/admin_contact_edit.xhtml" x="150" y="450" zoom="true"/>
-        <Node id="admin/user/admin_user_list.xhtml" x="900" y="750" zoom="true"/>
-        <Node id="admin/admin_user_add.xhtml" x="1900" y="300" zoom="true"/>
-        <Node id="admin/country/admin_country_delete.xhtml" x="400" y="300" zoom="true"/>
+        <Node id="user/login.xhtml" x="400" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_list.xhtml" x="400" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_unlink.xhtml" x="150" y="750" zoom="true"/>
+        <Node id="login/login_edit_user_data.xhtml" x="1150" y="300" zoom="true"/>
+        <Node id="login/login_contact_data_saved.xhtml" x="2150" y="300" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_delete.xhtml" x="1150" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_list.xhtml" x="1150" y="750" zoom="true"/>
+        <Node id="login/login_data_saved.xhtml" x="1150" y="450" zoom="true"/>
+        <Node id="exception.xhtml" x="1650" y="300" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_delete.xhtml" x="650" y="1050" zoom="true"/>
+        <Node id="admin/user/admin_user_delete.xhtml" x="1900" y="450" zoom="true"/>
+        <Node id="user/register.xhtml" x="400" y="150" zoom="true"/>
+        <Node id="login/login_add_addressbook.xhtml" x="150" y="150" zoom="true"/>
+        <Node id="login/login_index.xhtml" x="150" y="300" zoom="true"/>
+        <Node id="login/login_own_addressbooks.xhtml" x="400" y="750" zoom="true"/>
+        <Node id="admin/user/admin_user_edit.xhtml" x="1900" y="300" zoom="true"/>
+        <Node id="terms.xhtml" x="650" y="150" zoom="true"/>
+        <Node id="admin/contact/admin_contact_edit.xhtml" x="650" y="600" zoom="true"/>
+        <Node id="admin/contact/admin_contact_list.xhtml" x="2150" y="150" zoom="true"/>
+        <Node id="admin/admin_user_add.xhtml" x="900" y="300" zoom="true"/>
+        <Node id="admin/user/admin_user_list.xhtml" x="1400" y="300" zoom="true"/>
+        <Node id="admin/country/admin_country_delete.xhtml" x="150" y="1200" zoom="true"/>
+        <Node id="login/login_user_data_saved.xhtml" x="1400" y="150" zoom="true"/>
         <Node id="user/user_list.xhtml" x="1400" y="450" zoom="true"/>
-        <Node id="login/login_user_data_saved.xhtml" x="650" y="1050" zoom="true"/>
-        <Node id="admin/country/admin_country_edit.xhtml" x="1150" y="300" zoom="true"/>
-        <Node id="logout.xhtml" x="150" y="1350" zoom="true"/>
-        <Node id="login/login_change_personal_data.xhtml" x="1650" y="300" zoom="true"/>
-        <Node id="user/user_profile.xhtml" x="400" y="1200" zoom="true"/>
-        <Node id="imprint.xhtml" x="400" y="600" zoom="true"/>
-        <Node id="user/show_addressbook.xhtml" x="1400" y="600" zoom="true"/>
-        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="2150" y="150" zoom="true"/>
-        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="1150" y="150" zoom="true"/>
-        <Node id="admin/admin_product_delete.xhtml" x="1150" y="450" zoom="true"/>
-        <Node id="login/login_change_email_address.xhtml" x="150" y="600" zoom="true"/>
+        <Node id="logout.xhtml" x="650" y="900" zoom="true"/>
+        <Node id="admin/country/admin_country_edit.xhtml" x="1400" y="600" zoom="true"/>
+        <Node id="login/login_change_personal_data.xhtml" x="150" y="450" zoom="true"/>
+        <Node id="user/user_profile.xhtml" x="150" y="900" zoom="true"/>
+        <Node id="admin/contact/admin_contact_delete.xhtml" x="900" y="1050" zoom="true"/>
+        <Node id="imprint.xhtml" x="900" y="900" zoom="true"/>
+        <Node id="user/show_addressbook.xhtml" x="2400" y="150" zoom="true"/>
+        <Node id="admin/mobile_provider/admin_mobile_provider_edit.xhtml" x="650" y="450" zoom="true"/>
+        <Node id="admin/cellphone/admin_contact_cellphone_show.xhtml" x="150" y="1350" zoom="true"/>
+        <Node id="admin/admin_product_delete.xhtml" x="1650" y="450" zoom="true"/>
+        <Node id="login/login_change_email_address.xhtml" x="1150" y="600" zoom="true"/>
     </Scope>
     <Scope Scope="All Faces Configurations"/>
 </Scene>
index 5f26fee961b5a7fba62800467d68338aac0a8761..6aaf8a5165540edf084665b3a958d30c10aa3c12 100644 (file)
@@ -268,7 +268,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:
@@ -462,3 +462,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 669b73afedeffa0659531d54eb81c6c80ea5917b..6140ad3637babdc9b40df3e3042ddafa72ab78d7 100644 (file)
@@ -248,7 +248,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:
@@ -441,3 +441,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 753f2730001199f9e05a76dab40fea19e3f97d91..b42a2a8e116ecc6743c7d335451e8684b5cf5f37 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;
+}