]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 17:51:29 +0000 (19:51 +0200)
committerRoland Häder <roland@mxchange.org>
Wed, 20 May 2020 17:51:29 +0000 (19:51 +0200)
- renamed adminCategoryController to adminProductCategoryController
- added column with filter for categoryShownInStatistics flag
- added missing i18n key

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/product_category/action/FinancialAdminProductCategoryActionWebRequestBean.java
src/java/org/mxchange/localization/product_de_DE.properties
src/java/org/mxchange/localization/product_en_US.properties
web/admin/product_category/admin_product_category_edit.xhtml
web/admin/product_category/admin_product_category_list.xhtml
web/guest/user/user_list.xhtml

index 87d7c80ed0772bab31c446ecf8f6f8d907a0d7a4..a147087b4c6e54d0afa12d32e89eda86c57eb415 100644 (file)
@@ -115,7 +115,7 @@ public class FinancialAdminProductCategoryActionWebRequestBean extends BaseFinan
        /**
         * Adds given category data from request to database
         */
-       public void addCategory () {
+       public void addProductCategory () {
                // Is i18n key already used?
                if (this.productCategoryListController.isCategoryI18nKeyAdded(this.getCategoryI18nKey())) {
                        // Throw exception
@@ -255,11 +255,11 @@ public class FinancialAdminProductCategoryActionWebRequestBean extends BaseFinan
        }
 
        /**
-        * Updates given category data from request to database
+        * Updates given product category data from request to database.
         * <p>
         * @return Redirection outcome
         */
-       public String updateCategory () {
+       public String updateProductCategory () {
                // Check if current category is set
                if (this.getCurrentCategory() == null) {
                        // Throw NPE
index a85a162213e186fba432b127049be6601f1ec535..fd4ca7c67f7b80c928ce29f1545b5b3b27f33a7f 100644 (file)
@@ -213,3 +213,4 @@ ADMIN_EDIT_PRODUCT_CATEGORY_MINIMUM_DATA=Geben Sie mindestens den I18n-Schluesse
 BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Produktkategorie \u00e4ndern
 ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Produktkategorie mit Id {0} editieren:
 ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=Sie haben die Produktkategorie nicht ge\u00e4ndert.
+SHOWN_IN_STATISTICS_HEADER=In Statistiken angezeigt:
index aff88ae38953db418b99c11a57ce4b79e8ac42d9..2bebb528e034b3b684e01bb57c1a0fbfa57ca8d8 100644 (file)
@@ -172,3 +172,4 @@ ADMIN_EDIT_PRODUCT_CATEGORY_MINIMUM_DATA=Please enter at least the i18n key to e
 BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY=Change product category
 ADMIN_EDIT_PRODUCT_CATEGORY_TITLE=Edit product category Id {0}:
 ADMIN_PRODUCT_CATEGORY_NOT_UPDATED=You have not changed the product category.
+SHOWN_IN_STATISTICS_HEADER=Shown in statistics:
index d80f14a1db6961c44dda739a01b69b58b6151fb6..e7934c144091b4eff92effc1f156acb5cac82ef6 100644 (file)
@@ -69,7 +69,7 @@
                                                <p:commandButton
                                                        type="submit"
                                                        value="#{product.BUTTON_ADMIN_EDIT_PRODUCT_CATEGORY}"
-                                                       action="#{adminProductCategoryActionController.updateCategory()}"
+                                                       action="#{adminProductCategoryActionController.updateProductCategory()}"
                                                        />
                                        </p:panelGrid>
                                </f:facet>
index 67c61b13e273b0f23245f2384f0dc41c13e6acba..ccbcdcba253de7fc5e2e165058642e0e4968643c 100644 (file)
                                        </p:link>
                                </p:column>
 
+                               <p:column
+                                       headerText="#{product.SHOWN_IN_STATISTICS_HEADER}"
+                                       sortBy="#{category.categoryShownInStatistics}"
+                                       filterBy="#{category.categoryShownInStatistics}"
+                                       filterMatchMode="exact"
+                                       >
+                                       <f:facet name="filter">
+                                               <p:selectOneMenu onchange="PF('categoryList').filter()">
+                                                       <f:converter converterId="javax.faces.Boolean" />
+                                                       <f:selectItem itemLabel="#{msg.CHOICE_ALL}" itemValue="#{null}" />
+                                                       <f:selectItem itemLabel="#{msg.CHOICE_YES}" itemValue="true" />
+                                                       <f:selectItem itemLabel="#{msg.CHOICE_NO}" itemValue="false" />
+                                               </p:selectOneMenu>
+                                       </f:facet>
+
+                                       <h:outputText value="#{category.categoryShownInStatistics ? msg.CHOICE_YES : msg.CHOICE_NO}" />
+                               </p:column>
+
                                <p:column
                                        headerText="#{msg.ENTRY_CREATED_HEADER}"
                                        sortBy="#{category.categoryEntryCreated}"
                                                <p:commandButton
                                                        type="submit"
                                                        value="#{product.BUTTON_ADMIN_ADD_PRODUCT_CATEGORY}"
-                                                       action="#{adminCategoryController.addCategory()}"
+                                                       action="#{adminProductCategoryActionController.addProductCategory()}"
                                                        update="form-list-categories:categoryList"
                                                        />
                                        </p:panelGrid>
index 43392523266554c3eebbd0fcb97ab4a9c344d8ff..349a5a1cbe99e88deec8a7d73ccb4788625a1cd1 100644 (file)
@@ -56,7 +56,7 @@
                                                        <h:outputText value="#{msg.USER_CREATED}" />
                                                </f:facet>
 
-                                               <h:outputFormat id="userEntryCreated" value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
+                                               <h:outputFormat value="#{user.userEntryCreated.time}" title="#{msg.USER_CREATED_TITLE}" />
                                        </p:column>
                                </ui:fragment>
                        </p:dataTable>