]> git.mxchange.org Git - jfinancials-war.git/commitdiff
Product-only:
authorRoland Häder <roland@mxchange.org>
Sat, 31 Mar 2018 03:58:09 +0000 (05:58 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 31 Mar 2018 04:09:00 +0000 (06:09 +0200)
- added dialog (modal) for details about a single category
- updated header for same list
- added missing i18n keys

Signed-off-by: Roland Häder <roland@mxchange.org>
src/java/org/mxchange/jfinancials/beans/product_category/list/FinancialsCategoryListWebViewBean.java
src/java/org/mxchange/localization/project_de_DE.properties
src/java/org/mxchange/localization/project_en_US.properties
web/admin/generic_product/admin_generic_product_list.xhtml
web/admin/product_category/admin_product_category_list.xhtml

index 3f7aac14199416e54f0f62cd1a8108742f6e41be..ac6c29e71ec750772a070d7ece613481cae787d9 100644 (file)
@@ -73,6 +73,11 @@ public class FinancialsCategoryListWebViewBean extends BaseFinancialsBean implem
         */
        private List<Category> filteredCategories;
 
+       /**
+        * Selected category
+        */
+       private Category selectedCategory;
+
        /**
         * Default constructor
         */
@@ -162,6 +167,24 @@ public class FinancialsCategoryListWebViewBean extends BaseFinancialsBean implem
                this.filteredCategories = filteredCategories;
        }
 
+       /**
+        * Getter for selected category
+        * <p>
+        * @return Selected category
+        */
+       public Category getSelectedCategory () {
+               return this.selectedCategory;
+       }
+
+       /**
+        * Setter for selected category
+        * <p>
+        * @param selectedCategory Selected category
+        */
+       public void setSelectedCategory (final Category selectedCategory) {
+               this.selectedCategory = selectedCategory;
+       }
+
        /**
         * Initialization of this bean
         */
index 6c915c0cbeb10e4c1946649f5bd19ff5c609e78b..bdd8238259ddf27fb825f14a1f914545f3504ec5 100644 (file)
@@ -171,7 +171,6 @@ CONTENT_TITLE_ADMIN_LIST_PRODUCT_CATEGORY=Produktkategorien auflisten:
 TABLE_SUMMARY_ADMIN_LIST_PRODUCT_CATEGORIES=Diese Tabelle listet alle eingetragenen Produktkategorien auf.
 #@TODO Please fix German umlauts!
 ADMIN_EMPTY_LIST_PRODUCT_CATEGORIES=Es befinden sich keine Produktkategorien in der Datenbank. Oder Ihre Suche ergab keine Uebereinstimmungen.
-ADMIN_LIST_PRODUCT_CATEGORIES_HEADER=Alle Produktkategorien auflisten
 ADMIN_ASSIGNED_PARENT_CATEGORY_HEADER=Zugewiesene Elternkategorie:
 ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE=Zeigt Daten der Produktkategorie an.
 ADMIN_LINK_ASSIGN_PARENT_CATEGORY_TITLE=Elternkategorie zuweisen.
@@ -210,6 +209,7 @@ SELECT_RECEIPT_ITEM_MANUFACTURER=Hersteller zum Kassenboneintrah auswaehlen:
 ADMIN_RECEIPT_ITEM_MANUFACTURER_NAME_HEADER=Hersteller des Boneintrages:
 ENTER_RECEIPT_ITEM_BRAND_NAME=Warenzeichen/Marke eingeben:
 ENTER_RECEIPT_ITEM_BRAND_NAME_TITLE=Geben Sie das Warenzeichen ein, dass Sie auf dem Kassenbon finden.
+#@TODO Please fix German umlauts!
 ADMIN_PRODUCT_CURRENCY_CODE_REQUIRED=Bitte geben Sie den Waehrungscode fuer das Produkt ein. Beispiele: EUR, USD, PHP
 #@TODO Please fix German umlauts!
 ADMIN_PRODUCT_UNIT_AMOUNT_REQUIRED=Bitte geben Sie die Stueckanzahl des Produktes ein. Beispiel: 500 fuer 500g
@@ -289,3 +289,17 @@ PRODUCT_UNIT_I18N_KEY_TITLE=Internationalisierungsschluessel fuer Einheit
 PRODUCT_HAS_NO_MANUFACTURER_ASSIGNED=Produkt hat keinen Hersteller zugewiesen.
 ADMIN_ASSIGNED_PRODUCT_MANUFACTURER_HEADER=Zugewiesener Hersteller:
 ADMIN_ASSIGNED_PRODUCT_MANUFACTURER_TITLE=Diesem Produkt zugewiesner Hersteller.
+#@TODO Please fix German umlauts!
+ADMIN_PRODUCT_ENTRY_CREATED_TITLE=Wann dieses Produkt der Datenbank hinzugefuegt wurde.
+#@TODO Please fix German umlauts!
+ADMIN_CATEGORY_ENTRY_CREATED_TITLE=Wann diese Kategorie der Datenbank hinzugefuegt wurde.
+ADMIN_SINGLE_CATEGORY_DETAILS_HEADER=Details zur einzelnen Kategorie
+ADMIN_CATEGORY_DETAILS_HEADER=Details zur Kategorie "{0}" (Id {1}):
+CATEGORY_ID_NUMBER_TITLE=Id-Nummer der Kategorie
+#@TODO Please fix German umlauts!
+CATEGORY_I18N_KEY_TITLE=Internationalisationsschluessel fuer Kategorie
+CATEGORY_IN_STATISTICS_HEADER=In Statistiken:
+CATEGORY_SHOW_IN_STATISTICS_TITLE=Ob diese Kategorie in Statistiken vorkommt.
+CATEGORY_PARENT_HEADER=Elternkategorie:
+CATEGORY_PARENT_TITLE=Elternkategorie dieser Kategorie.
+CATEGORY_HAS_NO_PARENT=Diese Kategorie hat keine Elternkategorie.
index 6c74958974bb92b80f8a3d5eac821923d3928701..9c7b9ae1bdf68ac0e737175fde54061e9022ffc6 100644 (file)
@@ -123,7 +123,6 @@ PAGE_TITLE_ADMIN_LIST_PRODUCT_CATEGORY=List product categories
 CONTENT_TITLE_ADMIN_LIST_PRODUCT_CATEGORY=List product categories:
 TABLE_SUMMARY_ADMIN_LIST_PRODUCT_CATEGORIES=This table lists all product categories.
 ADMIN_EMPTY_LIST_PRODUCT_CATEGORIES=There are no product categories in database. Or your search criteria doesn't match anything.
-ADMIN_LIST_PRODUCT_CATEGORIES_HEADER=List all product categories
 ADMIN_ASSIGNED_PARENT_CATEGORY_HEADER=Assigned parent category:
 ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE=Shows product category data.
 ADMIN_LINK_ASSIGN_PARENT_CATEGORY_TITLE=Assign parent cateogory.
@@ -211,3 +210,14 @@ PRODUCT_UNIT_I18N_KEY_TITLE=Internationalization key for unit
 PRODUCT_HAS_NO_MANUFACTURER_ASSIGNED=Product has no manufacturer assigned.
 ADMIN_ASSIGNED_PRODUCT_MANUFACTURER_HEADER=Assigned manufacturer:
 ADMIN_ASSIGNED_PRODUCT_MANUFACTURER_TITLE=This product assigned manufacturer.
+ADMIN_PRODUCT_ENTRY_CREATED_TITLE=When this product has been created in database.
+ADMIN_CATEGORY_ENTRY_CREATED_TITLE=When this category has been created in database.
+ADMIN_SINGLE_CATEGORY_DETAILS_HEADER=Details of a single category
+ADMIN_CATEGORY_DETAILS_HEADER=Details of category "{0}" (Id {1}):
+CATEGORY_ID_NUMBER_TITLE=Id number of category
+CATEGORY_I18N_KEY_TITLE=Internationalization key for category
+CATEGORY_IN_STATISTICS_HEADER=In Statistics:
+CATEGORY_SHOW_IN_STATISTICS_TITLE=Whether this category is shown in statistics.
+CATEGORY_PARENT_HEADER=Parent category:
+CATEGORY_PARENT_TITLE=Parent category of this category.
+CATEGORY_HAS_NO_PARENT=This category has no parent category.
index d98d5da2554b3b4ba02e4a66939df1f16cd69a7d..ce6deff342e9e5429c3e29166728e6783df0ff53 100644 (file)
                                hideEffect="fade"
                                showEffect="fade"
                                widgetVar="productDialog"
-                               position="center center"
+                               position="center,center"
                                responsive="true"
                                >
                                <p:outputPanel id="product-details">
                                                        <f:param name="basicDataId" value="#{productListController.selectedProduct.productManufacturer.basicDataId}" />
                                                </p:link>
                                                <h:outputText value="#{project.PRODUCT_HAS_NO_MANUFACTURER_ASSIGNED}" rendered="#{empty productListController.selectedProduct.productManufacturer}" />
+
+                                               <p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_PRODUCT_ENTRY_CREATED_TITLE}" />
+                                               <h:outputText id="productCreated" value="#{productListController.selectedProduct.productCreated.time}">
+                                                       <f:convertDateTime for="productCreated" type="both" timeStyle="short" dateStyle="short" />
+                                               </h:outputText>
                                        </p:panelGrid>
                                </p:outputPanel>
                        </p:dialog>
index 0d7176f54d3cabce3cfbd768fd6ff0d90e7bd98f..a940780c074b802cf3bff61f6eeab9b98624dc11 100644 (file)
@@ -24,8 +24,9 @@
                                tableStyleClass="table table-full"
                                paginator="true"
                                paginatorTemplate="{CurrentPageReport} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
-                               filteredValue="#{categoryController.filteredCategories}"
+                               filteredValue="#{categoryListController.filteredCategories}"
                                rows="10"
+                               rowKey="#{category.categoryId}"
                                reflow="true"
                                resizableColumns="true"
                                rowsPerPageTemplate="5,10,20,50,100"
                                summary="#{project.TABLE_SUMMARY_ADMIN_LIST_PRODUCT_CATEGORIES}"
                                emptyMessage="#{project.ADMIN_EMPTY_LIST_PRODUCT_CATEGORIES}"
                                widgetVar="categoryList"
+                               selectionMode="single"
+                               selection="#{categoryListController.selectedCategory}"
+                               skipChildren="true"
                                >
 
                                <f:facet name="header">
-                                       <p:panelGrid columns="2" columnClasses="ui-grid-col-10,ui-grid-col-2" layout="grid" styleClass="ui-noborder ui-transparent-widget">
-                                               <h:outputText value="#{project.ADMIN_LIST_PRODUCT_CATEGORIES_HEADER}" />
+                                       <p:panelGrid columns="3" layout="grid" columnClasses="ui-grid-col-4,ui-grid-col-6,ui-grid-col-2">
+                                               <p:spacer />
 
-                                               <h:panelGroup>
+                                               <p:panelGrid columns="2" columnClasses="ui-grid-4,ui-grid-8" layout="grid" styleClass="table table-full ui-noborder">
+                                                       <p:outputLabel for="globalFilter" value="#{msg.SEARCH_ALL_FIELDS}" style="float: right" />
+                                                       <p:inputText id="globalFilter" onkeyup="PF('categoryList').filter()" placeholder="#{msg.ENTER_KEYWORD}"/>
+                                               </p:panelGrid>
+
+                                               <p:outputPanel>
+                                                       <p:spacer height="4" />
                                                        <p:commandButton id="toggler" type="button" value="#{msg.SELECT_SHOWN_COLUMNS}" styleClass="column-selector" />
                                                        <p:columnToggler datasource="categoryList" trigger="toggler" />
-                                               </h:panelGroup>
+                                               </p:outputPanel>
                                        </p:panelGrid>
                                </f:facet>
 
+                               <p:ajax
+                                       event="rowSelect"
+                                       update=":master:form-list-categories:category-details"
+                                       oncomplete="PF('categoryDialog').show()"
+                                       />
+
                                <p:column headerText="#{msg.ID_NUMBER_HEADER}" sortBy="#{category.categoryId}" filterable="false">
                                        <p:link outcome="admin_show_product_category" title="#{project.ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE}" value="#{category.categoryId}">
                                                <f:param name="categoryId" value="#{category.categoryId}" />
                                        <product-links:outputProductCategoryAdminMiniLinks category="#{category}" />
                                </p:column>
                        </p:dataTable>
+
+                       <p:dialog
+                               dynamic="true"
+                               modal="true"
+                               resizable="false"
+                               header="#{project.ADMIN_SINGLE_CATEGORY_DETAILS_HEADER}"
+                               hideEffect="fade"
+                               showEffect="fade"
+                               widgetVar="categoryDialog"
+                               position="center,center"
+                               responsive="true"
+                               >
+                               <p:outputPanel id="category-details">
+                                       <p:panelGrid columns="2" rendered="#{not empty categoryListController.selectedCategory}" columnClasses="label,value">
+                                               <f:facet name="header">
+                                                       <h:outputFormat value="#{project.ADMIN_CATEGORY_DETAILS_HEADER}">
+                                                               <f:param value="#{local[categoryListController.selectedCategory.categoryI18nKey]}" />
+                                                               <f:param value="#{categoryListController.selectedCategory.categoryId}" />
+                                                       </h:outputFormat>
+                                               </f:facet>
+
+                                               <p:outputLabel value="#{msg.ID_NUMBER_HEADER}" title="#{project.CATEGORY_ID_NUMBER_TITLE}" />
+                                               <h:outputText value="#{categoryListController.selectedCategory.categoryId}" />
+
+                                               <p:outputLabel value="#{msg.ADMIN_I18N_KEY_HEADER}" title="#{project.CATEGORY_I18N_KEY_TITLE}" />
+                                               <h:outputText value="#{categoryListController.selectedCategory.categoryI18nKey}" title="#{local[categoryListController.selectedCategory.categoryI18nKey]}" />
+
+                                               <p:outputLabel value="#{project.CATEGORY_IN_STATISTICS_HEADER}" title="#{project.CATEGORY_SHOW_IN_STATISTICS_TITLE}" />
+                                               <h:outputText value="#{categoryListController.selectedCategory.categoryShownInStatistics ? msg.CHOICE_YES : msg.CHOICE_NO}" />
+
+                                               <p:outputLabel value="#{project.CATEGORY_PARENT_HEADER}" title="#{project.CATEGORY_PARENT_TITLE}" />
+                                               <p:link outcome="admin_show_product_category" title="#{project.ADMIN_LINK_SHOW_PRODUCT_CATEGORY_TITLE}" value="#{local[categoryListController.selectedCategory.parentCategory.categoryI18nKey]}" rendered="#{not empty categoryListController.selectedCategory.parentCategory}">
+                                                       <f:param name="categoryId" value="#{categoryListController.selectedCategory.parentCategory.categoryId}" />
+                                               </p:link>
+                                               <h:outputText value="#{project.CATEGORY_HAS_NO_PARENT}" rendered="#{empty categoryListController.selectedCategory.parentCategory}" />
+
+                                               <p:outputLabel value="#{msg.ENTRY_CREATED_HEADER}" title="#{project.ADMIN_CATEGORY_ENTRY_CREATED_TITLE}" />
+                                               <h:outputText value="#{categoryListController.selectedCategory.categoryCreated.time}">
+                                                       <f:convertDateTime type="both" timeStyle="short" dateStyle="short" />
+                                               </h:outputText>
+                                       </p:panelGrid>
+                               </p:outputPanel>
+                       </p:dialog>
                </h:form>
 
                <h:form>