Rev 214 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
206 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
3 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
9 | <jsp:useBean id="CourseUnitView" type="pt.estgp.estgweb.domain.views.CourseUnitView" scope="request"/> |
||
10 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
11 | |||
12 | <html:form styleClass="form" action="/user/courseUnitControllerAdminFromServiceZone" enctype="multipart/form-data"> |
||
13 | <input type="hidden" name="dispatch" value="createOrUpdateAdmin"/> |
||
14 | <html:hidden property="courseUnitView.id"/> |
||
15 | <html:hidden property="id"/> |
||
16 | <table> |
||
17 | <tr> |
||
18 | <th> |
||
19 | <bean:message key="courseunit.name"/> |
||
20 | </th> |
||
21 | <td> |
||
22 | <html:text styleClass="text" property="courseUnitView.name"/> |
||
23 | </td> |
||
24 | </tr> |
||
25 | <tr> |
||
26 | <th> |
||
27 | <bean:message key="courseunit.code"/> |
||
28 | </th> |
||
29 | <td> |
||
30 | <html:text styleClass="text" property="courseUnitView.code"/> |
||
31 | </td> |
||
32 | </tr> |
||
33 | <tr> |
||
34 | <th> |
||
35 | <bean:message key="courseunit.semestre"/> |
||
36 | </th> |
||
37 | <td> |
||
38 | <html:select property="courseUnitView.semestre"> |
||
39 | <html:option value="S1">S1</html:option> |
||
40 | <html:option value="S2">S2</html:option> |
||
41 | </html:select> |
||
42 | </td> |
||
43 | </tr> |
||
44 | <tr> |
||
45 | <th> |
||
46 | <bean:message key="courseunit.importYear"/> |
||
47 | </th> |
||
48 | <td> |
||
49 | <html:select property="courseUnitView.importYear"> |
||
50 | <logic:iterate id="item" name="CourseUnitsForm" property="importYears"> |
||
51 | <html:option value="${item}">${item}</html:option> |
||
52 | </logic:iterate> |
||
53 | </html:select> |
||
54 | </td> |
||
55 | </tr> |
||
56 | <tr> |
||
57 | <th> |
||
58 | <bean:message key="courseunit.teachers"/> |
||
59 | </th> |
||
60 | <td> |
||
61 | <html:select property="teacherId"> |
||
62 | <logic:present name="CourseUnitsForm" property="teachers"> |
||
63 | <logic:iterate id="teacher" name="CourseUnitsForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
64 | <jomm:option itemName="teacher" itemProperty="id" comparableObjectName="CourseUnitsForm" |
||
65 | comparableObjectProperty="teacherId"> |
||
66 | (${teacher.code}) ${teacher.name} |
||
67 | </jomm:option> |
||
68 | </logic:iterate> |
||
69 | <input type="button" value="<bean:message key="add"/>" |
||
70 | onclick="set(this.form,'addTeacher');this.form.submit();"> |
||
71 | </logic:present> |
||
72 | </html:select> |
||
73 | <logic:greaterThan name="CourseUnitView" property="teachersSize" value="0"> |
||
74 | <table class="dataTable removeButton"> |
||
75 | <logic:iterate id="userView" name="CourseUnitView" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
76 | <tr> |
||
77 | <th> |
||
78 | ${userView.code} |
||
79 | </th> |
||
80 | <th> |
||
81 | ${userView.name} |
||
82 | </th> |
||
83 | <td><input type="button" class="removeButton" |
||
84 | onclick="CourseUnitsForm.id.value='${userView.id}';set(this.form,'removeTeacher');this.form.submit();"> |
||
85 | </td> |
||
86 | </tr> |
||
87 | </logic:iterate> |
||
88 | </table> |
||
89 | </logic:greaterThan> |
||
90 | </td> |
||
91 | </tr> |
||
92 | <tr> |
||
93 | <th> |
||
94 | <bean:message key="courseunit.students"/> |
||
95 | </th> |
||
96 | <td> |
||
97 | <html:text styleClass="text" property="studentCode"/> |
||
98 | <input type="button" value="<bean:message key="add"/>" |
||
99 | onclick="set(this.form,'addStudent');this.form.submit();"> |
||
100 | <logic:greaterThan name="CourseUnitView" property="studentsSize" value="0"> |
||
101 | <table class="dataTable removeButton"> |
||
102 | <logic:iterate id="userView" name="CourseUnitView" property="students" type="pt.estgp.estgweb.domain.views.UserView"> |
||
103 | <tr> |
||
104 | <th> |
||
105 | ${userView.code} |
||
106 | </th> |
||
107 | <th> |
||
108 | ${userView.username} |
||
109 | </th> |
||
110 | <th> |
||
111 | ${userView.name} |
||
112 | </th> |
||
113 | <th> |
||
114 | ${userView.email} |
||
115 | </th> |
||
116 | <th> |
||
117 | ${userView.address} |
||
118 | </th> |
||
119 | <td><input type="button" class="removeButton" |
||
120 | onclick="CourseUnitsForm.id.value='${userView.code}';set(this.form,'removeStudent');this.form.submit();"> |
||
121 | </td> |
||
122 | </tr> |
||
123 | </logic:iterate> |
||
124 | </table> |
||
125 | </logic:greaterThan> |
||
126 | </td> |
||
127 | </tr> |
||
128 | |||
129 | </table> |
||
130 | <input type="button" onclick="set(form,'createOrUpdateAdmin');form.submit()" value="<bean:message key="confirm"/>"> |
||
131 | </html:form> |