]> git.mxchange.org Git - pizzaservice-war.git/commitdiff
Continued with customer:
authorRoland Häder <roland@mxchange.org>
Fri, 29 Apr 2016 13:16:16 +0000 (15:16 +0200)
committerRoland Haeder <roland@mxchange.org>
Fri, 29 Apr 2016 18:50:37 +0000 (20:50 +0200)
- editing customer data is "basicly finished"
- removed i18n key as this was not following convention (and redundant)
- a user entry was not found (for users more clear)

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/localization/bundle_de_DE.properties
src/java/org/mxchange/localization/bundle_en_US.properties
web/WEB-INF/templates/generic/user_profile_link.tpl [new file with mode: 0644]
web/admin/customer/admin_customer_edit.xhtml

index cec1aaec1696a04a0291d0f726ffd844c74154fb..cfa34bd78d22049ad20922ce400b5674b8b16c59 100644 (file)
@@ -104,7 +104,6 @@ LOGIN_NO_PASSWORD_MESSAGE=Sie haben kein Passwort eingegeben.
 LOGIN_NO_USER_NAME_MESSAGE=Sie haben keinen Benutzernamen eingegeben.
 USER_NOT_LOGGED_IN=Sie sind nicht angemeldet.
 LOGIN_OWN_PROFILE_INVISIBLE=Ihr Profil ist auf "durchsichtig" gestellt.
-ERROR_USER_INSTANCE_NOT_SET=Fehler: Benutzer-Instanz nicht gesetzt.
 TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=Sie m\u00fcssen angemeldet sein
 USER_IS_NOT_LOGGED_IN_FULL=Damit diese Funktion nutzen k\u00f6nnen, m\u00fcssen Sie sich anmelden und in Ihren Account eingeloggt sein.
 ERROR_CURRENT_PASSWORD_MISMATCHING=Ihr eingegebenes Passwort entspricht nicht dem aktuell gespeicherten Passwort.
@@ -233,7 +232,7 @@ ADMIN_LINK_SHOW_USER_TITLE=Administratives Benutzerprofil anzeigen
 PAGE_TITLE_ADMIN_SHOW_USER=Benutzerprofil anzeigen
 CONTENT_TITLE_ADMIN_SHOW_USER=Profil eines Benutzers anzeigen:
 ERROR_PARAMETER_USER_ID_NOT_SET=Fehler: Benutzer-Id nicht gesetzt (Parameter: userId).
-ERROR_USER_ID_NOT_FOUND=Fehler: Benutzer-Id nicht gefunden.
+ERROR_USER_ID_NOT_FOUND=Fehler: Benutzereintrag nicht gefunden.
 ADMIN_TABLE_SUMMARY_SHOW_USER=Zeigt ein Benutzerprofil f\u00fcr administrative Zwecke an.
 ADMIN_HEADER_SHOW_USER=Benutzer {0} (Nummer {1}):
 ADMIN_USER_ID=Benutzer-Id:
@@ -381,3 +380,4 @@ 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.
+ERROR_CUSTOMER_ID_NOT_FOUND=Fehler: Kundeneintrag nicht gefunden.
index ff183ae680500d1ac416a65f35910d56f8dd8c00..2bdddab3aa9553b20dfaf144d4427fe3c3ead1ce 100644 (file)
@@ -105,7 +105,6 @@ LOGIN_NO_PASSWORD_MESSAGE=You have entered no password.
 LOGIN_NO_USER_NAME_MESSAGE=You have entered no user name.
 USER_NOT_LOGGED_IN=You are not signed in.
 LOGIN_OWN_PROFILE_INVISIBLE=Your profile is set to "invisible".
-ERROR_USER_INSTANCE_NOT_SET=Error: User instance not set.
 TABLE_HEADER_ERROR_USER_NOT_LOGGED_IN=You need to be logged-in
 USER_IS_NOT_LOGGED_IN_FULL=To use this feature you need to register and be logged-in into your account.
 ERROR_CURRENT_PASSWORD_MISMATCHING=Your entered password doesn't match the currently stored one.
@@ -234,7 +233,7 @@ ADMIN_LINK_SHOW_USER_TITLE=Show administrative user profile
 PAGE_TITLE_ADMIN_SHOW_USER=Show user profile
 CONTENT_TITLE_ADMIN_SHOW_USER=Show profile of a user:
 ERROR_PARAMETER_USER_ID_NOT_SET=Error: User id not set (parameter userId).
-ERROR_USER_ID_NOT_FOUND=Error: User id not found.
+ERROR_USER_ID_NOT_FOUND=Error: User entry not found.
 ADMIN_TABLE_SUMMARY_SHOW_USER=Shows a single user profile for administrative purposes.
 ADMIN_HEADER_SHOW_USER=User {0} (id {1}):
 ADMIN_USER_ID=User id:
@@ -382,3 +381,4 @@ 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.
+ERROR_CUSTOMER_ID_NOT_FOUND=Error: Customer entry not found.
diff --git a/web/WEB-INF/templates/generic/user_profile_link.tpl b/web/WEB-INF/templates/generic/user_profile_link.tpl
new file mode 100644 (file)
index 0000000..26fe351
--- /dev/null
@@ -0,0 +1,16 @@
+<?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="notice" value="#{msg.ERROR_PARAMETER_USER_NOT_SET}" rendered="#{empty user}" />
+
+       <h:outputText class="notice" value="#{msg.USER_PROFILE_NOT_PUBLICLY_VISIBLE}" rendered="#{not empty user and not profileController.isProfileLinkVisibleByUser(user)}" />
+
+       <h:link id="userProfileLink" outcome="user_profile" title="#{msg.LINK_USER_PROFILE_TITLE}" rendered="#{not empty user and profileController.isProfileLinkVisibleByUser(user)}">
+               <h:outputText id="userName" value="#{user.userName}" />
+               <f:param name="userId" value="#{user.userId}" />
+       </h:link>
+</ui:composition>
index e70fe72d154c349592c56ae6ffeeebf7ea0e174e..3bd118ae6b2abb8be1174f4c65c17480092530e2 100644 (file)
                </ui:define>
 
                <ui:define name="content">
-                       Here goes your content.
+                       <h:outputText styleClass="errors" value="#{msg.ERROR_CUSTOMER_ID_NOT_FOUND}" rendered="#{empty adminHelper.customer}" />
+
+                       <h:form id="admin_edit_customer" rendered="#{not empty adminHelper.customer}">
+                               <div class="table">
+                                       <div class="table_header">
+                                               #{msg.ADMIN_EDIT_CUSTOMER_TITLE}
+                                       </div>
+
+                                       <div class="para notice">
+                                               #{msg.ADMIN_CUSTOMER_PERSONAL_DATA_MINIMUM_NOTICE}
+                                       </div>
+
+                                       <ui:include src="/WEB-INF/templates/admin/customer/admin_form_customer_data.tpl">
+                                               <ui:param name="mode" value="edit" />
+                                       </ui:include>
+
+                                       <div class="table_footer">
+                                               <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
+                                               <h:commandButton class="submit" type="submit" id="register" value="#{msg.BUTTON_ADMIN_EDIT_CUSTOMER}" action="#{adminCustomerController.editCustomerData()}" />
+                                       </div>
+                               </div>
+                       </h:form>
                </ui:define>
        </ui:composition>
 </html>