1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
---|
2 | <%@ page import="com.ether.WebException" %> |
---|
3 | <%@ page import="com.ether.user.UserRole" %> |
---|
4 | <%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %> |
---|
5 | <%@ taglib prefix="tiles" uri="/WEB-INF/tlds/struts-tiles.tld" %> |
---|
6 | <%@ taglib prefix="ether" tagdir="/WEB-INF/tags" %> |
---|
7 | <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> |
---|
8 | |
---|
9 | <tiles:insert page="/resources/templates/templateBackoffice.jsp" flush="true"> |
---|
10 | |
---|
11 | <tiles:put name="insertCss" type="string"> |
---|
12 | <ether:htmlCss cssFile="select"/> |
---|
13 | </tiles:put> |
---|
14 | |
---|
15 | <tiles:put name="insertJsOrJsp" type="string"> |
---|
16 | <ether:htmlJs jsFile="classesForJQuery/etherClasses"/> |
---|
17 | <ether:htmlJsp jspFile="user-script"/> |
---|
18 | <ether:htmlJs jsFile="classesForJQuery/Loading"/> |
---|
19 | <ether:htmlJs jsFile="classesForJQuery/Select"/> |
---|
20 | <ether:htmlJs jsFile="calendar/anytime"/> |
---|
21 | </tiles:put> |
---|
22 | |
---|
23 | |
---|
24 | <tiles:put name="title" type="string"><spring:message code="app.title"/> - <spring:message code="bo.user"/></tiles:put> |
---|
25 | |
---|
26 | |
---|
27 | <%-- ****************** CONTENT ****************** --%> |
---|
28 | <tiles:put name="bodytitle" type="string"><spring:message code="bo.user"/></tiles:put> |
---|
29 | |
---|
30 | <tiles:put name="body" type="string"> |
---|
31 | |
---|
32 | <div class="title2"><spring:message code="bo.user.list"/> :</div> |
---|
33 | <BR/> |
---|
34 | <%-- ****************** SORTS ****************** --%> |
---|
35 | <div class="containerSortsAndSearch"> |
---|
36 | <div class="containerSorts"> |
---|
37 | <div style="float:left"><spring:message code="bo.sort.asc"/> : </div> |
---|
38 | <div id="containerSorts" style="float:left"></div> |
---|
39 | </div> |
---|
40 | |
---|
41 | <div class="containerSorts"> |
---|
42 | <div style="float:left"><spring:message code="bo.user.role"/> : </div> |
---|
43 | <div id="containerSorts_roles" style="float:left"></div> |
---|
44 | </div> |
---|
45 | |
---|
46 | <div class="containerSorts"> |
---|
47 | <div style="float:left"><spring:message code="bo.user.boAccess.help"/> : </div> |
---|
48 | <div style="float:left"> |
---|
49 | <input id="sort_accessBO_true" type="checkbox" checked="checked"><spring:message code="app.yes"/> |
---|
50 | <input id="sort_accessBO_false" type="checkbox" checked="checked"><spring:message code="app.no"/> |
---|
51 | </div> |
---|
52 | </div> |
---|
53 | |
---|
54 | <div class="containerSortsButton"> |
---|
55 | <button id="sortButton" class="small positive"><spring:message code="bo.go"/></button> |
---|
56 | </div> |
---|
57 | |
---|
58 | <div class="containerSorts"> |
---|
59 | <div style="float:left"><spring:message code="bo.sortBy"/> : </div> |
---|
60 | <div id="containerSearch" style="float:left"><input type="text" id="search_text" size="29"></div> |
---|
61 | </div> |
---|
62 | |
---|
63 | <div class="containerSorts"> |
---|
64 | <div style="float:left"><spring:message code="bo.viewBy"/> : </div> |
---|
65 | <div id="containerSorts_display" style="float:left"></div> |
---|
66 | </div> |
---|
67 | |
---|
68 | </div> |
---|
69 | <BR/><BR/> |
---|
70 | |
---|
71 | |
---|
72 | <%-- ****************** USERS ****************** --%> |
---|
73 | <div id="generalContainerUsers"> |
---|
74 | <table class="roundTable" border="1"> |
---|
75 | <tr> |
---|
76 | <th><spring:message code="bo.id"/></th> |
---|
77 | <th><spring:message code="bo.user.lastName"/></th> |
---|
78 | <th><spring:message code="bo.user.firstName"/></th> |
---|
79 | <th><spring:message code="bo.user.email"/></th> |
---|
80 | <th><spring:message code="bo.user.role"/></th> |
---|
81 | <th><spring:message code="bo.user.creationDate"/></th> |
---|
82 | <th title="<spring:message code="bo.user.boAccess.help"/>"><spring:message code="bo.user.boAccess"/></th> |
---|
83 | <th colspan="2"><spring:message code="bo.actions"/></th> |
---|
84 | </tr> |
---|
85 | <tbody id="containerUsers"></tbody> |
---|
86 | </table> |
---|
87 | <BR/> |
---|
88 | </div> |
---|
89 | |
---|
90 | <div style="float:left"><spring:message code="bo.total.number"/> : |
---|
91 | <div id="nbResults" style="float:right"></div> |
---|
92 | </div> |
---|
93 | |
---|
94 | <%-- ****************** PAGINATION ****************** --%> |
---|
95 | <div style="float:right"> |
---|
96 | <button id="next" class="small"><spring:message code="bo.next"/></button> |
---|
97 | </div> |
---|
98 | <div style="float:right"><span id="page">1</span>/<span id="maxPages">0</span> </div> |
---|
99 | <div style="float:right"> |
---|
100 | <button id="previous" class="small"><spring:message code="bo.previous"/></button> |
---|
101 | </div> |
---|
102 | |
---|
103 | |
---|
104 | <BR/> |
---|
105 | <HR width="50%"> |
---|
106 | |
---|
107 | <%-- ****************** ADD OR MODIFY AN USER ****************** --%> |
---|
108 | <div id="addOrModifyTitle" class="title2"></div> |
---|
109 | |
---|
110 | <table class="roundTable" border="1" id="addOrModifyForm"> |
---|
111 | <tr> |
---|
112 | <td><spring:message code="bo.user.lastName"/></td> |
---|
113 | <td width="1px"><input id="lastName" size="40"></td> |
---|
114 | |
---|
115 | <td><spring:message code="bo.user.role"/></td> |
---|
116 | <td> |
---|
117 | <div id="containerRoles"></div> |
---|
118 | </td> |
---|
119 | </tr> |
---|
120 | |
---|
121 | <tr> |
---|
122 | <td><spring:message code="bo.user.firstName"/></td> |
---|
123 | <td><input id="firstName" size="40"></td> |
---|
124 | |
---|
125 | <td><spring:message code="bo.user.boAccess.help"/></td> |
---|
126 | <td><input id="boAccess" type="checkbox"></td> |
---|
127 | </tr> |
---|
128 | |
---|
129 | <tr> |
---|
130 | <td><spring:message code="bo.user.email"/></td> |
---|
131 | <td><input id="email" size="40"></td> |
---|
132 | |
---|
133 | <td></td> |
---|
134 | <td></td> |
---|
135 | </tr> |
---|
136 | |
---|
137 | <tr> |
---|
138 | <td><spring:message code="bo.user.password"/></td> |
---|
139 | <td><input id="password" size="40"></td> |
---|
140 | |
---|
141 | <td></td> |
---|
142 | <td></td> |
---|
143 | </tr> |
---|
144 | <tr> |
---|
145 | <td><spring:message code="bo.user.password.same"/></td> |
---|
146 | <td><input id="keepSamePassword" type="checkbox"><spring:message code="bo.user.password.same.help"/></td> |
---|
147 | |
---|
148 | <td><spring:message code="bo.actions"/></td> |
---|
149 | <td> |
---|
150 | <button id="add_or_modify_user" class="small positive"></button> |
---|
151 | <button id="init" class="small positive"><spring:message code="bo.init"/></button> |
---|
152 | </td> |
---|
153 | </tr> |
---|
154 | |
---|
155 | </table> |
---|
156 | |
---|
157 | <BR/> |
---|
158 | |
---|
159 | <div id="errors"></div> |
---|
160 | |
---|
161 | <script type="text/javascript"> |
---|
162 | var interfaceTexts = $A( "" ); |
---|
163 | interfaceTexts["bo.noUser"] = '<spring:message code="bo.noUser"/>'; |
---|
164 | interfaceTexts["bo.add"] = '<spring:message code="bo.add"/>'; |
---|
165 | interfaceTexts["bo.modify"] = '<spring:message code="bo.modify"/>'; |
---|
166 | interfaceTexts["bo.remove"] = '<spring:message code="bo.remove"/>'; |
---|
167 | interfaceTexts["bo.accept"] = '<spring:message code="bo.accept"/>'; |
---|
168 | interfaceTexts["bo.refuse"] = '<spring:message code="bo.refuse"/>'; |
---|
169 | interfaceTexts["bo.user.remove.confirm"] = '<spring:message code="bo.user.remove.confirm"/>'; |
---|
170 | interfaceTexts["bo.id"] = '<spring:message code="bo.id"/>'; |
---|
171 | interfaceTexts["bo.user.add"] = '<spring:message code="bo.user.add"/>'; |
---|
172 | interfaceTexts["bo.user.modify"] = '<spring:message code="bo.user.modify"/>'; |
---|
173 | interfaceTexts["bo.user.lastName"] = '<spring:message code="bo.user.lastName"/>'; |
---|
174 | interfaceTexts["bo.user.email"] = '<spring:message code="bo.user.email"/>'; |
---|
175 | interfaceTexts["bo.user.creationDate"] = '<spring:message code="bo.user.creationDate"/>'; |
---|
176 | interfaceTexts["bo.all"] = '<spring:message code="bo.all"/>'; |
---|
177 | |
---|
178 | interfaceTexts["bo.field.lastName"] = '<spring:message code="bo.field.lastName"/>'; |
---|
179 | interfaceTexts["bo.field.email"] = '<spring:message code="bo.field.email"/>'; |
---|
180 | interfaceTexts["bo.field.password"] = '<spring:message code="bo.field.password"/>'; |
---|
181 | |
---|
182 | interfaceTexts["<%=UserRole.ADMINISTRATOR%>"] = '<spring:message code="bo.user.administrator"/>'; |
---|
183 | interfaceTexts["<%=UserRole.USER%>"] = '<spring:message code="bo.user.user"/>'; |
---|
184 | |
---|
185 | interfaceTexts["<%=WebException.WebCode.USER_ALREADY_EXISTS%>"] = '<spring:message code="login.dataProtocol.alreadyExist"/>'; |
---|
186 | interfaceTexts["<%=WebException.WebCode.ERROR_EMAIL_CANNOT_BE_SEND%>"] = '<spring:message code="bo.user.emailNotSend"/>'; |
---|
187 | |
---|
188 | var interfaceBOUser = new interfaceBOUser( ${usersNumber}, ${jSonUsers}, ${jSonUserRoles} ); |
---|
189 | </script> |
---|
190 | |
---|
191 | </tiles:put> |
---|
192 | |
---|
193 | </tiles:insert> |
---|