*/
private List<Category> filteredCategories;
+ /**
+ * Selected category
+ */
+ private Category selectedCategory;
+
/**
* Default constructor
*/
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
*/
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.
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
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.
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.
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.
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>
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>