Rev 1505 | Rev 1507 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1505 | Rev 1506 | ||
---|---|---|---|
Line 1... | Line -... | ||
1 | <%@ page import="java.util.List" %> |
- | |
2 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
- | |
3 | <%@ page import="pt.estgp.estgweb.Globals" %> |
- | |
4 | <%@ page import="java.util.ArrayList" %> |
- | |
5 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
- | |
6 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
7 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
- | |
8 | <%@ page import="pt.estgp.estgweb.domain.CourseDepartment" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseDepartment" %> |
- | 3 | <%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
|
- | 4 | <%@ page import="pt.estgp.estgweb.domain.User" %> |
|
- | 5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
|
- | 6 | <%@ page import="pt.estgp.estgweb.domain.views.UserView" %> |
|
- | 7 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
|
- | 8 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
|
- | 9 | <%@ page import="java.util.ArrayList" %> |
|
- | 10 | <%@ page import="java.util.Collection" %> |
|
- | 11 | <%@ page import="java.util.List" %> |
|
9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
10 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
13 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
11 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
15 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
13 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
16 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
Line 27... | Line 30... | ||
27 | } |
30 | } |
28 | 31 | ||
29 | </script> |
32 | </script> |
30 | <html:errors/> |
33 | <html:errors/> |
31 | <jomm:messages/> |
34 | <jomm:messages/> |
32 | <html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data"> |
35 | <html:form styleClass="form-horizontal" action="/user/courseControllerFromServiceZone" enctype="multipart/form-data"> |
33 | <input type="hidden" name="dispatch" value="submit"/> |
36 | <input type="hidden" name="dispatch" value="submit"/> |
34 | <html:hidden property="courseView.id"/> |
37 | <html:hidden property="courseView.id"/> |
- | 38 | <jsp:useBean id="CourseForm" type="pt.estgp.estgweb.web.form.courses.CourseForm" scope="request"/> |
|
35 | <logic:present name="CourseView" property="htmlResult"> |
39 | <logic:present name="CourseView" property="htmlResult"> |
36 | <pre class="log"> |
40 | <pre class="log"> |
37 | <bean:write name="CourseView" property="htmlResult"/> |
41 | <bean:write name="CourseView" property="htmlResult"/> |
38 | </pre> |
42 | </pre> |
39 | </logic:present> |
43 | </logic:present> |
40 | 44 | ||
41 | <table class="form"> |
45 | <div class="panel panel-default"> |
42 | <tr> |
- | |
43 | <th> |
- | |
44 | <bean:message key="course.code"/> |
46 | <div class="panel-body"> |
45 | </th> |
- | |
46 | <td> |
- | |
47 | <html:text property="courseView.code"/> |
- | |
48 | </td> |
- | |
49 | </tr> |
- | |
50 | <tr> |
- | |
51 | <th> |
- | |
52 | <bean:message key="course.area"/> |
- | |
53 | </th> |
- | |
54 | 47 | ||
- | 48 | <div class="form-group"> |
|
- | 49 | <label class="control-label col-sm-2"><bean:message key="course.code"/></label> |
|
- | 50 | <div class="col-sm-10"> |
|
- | 51 | <html:text styleClass="form-control" property="courseView.code" size="20"/> |
|
55 | <td> |
52 | </div> |
- | 53 | </div> |
|
- | 54 | <div class="form-group"> |
|
- | 55 | <label class="control-label col-sm-2"><bean:message key="course.area"/></label> |
|
- | 56 | <div class="col-sm-10"> |
|
56 | <% |
57 | <% |
57 | AbstractDao.getCurrentSession().beginTransaction(); |
58 | AbstractDao.getCurrentSession().beginTransaction(); |
58 | List<CourseDepartment> departments = DaoFactory.getCourseDepartmentDaoImpl().findActives(); |
59 | List<CourseDepartment> departments = DaoFactory.getCourseDepartmentDaoImpl().findActives(); |
59 | request.setAttribute("departaments",departments); |
60 | request.setAttribute("departaments",departments); |
60 | %> |
61 | %> |
61 | <html:select property="courseView.area"> |
62 | <html:select styleClass="form-control" property="courseView.area"> |
62 | <html:option value="">Nenhum</html:option> |
63 | <html:option value="">Nenhum</html:option> |
63 | <logic:iterate id="area" name="departaments" type="pt.estgp.estgweb.domain.CourseDepartmentImpl"> |
64 | <logic:iterate id="area" name="departaments" type="pt.estgp.estgweb.domain.CourseDepartmentImpl"> |
64 | - | ||
65 | <html:option value="${area.sigla}">${area.schoolFromInstitutionalCode} - ${area.name}</html:option> |
65 | <html:option value="${area.sigla}">${area.schoolFromInstitutionalCode} - ${area.name}</html:option> |
66 | </logic:iterate> |
66 | </logic:iterate> |
67 | </html:select> |
67 | </html:select> |
68 | <% |
68 | <% |
69 | AbstractDao.getCurrentSession().getTransaction().commit(); |
69 | AbstractDao.getCurrentSession().getTransaction().commit(); |
70 | %> |
70 | %> |
71 | </td> |
71 | </div> |
72 | </tr> |
72 | </div> |
- | 73 | <div class="form-group"> |
|
- | 74 | <label class="control-label col-sm-2"><bean:message key="name"/> PT</label> |
|
- | 75 | <div class="col-sm-10"> |
|
- | 76 | <html:text styleClass="form-control" property="courseView.name" size="20"/> |
|
73 | <tr> |
77 | </div> |
74 | <th> |
78 | </div> |
- | 79 | <div class="form-group"> |
|
- | 80 | <label class="control-label col-sm-2"><bean:message key="name"/> EN</label> |
|
75 | <bean:message key="name"/> |
81 | <div class="col-sm-10"> |
- | 82 | <html:text styleClass="form-control" property="courseView.nameEn" size="20"/> |
|
76 | </th> |
83 | </div> |
77 | <td> |
84 | </div> |
- | 85 | <div class="form-group"> |
|
- | 86 | <label class="control-label col-sm-2"><bean:message key="name"/> ES</label> |
|
- | 87 | <div class="col-sm-10"> |
|
78 | <html:text property="courseView.name"/> |
88 | <html:text styleClass="form-control" property="courseView.nameEs" size="20"/> |
79 | </td> |
89 | </div> |
80 | </tr> |
90 | </div> |
- | 91 | <div class="form-group"> |
|
- | 92 | <label class="control-label col-sm-2"><bean:message key="name"/> FR</label> |
|
- | 93 | <div class="col-sm-10"> |
|
- | 94 | <html:text styleClass="form-control" property="courseView.nameFr" size="20"/> |
|
81 | <tr> |
95 | </div> |
82 | <th> |
96 | </div> |
- | 97 | <div class="form-group"> |
|
- | 98 | <label class="control-label col-sm-2"><bean:message key="course.description"/></label> |
|
83 | <bean:message key="status"/> |
99 | <div class="col-sm-10"> |
- | 100 | <html:textarea styleClass="form-control" property="courseView.description"/> |
|
84 | </th> |
101 | </div> |
85 | <td> |
102 | </div> |
- | 103 | <div class="form-group"> |
|
- | 104 | <label class="control-label col-sm-2"><bean:message key="status"/></label> |
|
- | 105 | <div class="col-sm-10"> |
|
86 | <html:select property="courseView.status"> |
106 | <html:select styleClass="form-control" property="courseView.status"> |
87 | <html:option value="true"><bean:message key="yes"/></html:option> |
107 | <html:option value="true"><bean:message key="yes"/></html:option> |
88 | <html:option value="false"><bean:message key="no"/></html:option> |
108 | <html:option value="false"><bean:message key="no"/></html:option> |
89 | </html:select> |
109 | </html:select> |
90 | </td> |
110 | </div> |
91 | </tr> |
111 | </div> |
92 | <tr> |
- | |
93 | <th> |
112 | <div class="form-group"> |
94 | <bean:message key="course.degree"/> |
113 | <label class="control-label col-sm-2"><bean:message key="course.degree"/> FR</label> |
95 | </th> |
114 | <div class="col-sm-10"> |
96 | <td> |
- | |
97 | <html:select property="courseView.degree"> |
115 | <html:select styleClass="form-control" property="courseView.degree"> |
98 | <html:option value="B"><bean:message key="course.B"/></html:option> |
116 | <html:option value="B"><bean:message key="course.B"/></html:option> |
99 | <html:option value="L"><bean:message key="course.L"/></html:option> |
117 | <html:option value="L"><bean:message key="course.L"/></html:option> |
100 | <html:option value="M"><bean:message key="course.M"/></html:option> |
118 | <html:option value="M"><bean:message key="course.M"/></html:option> |
101 | <html:option value="P"><bean:message key="course.P"/></html:option> |
119 | <html:option value="P"><bean:message key="course.P"/></html:option> |
102 | <html:option value="E"><bean:message key="course.E"/></html:option> |
120 | <html:option value="E"><bean:message key="course.E"/></html:option> |
Line 104... | Line 122... | ||
104 | <html:option value="C"><bean:message key="course.C"/></html:option> |
122 | <html:option value="C"><bean:message key="course.C"/></html:option> |
105 | <html:option value="O"><bean:message key="course.O"/></html:option> |
123 | <html:option value="O"><bean:message key="course.O"/></html:option> |
106 | <html:option value="T"><bean:message key="course.T"/></html:option> |
124 | <html:option value="T"><bean:message key="course.T"/></html:option> |
107 | </html:select> |
125 | </html:select> |
108 | ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento |
126 | ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento |
109 | </td> |
127 | </div> |
110 | </tr> |
128 | </div> |
111 | <logic:notEmpty name="CourseForm" property="courseView.courseYearViews"> |
129 | <logic:notEmpty name="CourseForm" property="courseView.courseYearViews"> |
112 | <tr> |
- | |
113 | <th> |
130 | <div class="form-group"> |
114 | Politica de Separação de Turmas |
131 | <label class="control-label col-sm-2">Politica de Separação de Turmas</label> |
115 | </th> |
- | |
116 | <td colspan="2"> |
132 | <div class="col-sm-10"> |
117 | - | ||
118 | <table class="tablesorterfiltered"> |
133 | <table class="tablesorterfiltered"> |
119 | <thead> |
134 | <thead> |
120 | <tr> |
135 | <tr> |
121 | <th>Ano Lectivo</th> |
136 | <th>Ano Lectivo</th> |
122 | <th>Usar Turmas Separadas</th> |
137 | <th>Usar Turmas Separadas</th> |
123 | <th>Ultima alteração</th> |
138 | <th>Ultima alteração</th> |
124 | </tr> |
139 | </tr> |
125 | </thead> |
140 | </thead> |
126 | <tbody> |
141 | <tbody> |
127 | <nested:iterate id="cyv" property="courseView.courseYearViews" type="pt.estgp.estgweb.domain.views.CourseView.CourseYearView"> |
142 | <nested:iterate id="cyv" property="courseView.courseYearViews" type="pt.estgp.estgweb.domain.views.CourseView.CourseYearView"> |
128 | <tr> |
143 | <tr> |
129 | <td>${cyv.importYear}</td> |
144 | <td>${cyv.importYear}</td> |
130 | <td><nested:hidden property="id"/> |
145 | <td><nested:hidden property="id"/> |
131 | <nested:checkbox property="separatedTurmas"/></td> |
146 | <nested:checkbox property="separatedTurmas"/></td> |
132 | <td>${cyv.updateDate}</td> |
147 | <td>${cyv.updateDate}</td> |
133 | </tr> |
148 | </tr> |
134 | </nested:iterate> |
149 | </nested:iterate> |
135 | </tbody> |
150 | </tbody> |
136 | </table> |
151 | </table> |
137 | - | ||
138 | - | ||
139 | </td> |
152 | </div> |
140 | </tr> |
153 | </div> |
141 | </logic:notEmpty> |
154 | </logic:notEmpty> |
142 | <tr> |
- | |
143 | <th> |
155 | <div class="form-group"> |
144 | <bean:message key="course.importYear"/> |
156 | <label class="control-label col-sm-2"><bean:message key="course.importYear"/></label> |
145 | </th> |
157 | <div class="col-sm-10"> |
146 | <td> |
- | |
147 | <html:select property="courseView.importYear"> |
158 | <html:select styleClass="form-control" property="courseView.importYear"> |
148 | <logic:iterate id="item" name="CourseForm" property="importYears"> |
159 | <logic:iterate id="item" name="CourseForm" property="importYears"> |
149 | <html:option value="${item}">${item}</html:option> |
160 | <html:option value="${item}">${item}</html:option> |
150 | </logic:iterate> |
161 | </logic:iterate> |
151 | </html:select> |
162 | </html:select> |
152 | </td> |
163 | </div> |
153 | </tr> |
164 | </div> |
154 | <tr> |
165 | |
155 | <th> |
166 | <div class="form-group"> |
156 | <bean:message key="course.institutionalCode"/> |
167 | <label class="control-label col-sm-2"><bean:message key="course.institutionalCode"/></label> |
157 | </th> |
168 | <div class="col-sm-10"> |
158 | <td> |
- | |
159 | <!--Dependente do app.properties--> |
169 | <!--Dependente do app.properties--> |
160 | <html:select property="courseView.institutionalCode"> |
170 | <html:select styleClass="form-control" property="courseView.institutionalCode"> |
161 | <html:option value="1"><%=ConfigProperties.getProperty("institution.code.prefix.1")%></html:option> |
171 | <html:option value="1"><%=ConfigProperties.getProperty("institution.code.prefix.1")%></html:option> |
162 | <html:option value="2"><%=ConfigProperties.getProperty("institution.code.prefix.2")%></html:option> |
172 | <html:option value="2"><%=ConfigProperties.getProperty("institution.code.prefix.2")%></html:option> |
163 | <html:option value="3"><%=ConfigProperties.getProperty("institution.code.prefix.3")%></html:option> |
173 | <html:option value="3"><%=ConfigProperties.getProperty("institution.code.prefix.3")%></html:option> |
164 | <html:option value="4"><%=ConfigProperties.getProperty("institution.code.prefix.4")%></html:option> |
174 | <html:option value="4"><%=ConfigProperties.getProperty("institution.code.prefix.4")%></html:option> |
165 | </html:select> |
175 | </html:select> |
- | 176 | </div> |
|
- | 177 | </div> |
|
166 | 178 | ||
- | 179 | <div class="form-group"> |
|
- | 180 | <label class="control-label col-sm-2"><bean:message key="course.userGroupStudents"/></label> |
|
- | 181 | <div class="col-sm-10"> |
|
- | 182 | <html:text styleClass="form-control" onchange="alertPermissions()" property="courseView.userGroupStudents"/> |
|
167 | </td> |
183 | </div> |
168 | </tr> |
184 | </div> |
169 | 185 | ||
170 | <tr> |
- | |
171 | <th> |
- | |
172 | <bean:message key="course.userGroupStudents"/> |
- | |
173 | </th> |
- | |
174 | <td> |
- | |
175 | <html:text onchange="alertPermissions()" property="courseView.userGroupStudents"/> |
- | |
176 | </td> |
- | |
177 | </tr> |
- | |
178 | 186 | ||
179 | <tr> |
- | |
180 | <th> |
- | |
181 | <bean:message key="course.description"/> |
187 | <div class="form-group"> |
182 | </th> |
- | |
183 | <td> |
- | |
184 | <html:textarea property="courseView.description"/> |
- | |
185 | </td> |
- | |
186 | </tr> |
- | |
187 | <tr> |
- | |
188 | <th> |
- | |
189 | <bean:message key="course.coordinator"/> |
188 | <label class="control-label col-sm-2"><bean:message key="course.coordinator"/></label> |
190 | </th> |
- | |
191 | <td> |
- | |
192 | <html:select onchange="alertPermissions()" property="courseView.coordinator.id"> |
- | |
193 | <html:option value="0"> |
- | |
194 | <bean:message key="none"/> |
- | |
195 | </html:option> |
189 | <div class="col-sm-10"> |
196 | <logic:present name="CourseForm" property="teachers"> |
- | |
197 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
- | |
198 | <html:option value="${teacher.id}"> |
- | |
199 | (${teacher.code}) ${teacher.name} |
- | |
200 | </html:option> |
- | |
201 | </logic:iterate> |
- | |
202 | </logic:present> |
- | |
203 | </html:select> |
- | |
204 | </td> |
- | |
205 | </tr> |
- | |
206 | <tr> |
- | |
207 | <th> |
- | |
208 | <bean:message key="course.director"/> |
- | |
209 | </th> |
- | |
210 | <td> |
- | |
211 | <html:select onchange="alertPermissions()" property="courseView.director.id"> |
190 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.coordinator.id"> |
212 | <html:option value="0"> |
191 | <html:option value="0"> |
213 | <bean:message key="none"/> |
192 | <bean:message key="none"/> |
214 | </html:option> |
193 | </html:option> |
215 | <logic:present name="CourseForm" property="teachers"> |
194 | <logic:present name="CourseForm" property="teachers"> |
216 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
195 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
Line 218... | Line 197... | ||
218 | (${teacher.code}) ${teacher.name} |
197 | (${teacher.code}) ${teacher.name} |
219 | </html:option> |
198 | </html:option> |
220 | </logic:iterate> |
199 | </logic:iterate> |
221 | </logic:present> |
200 | </logic:present> |
222 | </html:select> |
201 | </html:select> |
223 | </td> |
202 | </div> |
224 | </tr> |
203 | </div> |
225 | - | ||
226 | - | ||
227 | - | ||
228 | - | ||
229 | - | ||
230 | <tr> |
- | |
231 | <th> |
- | |
232 | <bean:message key="course.validation.role"/> |
- | |
233 | </th> |
- | |
234 | <% |
- | |
235 | 204 | ||
- | 205 | <div class="form-group"> |
|
- | 206 | <label class="control-label col-sm-2"><bean:message key="course.validation.role"/></label> |
|
- | 207 | <div class="col-sm-10"> |
|
- | 208 | <% |
|
236 | List<String> targetRoles = new ArrayList<String>(); |
209 | List<String> targetRoles = new ArrayList<String>(); |
237 | for(String role: UserRoleProxy.getUserRoles()) |
210 | for(String role: UserRoleProxy.getUserRoles()) |
238 | { |
211 | { |
239 | if(role.startsWith("courseValidateProgram")) |
212 | if(role.startsWith("courseValidateProgram")) |
240 | targetRoles.add(role); |
213 | targetRoles.add(role); |
241 | } |
214 | } |
242 | request.setAttribute("targetRoles",targetRoles); |
215 | request.setAttribute("targetRoles",targetRoles); |
243 | %> |
216 | %> |
244 | <td> |
- | |
245 | <html:select onchange="alertPermissions()" property="courseView.validationRole"> |
217 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.validationRole"> |
246 | <logic:iterate id="role" name="targetRoles"> |
218 | <logic:iterate id="role" name="targetRoles"> |
247 | <html:option value="${role}" key="user.role.${role}"/> |
219 | <html:option value="${role}" key="user.role.${role}"/> |
248 | </logic:iterate> |
220 | </logic:iterate> |
249 | </html:select> |
221 | </html:select> |
250 | </td> |
222 | </div> |
251 | </tr> |
223 | </div> |
252 | 224 | ||
- | 225 | <div class="form-group"> |
|
- | 226 | <label class="control-label col-sm-2">Membros da Comissão</label> |
|
- | 227 | <div class="col-sm-10"> |
|
- | 228 | ||
- | 229 | ||
- | 230 | ||
- | 231 | <% |
|
- | 232 | request.setAttribute("teachersForComissions", CourseForm.getTeachers()); |
|
- | 233 | request.setAttribute("courseIdForComissions", CourseView.getId()); |
|
- | 234 | %> |
|
- | 235 | ||
- | 236 | <%-- PAINEL INDEPENDENTE PARA GERIR COMISSAO DE CURSO --%> |
|
- | 237 | <% |
|
- | 238 | Long courseIdForComissions = (Long) request.getAttribute("courseIdForComissions"); |
|
- | 239 | Collection<UserView> teachersForComissions = (Collection<UserView>) request.getAttribute("teachersForComissions"); |
|
- | 240 | ||
- | 241 | %> |
|
- | 242 | <script> |
|
- | 243 | function removeCourseComissionTeacher(teacherId) |
|
- | 244 | { |
|
- | 245 | $.getJSON('<%=request.getContextPath()%>/user/courses/courseApiJson.jsp', |
|
- | 246 | { |
|
- | 247 | service:"removeCourseComissionTeacher", |
|
- | 248 | teacherId:teacherId, |
|
- | 249 | courseId: <%=courseIdForComissions%> |
|
- | 250 | }, |
|
- | 251 | function(data) |
|
- | 252 | { |
|
- | 253 | if(data.response == "done") |
|
- | 254 | { |
|
- | 255 | $("#courseComissionTeacher" + teacherId).remove(); |
|
- | 256 | } |
|
- | 257 | else |
|
- | 258 | { |
|
- | 259 | $("#courseComissionTeacher" + teacherId).css( |
|
- | 260 | { |
|
- | 261 | "background-color":"red" |
|
- | 262 | } |
|
- | 263 | ); |
|
- | 264 | alert("ERRO NO SERVIÇO: " + data.msg); |
|
- | 265 | } |
|
- | 266 | }); |
|
- | 267 | } |
|
- | 268 | function addCourseComissionTeacher(teacherId) |
|
- | 269 | { |
|
- | 270 | ||
- | 271 | $.getJSON('<%=request.getContextPath()%>/user/courses/courseApiJson.jsp', |
|
- | 272 | { |
|
- | 273 | service:"addCourseComissionTeacher", |
|
- | 274 | teacherId:teacherId, |
|
- | 275 | courseId: <%=CourseView.getId()%> |
|
- | 276 | }, |
|
- | 277 | function(data) |
|
- | 278 | { |
|
- | 279 | if(data.response == "done") |
|
- | 280 | { |
|
- | 281 | ||
- | 282 | newLine = $( |
|
- | 283 | "<tr id=\"courseComissionTeacher" + teacherId + "\" >" + |
|
- | 284 | "<td>" + data.teacherCode + "</td>" + |
|
- | 285 | "<td>" + data.teacherName + "</td>" + |
|
- | 286 | "<td>" + data.teacherEmail + "</td>" + |
|
- | 287 | "<td>" + |
|
- | 288 | "<a class=\"btn btn-warning\" target=\"_blank\" href=\"<%=request.getContextPath()%>/user/startProfileFromSearchUsers.do?id=" + teacherId + "\"><span class=\"glyphicon glyphicon-pencil\"></span></a>" + |
|
- | 289 | "<button type=\"button\" class=\"btn btn-danger\" onclick=\"removeCourseComissionTeacher(" + teacherId + ")\"><span class=\"glyphicon glyphicon-remove\"></span></button>"+ |
|
- | 290 | "</td>" + |
|
- | 291 | "</tr>"); |
|
- | 292 | $("#teacherContainer").append(newLine); |
|
- | 293 | evaluateTableSortersInside("#teachersTable"); |
|
- | 294 | ||
- | 295 | } |
|
- | 296 | else |
|
- | 297 | { |
|
- | 298 | $("#courseComissionTeacher" + teacherId).css( |
|
- | 299 | { |
|
- | 300 | "background-color":"red" |
|
- | 301 | } |
|
- | 302 | ); |
|
- | 303 | alert("ERRO NO SERVIÇO: " + data.msg); |
|
- | 304 | } |
|
- | 305 | }); |
|
- | 306 | } |
|
- | 307 | </script> |
|
- | 308 | <div class="form-group"> |
|
- | 309 | <label class="control-label col-sm-2">Escolher um Membro para a Comissão</label> |
|
- | 310 | <div class="col-sm-10"> |
|
- | 311 | <select id="teacherSelectedForComission" class="form-control"> |
|
- | 312 | <option> |
|
- | 313 | <bean:message key="none"/> |
|
- | 314 | </option> |
|
- | 315 | <logic:present name="teachersForComissions"> |
|
- | 316 | <logic:iterate id="teacher" name="teachersForComissions" type="pt.estgp.estgweb.domain.views.UserView"> |
|
- | 317 | <option value="${teacher.id}"> |
|
- | 318 | (${teacher.code}) ${teacher.name} |
|
- | 319 | </option> |
|
- | 320 | </logic:iterate> |
|
- | 321 | </logic:present> |
|
- | 322 | </select> |
|
- | 323 | <button type="button" class="btn btn-success" onclick="addCourseComissionTeacher($('#teacherSelectedForComission').val())"><span class="glyphicon glyphicon-plus"></span></button> |
|
- | 324 | </div> |
|
- | 325 | </div> |
|
253 | 326 | ||
254 | 327 | ||
- | 328 | <table id="teachersTable" class="tablesorterfiltered"> |
|
- | 329 | <thead> |
|
- | 330 | <tr> |
|
- | 331 | <th>Código</th> |
|
- | 332 | <th>Nome</th> |
|
- | 333 | <th>Contacto</th> |
|
- | 334 | <th>Editar</th> |
|
- | 335 | </tr> |
|
- | 336 | </thead> |
|
- | 337 | <tbody id="teacherContainer"> |
|
- | 338 | <% |
|
- | 339 | AbstractDao.getCurrentSession().beginTransaction(); |
|
- | 340 | for(User u:DaoFactory.getUserDaoImpl().loadRoleUsers(CourseView.getValidationRole())) |
|
- | 341 | { |
|
- | 342 | %> |
|
- | 343 | <tr id="courseComissionTeacher<%=u.getId()%>"> |
|
- | 344 | <td><%=((Teacher)u).getSigesCode()%></td> |
|
- | 345 | <td><%=u.getName()%></td> |
|
- | 346 | <td><%=u.getEmail()%></td> |
|
- | 347 | <td> |
|
- | 348 | <a class="btn btn-warning" target="_blank" href="<%=request.getContextPath()%>/user/startProfileFromSearchUsers.do?id=<%=u.getId()%>"><span class="glyphicon glyphicon-pencil"></span></a> |
|
- | 349 | <button type="button" class="btn btn-danger" onclick="removeCourseComissionTeacher(<%=u.getId()%>)"><span class="glyphicon glyphicon-remove"></span></button> |
|
- | 350 | </td> |
|
- | 351 | </tr> |
|
- | 352 | <% |
|
- | 353 | } |
|
- | 354 | AbstractDao.getCurrentSession().getTransaction().commit(); |
|
- | 355 | %> |
|
- | 356 | </tbody> |
|
- | 357 | </table> |
|
- | 358 | <%-- // PAINEL INDEPENDENTE PARA GERIR COMISSAO DE CURSO --%> |
|
- | 359 | </div> |
|
- | 360 | </div> |
|
255 | 361 | ||
256 | 362 | ||
257 | <tr> |
- | |
258 | <th> |
363 | <div class="form-group"> |
259 | <bean:message key="course.externalSite"/> |
364 | <label class="control-label col-sm-2"><bean:message key="course.externalSite"/></label> |
260 | </th> |
365 | <div class="col-sm-10"> |
261 | <td> |
- | |
262 | <html:select property="courseView.externalSiteServer"> |
366 | <html:select styleClass="form-control" property="courseView.externalSiteServer"> |
263 | <html:option value="estgp">ESTG</html:option> |
367 | <html:option value="estgp">ESTG</html:option> |
264 | </html:select> |
368 | </html:select> |
265 | <html:text property="courseView.externalSitePath"/> |
369 | <html:text styleClass="form-control" property="courseView.externalSitePath"/> |
266 | </td> |
370 | </div> |
267 | </tr> |
371 | </div> |
- | 372 | ||
268 | <tr> |
373 | <div class="form-group"> |
- | 374 | <label class="control-label col-sm-2"><bean:message key="course.studies.plan"/>(VERSAO ANTIGA)</label> |
|
- | 375 | <div class="col-sm-10"> |
|
269 | <th> |
376 | <baco:isAdmin> |
270 | <bean:message key="course.studies.plan"/> |
377 | <html:file styleClass="form-control" property="studiesPlan"/> |
271 | </th> |
378 | </baco:isAdmin> |
272 | <td> |
379 | <baco:isNotAdmin> |
273 | <html:file property="studiesPlan"/> |
380 | <html:file disabled="true" styleClass="form-control" property="studiesPlan"/> |
- | 381 | </baco:isNotAdmin> |
|
- | 382 | ||
274 | <logic:present name="CourseView" property="studiesPlan"> |
383 | <logic:present name="CourseView" property="studiesPlan"> |
275 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate}) |
384 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/> XML antigo</a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate}) |
276 | </logic:present> |
385 | </logic:present> |
277 | <logic:notPresent name="CourseView" property="studiesPlan"> |
386 | <logic:notPresent name="CourseView" property="studiesPlan"> |
278 | <bean:message key="course.studies.plan.not.available"/> |
387 | <bean:message key="course.studies.plan.not.available"/> |
279 | </logic:notPresent> |
388 | </logic:notPresent> |
280 | </td> |
- | |
281 | </tr> |
- | |
282 | 389 | ||
- | 390 | </div> |
|
283 | <tr> |
391 | </div> |
- | 392 | ||
284 | <th> |
393 | <%-- |
- | 394 | ||
- | 395 | <div class="form-group"> |
|
- | 396 | <label class="control-label col-sm-2"> |
|
285 | <bean:message key="course.studies.plan"/> (Versão nova PAE) |
397 | <bean:message key="course.studies.plan"/>(Versão nova PAE) |
286 | <a class="btn btn-default" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=<%=CourseView.getId()%>">Gerir Planos</a> |
398 | <a class="btn btn-default" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=<%=CourseView.getId()%>">Gerir Planos</a> |
287 | </th> |
399 | </label> |
288 | <td> |
400 | <div class="col-sm-10"> |
289 | <logic:present name="CourseView" property="courseStudiesPlans"> |
401 | <logic:present name="CourseView" property="courseStudiesPlans"> |
290 | - | ||
291 | <table class="tablesorterfiltered"> |
402 | <table class="tablesorterfiltered"> |
292 | <thead> |
403 | <thead> |
293 | <tr> |
404 | <tr> |
294 | <th>Versão</th> |
405 | <th>Versão</th> |
295 | <th>Data Produção</th> |
406 | <th>Data Produção</th> |
Line 307... | Line 418... | ||
307 | </tr> |
418 | </tr> |
308 | </logic:iterate> |
419 | </logic:iterate> |
309 | </tbody> |
420 | </tbody> |
310 | </table> |
421 | </table> |
311 | </logic:present> |
422 | </logic:present> |
- | 423 | </div> |
|
- | 424 | </div> |
|
- | 425 | --%> |
|
312 | 426 | ||
- | 427 | ||
- | 428 | ||
- | 429 | <%-- |
|
- | 430 | ||
- | 431 | <tr> |
|
- | 432 | <th> |
|
- | 433 | <bean:message key="course.director"/> |
|
- | 434 | </th> |
|
- | 435 | <td> |
|
- | 436 | <html:select onchange="alertPermissions()" property="courseView.director.id"> |
|
- | 437 | <html:option value="0"> |
|
- | 438 | <bean:message key="none"/> |
|
- | 439 | </html:option> |
|
- | 440 | <logic:present name="CourseForm" property="teachers"> |
|
- | 441 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
|
- | 442 | <html:option value="${teacher.id}"> |
|
- | 443 | (${teacher.code}) ${teacher.name} |
|
- | 444 | </html:option> |
|
- | 445 | </logic:iterate> |
|
- | 446 | </logic:present> |
|
- | 447 | </html:select> |
|
313 | </td> |
448 | </td> |
314 | </tr> |
449 | </tr> |
315 | <tr class="buttons"> |
- | |
316 | <td colspan="2"> |
450 | --%> |
317 | <input type="button" |
- | |
- | 451 | ||
- | 452 | ||
- | 453 | ||
- | 454 | ||
- | 455 | ||
- | 456 | ||
318 | onclick="set(this.form,'submit');this.form.submit()" |
457 | <button class="btn btn-success" type="button" onclick="set(this.form,'submit');this.form.submit()"> |
319 | value="<bean:message key="confirm"/>"/> |
458 | <bean:message key="confirm"/> |
320 | </td> |
459 | </button> |
- | 460 | ||
- | 461 | ||
321 | </tr> |
462 | </div><!-- //panel-body--> |
322 | </table> |
463 | </div><!-- //panel panel-default--> |
323 | 464 | ||
324 | </html:form> |
465 | </html:form> |