From df142ea89972bc5c2f67ec402119770be9750fd8 Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Sun, 10 Apr 2016 20:20:35 +0200 Subject: [PATCH] added administrative edit/delete for categories and products --- nbproject/faces-config.NavData | 48 +++++++------- .../localization/bundle_de_DE.properties | 18 +++++- .../localization/bundle_en_US.properties | 10 ++- web/WEB-INF/faces-config.xml | 18 +++++- web/admin/admin_category_delete.xhtml | 20 ++++++ web/admin/admin_category_edit.xhtml | 20 ++++++ ...tegory.xhtml => admin_category_list.xhtml} | 39 +++++------- web/admin/admin_product_delete.xhtml | 20 ++++++ web/admin/admin_product_edit.xhtml | 20 ++++++ ...product.xhtml => admin_product_list.xhtml} | 62 +++++++++---------- 10 files changed, 190 insertions(+), 85 deletions(-) create mode 100644 web/admin/admin_category_delete.xhtml create mode 100644 web/admin/admin_category_edit.xhtml rename web/admin/{admin_category.xhtml => admin_category_list.xhtml} (63%) create mode 100644 web/admin/admin_product_delete.xhtml create mode 100644 web/admin/admin_product_edit.xhtml rename web/admin/{admin_product.xhtml => admin_product_list.xhtml} (69%) diff --git a/nbproject/faces-config.NavData b/nbproject/faces-config.NavData index 8236ca1c..374409e2 100644 --- a/nbproject/faces-config.NavData +++ b/nbproject/faces-config.NavData @@ -2,30 +2,34 @@ - - + + + - - - - - - - + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + diff --git a/src/java/org/mxchange/localization/bundle_de_DE.properties b/src/java/org/mxchange/localization/bundle_de_DE.properties index 20710956..455fd117 100644 --- a/src/java/org/mxchange/localization/bundle_de_DE.properties +++ b/src/java/org/mxchange/localization/bundle_de_DE.properties @@ -152,8 +152,6 @@ PERSONAL_DATA_LEGEND=Bitte Ihre Daten eingeben: GUEST_PAYMENT_WITHOUT_REGISTRATION_TITLE=Bezahlung ohne Anmeldung PAGE_TITLE_CUSTOMER_LOGIN=Einloggen CONTENT_TITLE_CUSTOMER_LOGIN=Zum Kundenbereich einloggen: -PAGE_TITLE_CUSTOMER_LOST_PASSWORD=Passwort vergessen -CONTENT_TITLE_CUSTOMER_LOST_PASSWORD=Stellen Sie Ihr Passwort wieder her: GUEST_LOST_PASSWORD_TITLE=Sie haben Ihr Passwort vergessen? GUEST_LOST_PASSWORD_LEGEND_TITLE=Bitte Daten eingeben: GUEST_LOST_PASSWORD_LEGEND=Bitte Daten eingeben: @@ -245,3 +243,19 @@ ADMIN_ENTER_PRODUCT_PRICE_EXAMPLE=(z.B. 50.0 ADMIN_TITLE_PRODUCT_NUMBER=Produktnummer: ADMIN_TITLE_PRODUCT_TITLE=Produktbezeichnung: ADMIN_ENTER_SINGLE_PRODUCT_PRICE=Einzelpreis: +#@TODO Fix German umlauts! +PAGE_TITLE_ADMIN_EDIT_CATEGORY=Kategorie aendern +#@TODO Fix German umlauts! +CONTENT_TITLE_ADMIN_EDIT_CATEGORY=Kategorie aendern: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_DELETE_CATEGORY=Kategorie loeschen +#@TODO Fix German umlauts! +CONTENT_TITLE_ADMIN_DELETE_CATEGORY=Kategorie loeschen: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_DELETE_PRODUCT=Produkt loeschen +#@TODO Please fix German umlauts! +CONTENT_TITLE_ADMIN_DELETE_PRODUCT=Produkt loeschen: +#@TODO Please fix German umlauts! +PAGE_TITLE_ADMIN_EDIT_PRODUCT=Produkt aendern +#@TODO Please fix German umlauts! +CONTENT_TITLE_ADMIN_EDIT_PRODUCT=Produkt aendern: diff --git a/src/java/org/mxchange/localization/bundle_en_US.properties b/src/java/org/mxchange/localization/bundle_en_US.properties index 492c8c57..1268e837 100644 --- a/src/java/org/mxchange/localization/bundle_en_US.properties +++ b/src/java/org/mxchange/localization/bundle_en_US.properties @@ -116,8 +116,6 @@ PAGE_TITLE_INDEX_CHECKOUT2=Checkout without login CONTENT_TITLE_INDEX_CHECKOUT2=Checkout without login: GUEST_CHECKOUT_WITHOUT_REGISTRATION_TITLE=You can checkout without registration CONTENT_TITLE_CUSTOMER_CHECKOUT=Choose checkout option: -PAGE_TITLE_USER_LOGIN=Login -CONTENT_TITLE_USER_LOGIN=Login to user area: LINK_CHECKOUT_OPTION_LOGIN=Continue to customer login LINK_CHECKOUT_OPTION_REGISTRATION=Continue with new customer registration LINK_CHECKOUT_OPTION_GUEST=Checkout without registration @@ -239,3 +237,11 @@ ADMIN_ENTER_PRODUCT_PRICE_EXAMPLE=(example: 50.0) ADMIN_TITLE_PRODUCT_NUMBER=Product number: ADMIN_TITLE_PRODUCT_TITLE=Product title: ADMIN_ENTER_SINGLE_PRODUCT_PRICE=Single product price: +PAGE_TITLE_ADMIN_EDIT_CATEGORY=Edit category +CONTENT_TITLE_ADMIN_EDIT_CATEGORY=Edit category: +PAGE_TITLE_ADMIN_DELETE_CATEGORY=Delete category +CONTENT_TITLE_ADMIN_DELETE_CATEGORY=Delete category: +PAGE_TITLE_ADMIN_DELETE_PRODUCT=Delete product +CONTENT_TITLE_ADMIN_DELETE_PRODUCT=Delete product: +PAGE_TITLE_ADMIN_EDIT_PRODUCT=Edit product +CONTENT_TITLE_ADMIN_EDIT_PRODUCT=Edit product: diff --git a/web/WEB-INF/faces-config.xml b/web/WEB-INF/faces-config.xml index 6b5c7a4e..1d335632 100644 --- a/web/WEB-INF/faces-config.xml +++ b/web/WEB-INF/faces-config.xml @@ -57,11 +57,11 @@ admin_product - /admin/admin_product.xhtml + /admin/admin_product_list.xhtml admin_category - /admin/admin_category.xhtml + /admin/admin_category_list.xhtml admin_index @@ -135,4 +135,18 @@ /* + + /admin/admin_product_list.xhtml + + admin_edit_product + /admin/admin_product_edit.xhtml + + + + /admin/admin_category_list.xhtml + + admin_edit_category + /admin/admin_category_edit.xhtml + + diff --git a/web/admin/admin_category_delete.xhtml b/web/admin/admin_category_delete.xhtml new file mode 100644 index 00000000..f6239318 --- /dev/null +++ b/web/admin/admin_category_delete.xhtml @@ -0,0 +1,20 @@ + + + + + + #{msg.PAGE_TITLE_ADMIN_DELETE_CATEGORY} + + + #{msg.CONTENT_TITLE_ADMIN_DELETE_CATEGORY} + + + + Here goes your content. + + + diff --git a/web/admin/admin_category_edit.xhtml b/web/admin/admin_category_edit.xhtml new file mode 100644 index 00000000..4bbf69a0 --- /dev/null +++ b/web/admin/admin_category_edit.xhtml @@ -0,0 +1,20 @@ + + + + + + #{msg.PAGE_TITLE_ADMIN_EDIT_CATEGORY} + + + #{msg.CONTENT_TITLE_ADMIN_EDIT_CATEGORY} + + + + Here goes your content. + + + diff --git a/web/admin/admin_category.xhtml b/web/admin/admin_category_list.xhtml similarity index 63% rename from web/admin/admin_category.xhtml rename to web/admin/admin_category_list.xhtml index 92c84cec..58b5b9be 100644 --- a/web/admin/admin_category.xhtml +++ b/web/admin/admin_category_list.xhtml @@ -15,31 +15,24 @@
- - - - #{msg.SELECT_ENTRY} - #{cat.categoryId}: - - + + + #{msg.SELECT_ENTRY} + + + + - - #{msg.ADMIN_ENTER_CATEGORY_TITLE} - #{cat.categoryTitle} - + + #{msg.ADMIN_ENTER_CATEGORY_TITLE} + #{cat.categoryTitle} + - - #{msg.ADMIN_PARENT_CATEGORY} - #{cat.parentCategory.categoryId} - - - - - + + #{msg.ADMIN_PARENT_CATEGORY} + #{cat.parentCategory.categoryId} + +
diff --git a/web/admin/admin_product_delete.xhtml b/web/admin/admin_product_delete.xhtml new file mode 100644 index 00000000..f2eaed2d --- /dev/null +++ b/web/admin/admin_product_delete.xhtml @@ -0,0 +1,20 @@ + + + + + + #{msg.PAGE_TITLE_ADMIN_DELETE_PRODUCT} + + + #{msg.CONTENT_TITLE_ADMIN_DELETE_PRODUCT} + + + + Here goes your content. + + + diff --git a/web/admin/admin_product_edit.xhtml b/web/admin/admin_product_edit.xhtml new file mode 100644 index 00000000..6ef494f8 --- /dev/null +++ b/web/admin/admin_product_edit.xhtml @@ -0,0 +1,20 @@ + + + + + + #{msg.PAGE_TITLE_ADMIN_EDIT_PRODUCT} + + + #{msg.CONTENT_TITLE_ADMIN_EDIT_PRODUCT} + + + + Here goes your content. + + + diff --git a/web/admin/admin_product.xhtml b/web/admin/admin_product_list.xhtml similarity index 69% rename from web/admin/admin_product.xhtml rename to web/admin/admin_product_list.xhtml index 67d1b687..3ee0944d 100644 --- a/web/admin/admin_product.xhtml +++ b/web/admin/admin_product_list.xhtml @@ -15,40 +15,34 @@
- - - - #{msg.ADMIN_TITLE_PRODUCT_NUMBER} - #{product.productId}: - - - - #{msg.ADMIN_TITLE_PRODUCT_TITLE} - #{product.productTitle} - - - - #{msg.SINGLE_PRODUCT_PRICE} - #{product.productPrice} - - - - #{msg.CATEGORY} - #{product.productCategory.categoryTitle} - - - - #{msg.IS_AVAILABLE} - #{product.productAvailability} - - - - - + + + #{msg.ADMIN_TITLE_PRODUCT_NUMBER} + + + + + + + #{msg.ADMIN_TITLE_PRODUCT_TITLE} + #{product.productTitle} + + + + #{msg.SINGLE_PRODUCT_PRICE} + #{product.productPrice} + + + + #{msg.CATEGORY} + #{product.productCategory.categoryTitle} + + + + #{msg.IS_AVAILABLE} + #{product.productAvailability} + +
-- 2.39.5