]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/category.xhtml
a32d8fe3f00c70c8fab51b0d0c8352c11fefc569
[pizzaservice-war.git] / web / admin / category.xhtml
1 <?xml version="1.0" encoding="UTF-8" ?>
2 <html xmlns="http://www.w3.org/1999/xhtml"
3           xmlns:ui="http://java.sun.com/jsf/facelets"
4           xmlns:h="http://xmlns.jcp.org/jsf/html"
5           xmlns:f="http://xmlns.jcp.org/jsf/core"
6           >
7
8         <ui:composition template="/WEB-INF/templates/admin/admin_base.tpl">
9                 <ui:define name="admin_title">#{msg.PAGE_TITLE_ADMIN_CATEGORIES}</ui:define>
10
11                 <ui:define name="menu">
12                         <ui:include id="menu" class="admin_menu" src="/WEB-INF/templates/admin/admin_menu.tpl" />
13                 </ui:define>
14
15                 <ui:define name="content_header">
16                         #{msg.SUB_TITLE_ADMIN_CATEGORIES}
17                 </ui:define>
18
19                 <ui:define name="content">
20                         <div class="para">
21                                 <h:form acceptcharset="utf-8" id="form">
22                                         <h:dataTable headerClass="table_header_column" rowClasses="table_row" styleClass="table" id="categories" value="#{controller.allCategories}" var="cat">
23                                                 <h:column>
24                                                         <f:facet name="header">#{msg.SELECT_ENTRY}</f:facet>
25                                                         #{cat.id}:
26                                                         <h:selectBooleanCheckbox class="input" value="true" />
27                                                 </h:column>
28
29                                                 <h:column>
30                                                         <f:facet name="header">#{msg.ADMIN_ENTER_CATEGORY_TITLE}</f:facet>
31                                                         #{cat.title}
32                                                 </h:column>
33
34                                                 <h:column>
35                                                         <f:facet name="header">#{msg.ADMIN_PARENT_CATEGORY}</f:facet>
36                                                         #{cat.parentId}
37                                                 </h:column>
38                                         </h:dataTable>
39
40                                         <div class="table_footer">
41                                                 <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
42                                                 <h:commandButton class="submit" type="submit" id="edit" action="#{admin_category.editCategory(cat)}" value="#{msg.BUTTON_EDIT_ENTRIES}" />
43                                                 <h:commandButton class="delete" type="submit" id="delete" action="#{admin_category.deleteCategory(cat)}" value="#{msg.BUTTON_DELETE_ENTRIES}" />
44                                         </div>
45                                 </h:form>
46                         </div>
47
48                         <div class="para">
49                                 <h:form acceptcharset="utf-8" id="add_category">
50                                 <div class="table">
51                                         <div class="table_header">
52                                                 #{msg.ADMIN_ADD_CATEGORY_TITLE}
53                                         </div>
54
55                                         <fieldset id="product_data">
56                                                 <legend>#{msg.PLEASE_FILL_ALL_FIELDS}</legend>
57
58                                                 <div class="table_row">
59                                                         <div class="table_left">
60                                                                 #{msg.ADMIN_ENTER_CATEGORY_TITLE}
61                                                                 <div class="tiny">(#{msg.ADMIN_ENTER_CATEGORY_TITLE_EXAMPLE})</div>
62                                                         </div>
63
64                                                         <div class="table_right">
65                                                                 <h:inputText class="input" id="title" value="#{admin_category.title}" size="10" maxlength="255" required="true" />
66                                                         </div>
67
68                                                         <div class="clear"></div>
69                                                 </div>
70
71                                                 <div class="table_row">
72                                                         <div class="table_left">
73                                                                 #{msg.ADMIN_PARENT_CATEGORY}
74                                                         </div>
75
76                                                         <div class="table_right">
77                                                                 <ui:include src="/WEB-INF/templates/admin/admin_parent_category_selection_box.tpl" />
78                                                         </div>
79
80                                                         <div class="clear"></div>
81                                                 </div>
82                                         </fieldset>
83
84                                         <div class="table_footer">
85                                                 <h:commandButton class="reset" type="reset" value="#{msg.BUTTON_RESET_FORM}" />
86                                                 <h:commandButton class="submit" type="submit" action="#{admin_category.addCategory()}" value="#{msg.BUTTON_ADD_CATEGORY}" />
87                                         </div>
88                                 </div>
89                                 </h:form>
90                         </div>
91                 </ui:define>
92
93                 <ui:define name="footer">
94                         <ui:include id="footer" class="guest_footer" src="/WEB-INF/templates/admin/admin_footer.tpl" />
95                 </ui:define>
96         </ui:composition>
97 </html>