]> git.mxchange.org Git - pizzaservice-war.git/blob - web/admin/product.jsp
Refacturing towards JSF:
[pizzaservice-war.git] / web / admin / product.jsp
1 <%-- 
2         Document   : product
3         Created on : 04.08.2015, 10:55:10
4         Author     : Roland Haeder
5 --%>
6
7 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
8 <%--<%@page errorPage="errorHandler.jsp" %>--%>
9 <%@page contentType="text/html" pageEncoding="UTF-8"%>
10 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaBean"%>
11 <%@page import="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean"%>
12 <jsp:useBean id="controller" scope="session" class="org.mxchange.pizzaapplication.beans.controller.PizzaServiceBean" type="PizzaBean" />
13
14 <jsp:setProperty name="controller" property="application" value="${pageContext.servletContext}" />
15 <jsp:setProperty name="controller" property="session" value="${pageContext.session}" />
16
17 <%
18         // TODO: Can be removed later
19         controller.init();
20 %>
21
22 <c:set var="basePath" value="${pageContext.request.contextPath}" />
23
24 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
25 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
26         <head>
27                 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
28                 <link rel="stylesheet" href="${basePath}/style.css" type="text/css" />
29                 <title>Pizza-Service - Produkte</title>
30         </head>
31
32         <body>
33                 <div id="header"> 
34                         <div id="title">
35                                 <h1>Pizza-Service - Produkte</h1>
36                         </div>
37                 </div>
38
39                 <jsp:include page="/static/admin/admin_menu.jsp" flush="false" />
40
41                 <div id="content_outer">
42                         <div id="content_title">
43                                 <h2>Diese Produkte wurden eingestellt:</h2>
44                         </div>
45
46                         <div id="content">
47                                 <div class="para">
48                                         <form action="${basePath}/form_handler/admin/do_product.jsp" accept-charset="utf-8" id="form" method="post">
49                                         <table class="table">
50                                                 <thead>
51                                                         <tr>
52                                                                 <th class="table_header_column">
53                                                                         Produktnummer:
54                                                                 </th>
55                                                                 <th class="table_header_column">
56                                                                         Produktbezeichnung:
57                                                                 </th>
58                                                                 <th class="table_header_column">
59                                                                         Einzelpreis:
60                                                                 </th>
61                                                                 <th class="table_header_column">
62                                                                         Kategorie:
63                                                                 </th>
64                                                                 <th class="table_header_column">
65                                                                         Verfügbar:
66                                                                 </th>
67                                                         </tr>
68                                                 </thead>
69
70                                                 <tbody>
71                                                         <c:forEach var="product" items="${controller.allProductsIterator}">
72                                                         <tr>
73                                                                 <td>
74                                                                         ${product.itemId}:
75                                                                         <input class="input" type="checkbox" name="itemId[${product.itemId}]" value="1" />
76                                                                 </td>
77                                                                 <td>
78                                                                         ${product.title}
79                                                                 </td>
80                                                                 <td>
81                                                                         ${product.price}
82                                                                 </td>
83                                                                 <td>
84                                                                         ${controller.getPrintableProduktCategory(product)}
85                                                                 </td>
86                                                                 <td>
87                                                                         ${controller.getPrintableProduktAvailability(product)}
88                                                                 </td>
89                                                         </tr>
90                                                         </c:forEach>
91                                                         <tr>
92                                                                 <td colspan="5" class="table_footer">
93                                                                         <input class="reset" type="reset" value="Formular zurücksetzen" />
94                                                                         <input class="submit" type="submit" name="edit" value="Ändern" />
95                                                                         <input class="delete" type="submit" name="delete" value="Löschen" />
96                                                                 </td>
97                                                         </tr>
98                                                 </tbody>
99                                         </table>
100                                         </form>
101                                 </div>
102
103                                 <div class="para">
104                                         <form action="${basePath}/form_handler/admin/do_product.jsp" accept-charset="utf-8" id="add" method="post">
105                                         <div class="table">
106                                                 <div class="table_header">
107                                                         Neues Produkt hinzufügen:
108                                                 </div>
109
110                                                 <fieldset id="product_data">
111                                                         <legend>Bitte alle Felder ausfüllen:</legend>
112
113                                                         <div class="table_row">
114                                                                 <div class="table_left">
115                                                                         Produktbezeichnung:
116                                                                         <div class="tiny">(z.B. <em>Pizza Italia</em>)</div>
117                                                                 </div>
118
119                                                                 <div class="table_right">
120                                                                         <input class="input" type="text" name="title" size="10" maxlength="255" />
121                                                                 </div>
122
123                                                                 <div class="clear"></div>
124                                                         </div>
125
126                                                         <div class="table_row">
127                                                                 <div class="table_left">
128                                                                         Einzelpreis:
129                                                                         <div class="tiny">(z.B. <em>50.0</em>)</div>
130                                                                 </div>
131
132                                                                 <div class="table_right">
133                                                                         <input class="input" type="text" name="price" size="10" maxlength="255" />
134                                                                 </div>
135
136                                                                 <div class="clear"></div>
137                                                         </div>
138
139                                                         <div class="table_row">
140                                                                 <div class="table_left">
141                                                                         Kategorie:
142                                                                 </div>
143
144                                                                 <div class="table_right">
145                                                                         <jsp:include flush="false" page="/static/admin/admin_category_selection_box.jsp" />
146                                                                 </div>
147
148                                                                 <div class="clear"></div>
149                                                         </div>
150
151                                                         <div class="table_row">
152                                                                 <div class="table_left">
153                                                                         Verfügbar:
154                                                                 </div>
155
156                                                                 <div class="table_right">
157                                                                         <select class="select" name="available" size="1">
158                                                                                 <option value="true">Ja</option>
159                                                                                 <option value="false">Nein</option>
160                                                                         </select>
161                                                                 </div>
162
163                                                                 <div class="clear"></div>
164                                                         </div>
165                                                 </fieldset>
166
167                                                 <div class="table_footer">
168                                                         <input class="reset" type="reset" value="Formular zurücksetzen" />
169                                                         <input class="submit" type="submit" name="add" value="Hinzufügen" />
170                                                 </div>
171                                         </div>
172                                         </form>
173                                 </div>
174
175                                 <div class="para">
176                                         Hinweise zum Hinzufügen von Produkten:
177                                         <ul>
178                                                 <li>Beim Preis keine Währungszeichen (wie &euro; usw.) eingeben.</li>
179                                                 <li>Kommastellen mit Punkt, nicht mit Komma abtrennen.</li>
180                                                 <li>Keine Tausendertrenner verwenden, auch keine Leerschritte.</li>
181                                         </ul>
182                                 </div>
183                         </div>
184                 </div>
185
186                 <jsp:include page="/static/admin/admin_footer.jsp" flush="false" />
187         </body>
188 </html>