Rev 1507 | Rev 1517 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1505 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.Course" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.CourseStudiesPlan" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.CourseStudiesPlanImpl" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
1516 | jmachado | 6 | <%@ page import="pt.estgp.estgweb.services.courses.CoursesService" %> |
1505 | jmachado | 7 | <%@ page import="pt.estgp.estgweb.web.form.courses.CourseStudiesPlansAdminForm" %> |
1516 | jmachado | 8 | <%@ page import="java.util.List" %> |
1505 | jmachado | 9 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
10 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm"%> |
||
17 | <% |
||
18 | //todo temos de ter aqui o id do curso para o carregar aqui mesmo |
||
19 | |||
20 | //se queremos barras de navegação então temos de ter ser acedidos de um |
||
21 | //controlador que carregue o necerrário à barra ou então assumimos que |
||
22 | //o curso id esta sempre disponivel nas barras possiveis de chamar |
||
23 | |||
24 | AbstractDao.getCurrentSession().beginTransaction(); |
||
25 | |||
26 | CourseStudiesPlanImpl planoEdicao; |
||
27 | boolean ultimaVersao = true; |
||
28 | Long courseId; |
||
29 | Long studyPlanId; |
||
30 | String versaoPlano = "Não Encontrada"; |
||
31 | Course course; |
||
32 | if(request.getAttribute("CourseStudiesPlansAdminForm") != null) |
||
33 | { |
||
34 | CourseStudiesPlansAdminForm frm = (CourseStudiesPlansAdminForm) request.getAttribute("CourseStudiesPlansAdminForm"); |
||
35 | courseId = frm.getCourseId(); |
||
36 | studyPlanId = frm.getCourseStudiesPlan().getId(); |
||
37 | ultimaVersao = frm.isVersaoVigor(); |
||
38 | course = DaoFactory.getCourseDaoImpl().load(courseId); |
||
39 | planoEdicao = frm.getCourseStudiesPlan(); |
||
40 | } |
||
41 | else |
||
42 | { |
||
43 | courseId = Long.parseLong(request.getParameter("courseId")); |
||
44 | studyPlanId = Long.parseLong(request.getParameter("studyPlanId")); |
||
45 | request.setAttribute("courseId",courseId); |
||
46 | request.setAttribute("studyPlanId",studyPlanId); |
||
47 | |||
48 | |||
49 | course = DaoFactory.getCourseDaoImpl().load(courseId); |
||
50 | planoEdicao = null; |
||
51 | for(CourseStudiesPlan plan:course.getStudiesPlans()) |
||
52 | { |
||
53 | if(plan.getId() == studyPlanId) |
||
54 | { |
||
55 | versaoPlano = plan.getVersion() + ""; |
||
56 | planoEdicao = (CourseStudiesPlanImpl) DaoFactory.getCourseStudiesPlanDaoImpl().narrow(plan); |
||
57 | break; |
||
58 | } |
||
59 | ultimaVersao = false; |
||
60 | } |
||
61 | //provavelmente era mais facil ter um Form Nested com toda a informação, ou então faz-se isso numa pagina propria para editar o plano em questão |
||
62 | } |
||
63 | request.setAttribute("courseId",courseId); |
||
64 | request.setAttribute("studyPlanId",studyPlanId); |
||
65 | request.setAttribute("course",course); |
||
66 | |||
67 | |||
68 | |||
69 | |||
70 | |||
71 | |||
72 | /* |
||
73 | if(planoEdicao != null) |
||
74 | { |
||
75 | |||
76 | |||
77 | } |
||
78 | */ |
||
79 | |||
80 | %> |
||
81 | <div class="panel panel-default"> |
||
82 | <div class="panel-heading"> |
||
83 | Edição do plano de estudos. Versão <%=versaoPlano%> <%=ultimaVersao? "(<u>é a versão em vigor</u>)":""%> do curso de <%=course.getName()%> (<%=course.getCode()%>) |
||
84 | </div> |
||
85 | <div class="panel-body"> |
||
86 | |||
87 | <html:errors/> |
||
88 | <jomm:messages/> |
||
89 | |||
90 | <div class="panel panel-default"> |
||
91 | <div class="panel-heading">Dados do Curso</div> |
||
92 | <div class="panel-body"> |
||
93 | |||
94 | <div class="col-sm-12">Código do Curso <label class="text-info">${course.code}</label></div> |
||
95 | <div class="col-sm-12"> |
||
96 | <table class="tablesorter-blue"> |
||
97 | <thead> |
||
98 | <tr> |
||
99 | <th>Língua</th> |
||
100 | <th>Nome do Curso</th> |
||
101 | <th>Departamento</th> |
||
102 | </tr> |
||
103 | </thead> |
||
104 | <tbody> |
||
105 | <tr> |
||
106 | <td>PT</td> |
||
107 | <td>${course.name}</td> |
||
108 | <td> |
||
109 | <%if(course.getDepartment() != null){%>${course.department.name}<%}%> |
||
110 | </td> |
||
111 | </tr> |
||
112 | <tr> |
||
113 | <td>EN</td> |
||
114 | <td>${course.nameEn}</td> |
||
115 | <td> |
||
116 | <%if(course.getDepartment() != null){%>${course.department.nameEn}<%}%> |
||
117 | |||
118 | </td> |
||
119 | </tr> |
||
120 | <tr> |
||
121 | <td>ES</td> |
||
122 | <td>${course.nameEs}</td> |
||
123 | <td> |
||
124 | <%if(course.getDepartment() != null){%>${course.department.nameEs}<%}%> |
||
125 | </td> |
||
126 | </tr> |
||
127 | <tr> |
||
128 | <td>FR</td> |
||
129 | <td>${course.nameFr}</td> |
||
130 | <td> |
||
131 | <%if(course.getDepartment() != null){%>${course.department.nameFr}<%}%> |
||
132 | </td> |
||
133 | </tr> |
||
134 | </tbody> |
||
135 | </table> |
||
136 | </div> |
||
137 | |||
138 | </div> |
||
139 | </div> |
||
1516 | jmachado | 140 | <html:form action="/user/courseControllerStudiesPlan" styleId="CourseStudiesPlansAdminForm" styleClass="form-horizontal"> |
141 | <div class="panel panel-warning"> |
||
142 | <div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> Clonagem a partir de outro plano de Estudos</div> |
||
143 | <div class="panel-body"> |
||
1505 | jmachado | 144 | |
145 | <div class="form-group"> |
||
1516 | jmachado | 146 | <label class="control-label col-sm-2">Versão Fonte para Clonagem</label> |
1505 | jmachado | 147 | <div class="col-sm-10"> |
1516 | jmachado | 148 | <html:select styleClass="form-control" property="sourcePlanId"> |
149 | <html:option value="">Nenhuma</html:option> |
||
150 | <% |
||
151 | for(CourseStudiesPlan plan:course.getStudiesPlans()) |
||
152 | { |
||
153 | if(plan.getId() != studyPlanId) |
||
154 | { |
||
155 | request.setAttribute("nowPlanId",plan.getId()); |
||
156 | %> |
||
157 | <html:option value="${nowPlanId}">Versão <%=plan.getVersion()%></html:option> |
||
158 | <% |
||
159 | } |
||
160 | |||
161 | } |
||
162 | %> |
||
163 | </html:select> |
||
1505 | jmachado | 164 | </div> |
165 | </div> |
||
1516 | jmachado | 166 | <button class="btn btn-warning" type="button" data-toggle="modal" data-target="#confirm-ModalFunction" data-message="Esta operação vai sobrepor os dados do plano de estudos atual com os dados da versão escolhida!! Tem a certeza que deseja prosseguir?" data-script="set($('#CourseStudiesPlansAdminForm').get(0),'clonarPlano');$('#CourseStudiesPlansAdminForm').get(0).submit();"> |
167 | Clonar para a fonte escolhida |
||
168 | </button> |
||
1505 | jmachado | 169 | |
1507 | jmachado | 170 | |
171 | |||
1516 | jmachado | 172 | </div> |
173 | </div> |
||
1507 | jmachado | 174 | |
175 | |||
1516 | jmachado | 176 | <div class="panel panel-default"> |
177 | <div class="panel-heading">Plano de Estudos |
||
1507 | jmachado | 178 | |
1516 | jmachado | 179 | <button style="margin-left: 4px" type="button" class="btn btn-success pull-right" onclick="set(this.form,'addNewSemestre');this.form.submit()"> |
180 | <span class="glyphicon glyphicon-plus"> </span> Semestre |
||
181 | </button> |
||
182 | </div> |
||
183 | <div class="panel-body"> |
||
1507 | jmachado | 184 | |
185 | |||
1516 | jmachado | 186 | <% |
187 | CourseStudiesPlansAdminForm courseStudiesPlansAdminForm = (CourseStudiesPlansAdminForm) request.getAttribute("CourseStudiesPlansAdminForm"); |
||
188 | //Form ainda não iniciado vai iniciar é a primeira vez |
||
189 | if(courseStudiesPlansAdminForm.getCourseStudiesPlan().getId() <= 0) |
||
190 | { |
||
191 | courseStudiesPlansAdminForm.setCourseStudiesPlan(planoEdicao); |
||
192 | courseStudiesPlansAdminForm.setCourseId(courseId); |
||
193 | courseStudiesPlansAdminForm.setVersaoVigor(ultimaVersao); |
||
194 | courseStudiesPlansAdminForm.setPlanoEstudos(new CoursesService().loadCursoPlanoFromXml(planoEdicao.getXml())); |
||
195 | } |
||
196 | %> |
||
197 | <input type="hidden" name="dispatch" value="savePlano"/> |
||
198 | <html:hidden property="courseId"/> |
||
199 | <html:hidden property="versaoVigor"/> |
||
200 | <html:hidden property="courseStudiesPlan.id"/> |
||
201 | <html:hidden styleId="semestreId" property="semestreId"/> |
||
202 | <html:hidden styleId="perfilId" property="perfilId"/> |
||
1505 | jmachado | 203 | |
1516 | jmachado | 204 | <div class="form-group"> |
205 | <label class="control-label col-sm-2">Versão</label> |
||
206 | <div class="col-sm-10"> |
||
207 | <html:text styleClass="form-control" property="courseStudiesPlan.version" size="3"/> |
||
208 | </div> |
||
209 | </div> |
||
210 | <div class="form-group"> |
||
211 | <label class="control-label col-sm-2">Descrição</label> |
||
212 | <div class="col-sm-10"> |
||
213 | <html:text styleClass="form-control" property="courseStudiesPlan.versionDescription"/> |
||
214 | </div> |
||
215 | </div> |
||
1507 | jmachado | 216 | |
1516 | jmachado | 217 | <% |
218 | int dummyIndexIdUnidades = 0; |
||
219 | int dummyIndexPerfilId = 0; |
||
220 | int dummyIndexSemestreId = 0; |
||
1507 | jmachado | 221 | |
1516 | jmachado | 222 | %> |
223 | <script> |
||
1505 | jmachado | 224 | |
1516 | jmachado | 225 | function sendUpUnidadeCurricular(dummyIndexId) |
226 | { |
||
227 | sendFieldUp("removed",dummyIndexId); |
||
228 | sendFieldUp("siges",dummyIndexId); |
||
229 | sendFieldUp("nome",dummyIndexId); |
||
230 | sendFieldUp("nomeEn",dummyIndexId); |
||
231 | sendFieldUp("nomeEs",dummyIndexId); |
||
232 | sendFieldUp("nomeFr",dummyIndexId); |
||
1507 | jmachado | 233 | |
1516 | jmachado | 234 | sendFieldUp("totalHoras",dummyIndexId); |
235 | sendFieldUp("horasContactoT",dummyIndexId); |
||
236 | sendFieldUp("horasContactoTP",dummyIndexId); |
||
237 | sendFieldUp("horasContactoP",dummyIndexId); |
||
238 | sendFieldUp("horasContactoPL",dummyIndexId); |
||
239 | sendFieldUp("horasContactoPD",dummyIndexId); |
||
240 | sendFieldUp("horasContactoOT",dummyIndexId); |
||
241 | sendFieldUp("horasContactoE",dummyIndexId); |
||
242 | sendFieldUp("horasContactoS",dummyIndexId); |
||
243 | sendFieldUp("horasContactoTC",dummyIndexId); |
||
244 | sendFieldUp("horasContactoO",dummyIndexId); |
||
245 | sendFieldUp("ECTS",dummyIndexId); |
||
246 | sendFieldUp("urlUnidadeCurricular",dummyIndexId); |
||
247 | sendFieldUp("urlFichaCurricular",dummyIndexId); |
||
1507 | jmachado | 248 | |
1516 | jmachado | 249 | } |
250 | function sendDownUnidadeCurricular(dummyIndexId) |
||
251 | { |
||
252 | sendFieldDown("removed",dummyIndexId); |
||
253 | sendFieldDown("siges",dummyIndexId); |
||
254 | sendFieldDown("nome",dummyIndexId); |
||
255 | sendFieldDown("nomeEn",dummyIndexId); |
||
256 | sendFieldDown("nomeEs",dummyIndexId); |
||
257 | sendFieldDown("nomeFr",dummyIndexId); |
||
1507 | jmachado | 258 | |
1516 | jmachado | 259 | sendFieldDown("totalHoras",dummyIndexId); |
260 | sendFieldDown("horasContactoT",dummyIndexId); |
||
261 | sendFieldDown("horasContactoTP",dummyIndexId); |
||
262 | sendFieldDown("horasContactoP",dummyIndexId); |
||
263 | sendFieldDown("horasContactoPL",dummyIndexId); |
||
264 | sendFieldDown("horasContactoPD",dummyIndexId); |
||
265 | sendFieldDown("horasContactoOT",dummyIndexId); |
||
266 | sendFieldDown("horasContactoE",dummyIndexId); |
||
267 | sendFieldDown("horasContactoS",dummyIndexId); |
||
268 | sendFieldDown("horasContactoTC",dummyIndexId); |
||
269 | sendFieldDown("horasContactoO",dummyIndexId); |
||
270 | sendFieldDown("ECTS",dummyIndexId); |
||
271 | sendFieldDown("urlUnidadeCurricular",dummyIndexId); |
||
272 | sendFieldDown("urlFichaCurricular",dummyIndexId); |
||
273 | |||
274 | } |
||
275 | function sendFieldUp(field,dummyIndexId){ |
||
276 | nome = $("#" + field + "dummyIndex" + dummyIndexId).val(); |
||
277 | $("#" + field + "dummyIndex" + (dummyIndexId)).val($("#" + field + "dummyIndex" + (dummyIndexId-1)).val()); |
||
278 | $("#" + field + "dummyIndex" + (dummyIndexId-1)).val(nome); |
||
279 | } |
||
280 | function sendFieldDown(field,dummyIndexId){ |
||
281 | nome = $("#" + field + "dummyIndex" + dummyIndexId).val(); |
||
282 | $("#" + field + "dummyIndex" + (dummyIndexId)).val($("#" + field + "dummyIndex" + (dummyIndexId+1)).val()); |
||
283 | $("#" + field + "dummyIndex" + (dummyIndexId+1)).val(nome); |
||
284 | } |
||
285 | function removeUnit(dummyIndexId) |
||
286 | { |
||
287 | $("#removed" + "dummyIndex" + dummyIndexId).val("true"); |
||
288 | $("#removed" + "dummyIndex" + dummyIndexId).closest("tr").hide("slow"); |
||
289 | |||
290 | } |
||
291 | </script> |
||
292 | <nested:notEmpty property="planoEstudos"> |
||
293 | |||
294 | <html:hidden property="planoEstudos.siges"/> |
||
295 | <html:hidden property="planoEstudos.nome"/> |
||
296 | <html:hidden property="planoEstudos.dep"/> |
||
297 | <nested:iterate id="semestre" property="planoEstudos.semestre" type="pt.estgp.estgweb.services.courses.xsd.Curso.Semestre"> |
||
298 | <div class="panel panel-default"> |
||
299 | <div class="panel-heading"> |
||
300 | |||
301 | <div class="form-group"> |
||
302 | <% |
||
303 | dummyIndexSemestreId++; |
||
304 | request.setAttribute("dummyIndexSemestreId",dummyIndexSemestreId); |
||
305 | %> |
||
306 | <nested:hidden property="semestreId" value="semestreDummy${dummyIndexSemestreId}"/> |
||
307 | <div class="col-sm-1"> |
||
308 | <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#confirm-ModalFunction" data-message="Esta operação vai remover todas as unidades e perfis deste semestre!! Tem a certeza que deseja prosseguir? A operação não afeta as unidades nem os cursos do PAE, apenas o plano." data-script="$('#semestreId').val('semestreDummy${dummyIndexSemestreId}');set($('#CourseStudiesPlansAdminForm').get(0),'removeSemestre');$('#CourseStudiesPlansAdminForm').get(0).submit()"> |
||
309 | <span class="glyphicon glyphicon-remove"> </span> |
||
1507 | jmachado | 310 | </button> |
1505 | jmachado | 311 | </div> |
1516 | jmachado | 312 | <div class="col-sm-1"> |
313 | Duração |
||
314 | </div> |
||
315 | <div class="col-sm-4"> |
||
316 | <nested:select styleClass="form-control" property="id"> |
||
317 | <html:option value="S1">Semestre 1</html:option> |
||
318 | <html:option value="S2">Semestre 2</html:option> |
||
319 | <html:option value="S3">Semestre 3</html:option> |
||
320 | <html:option value="S4">Semestre 4</html:option> |
||
321 | <html:option value="S5">Semestre 5</html:option> |
||
322 | <html:option value="S6">Semestre 6</html:option> |
||
323 | <html:option value="T1">Trimestre 1</html:option> |
||
324 | <html:option value="T2">Trimestre 2</html:option> |
||
325 | <html:option value="T3">Trimestre 3</html:option> |
||
326 | <html:option value="T4">Trimestre 4</html:option> |
||
327 | <html:option value="T5">Trimestre 5</html:option> |
||
328 | <html:option value="T6">Trimestre 6</html:option> |
||
329 | <html:option value="T7">Trimestre 7</html:option> |
||
330 | <html:option value="T8">Trimestre 8</html:option> |
||
331 | </nested:select> |
||
332 | </div> |
||
333 | <div class="col-sm-6"> |
||
1507 | jmachado | 334 | |
1516 | jmachado | 335 | <button style="margin-left: 4px" type="button" class="btn btn-success pull-right" onclick="form.action=form.action+'#semestreDummy${dummyIndexSemestreId}';$('#semestreId').val('semestreDummy${dummyIndexSemestreId}');set(this.form,'addUnidadeSemestre');this.form.submit()"> |
336 | <span class="glyphicon glyphicon-plus"> </span> Unidade |
||
337 | </button> |
||
338 | |||
339 | <button style="margin-left: 4px" type="button" class="btn btn-success pull-right" onclick="form.action=form.action+'#semestreDummy${dummyIndexSemestreId}';$('#semestreId').val('semestreDummy${dummyIndexSemestreId}');set(this.form,'addPerfilSemestre');this.form.submit()"> |
||
340 | <span class="glyphicon glyphicon-plus"> </span> Perfil |
||
341 | </button> |
||
342 | |||
343 | <a name="semestreDummy${dummyIndexSemestreId}"></a> |
||
344 | </div> |
||
345 | </div> |
||
346 | </div> |
||
347 | <div class="panel-body"> |
||
348 | |||
349 | |||
350 | <button class="btn btn-default" data-toggle="collapse" type="button" data-target=".langs">Ver Campos Multingua</button> |
||
351 | <nested:iterate id="perfil" property="perfil" type="pt.estgp.estgweb.services.courses.xsd.Curso.Semestre.Perfil"> |
||
352 | <div class="panel panel-default"> |
||
353 | <div class="panel-heading"> |
||
354 | <div class="form-group"> |
||
1507 | jmachado | 355 | <% |
1516 | jmachado | 356 | dummyIndexPerfilId++; |
357 | request.setAttribute("dummyIndexPerfilId",dummyIndexPerfilId); |
||
1507 | jmachado | 358 | %> |
1516 | jmachado | 359 | <a name="perfilDummy${dummyIndexPerfilId}"></a> |
360 | <nested:hidden property="perfilId" value="perfilDummy${dummyIndexPerfilId}"/> |
||
361 | <div class="col-sm-1"> |
||
362 | <button type="button" class="btn btn-danger" data-toggle="modal" data-target="#confirm-ModalFunction" data-message="Esta operação vai remover todas as unidades deste perfil!! Tem a certeza que deseja prosseguir? A operação não afeta as unidades nem os cursos do PAE, apenas o plano." data-script="$('#CourseStudiesPlansAdminForm').get(0).action=$('#CourseStudiesPlansAdminForm').get(0).action+'#semestreDummy${dummyIndexSemestreId}';$('#perfilId').val('perfilDummy${dummyIndexPerfilId}');set($('#CourseStudiesPlansAdminForm').get(0),'removePerfil');$('#CourseStudiesPlansAdminForm').get(0).submit()"> |
||
363 | <span class="glyphicon glyphicon-remove"> </span> |
||
364 | </button> |
||
365 | </div> |
||
366 | <div class="col-sm-1"> |
||
367 | Perfil |
||
368 | </div> |
||
369 | <div class="col-sm-6"> |
||
370 | <nested:text styleClass="form-control" property="nome"/> |
||
371 | </div> |
||
372 | <div class="col-sm-4"> |
||
373 | <button type="button" class="btn btn-success pull-right" onclick="form.action=form.action+'#perfilDummy${dummyIndexPerfilId}';$('#perfilId').val('perfilDummy${dummyIndexPerfilId}');set(this.form,'addUnidadePerfil');this.form.submit()"> |
||
374 | <span class="glyphicon glyphicon-plus"> </span> Unidade |
||
375 | </button> |
||
376 | </div> |
||
377 | </div> |
||
378 | </div> |
||
379 | <div class="panel-body"> |
||
380 | <table class="tablesorterfiltered"> |
||
381 | <thead> |
||
382 | <tr> |
||
383 | <td></td> |
||
384 | <td></td> |
||
385 | <th>SIGES</th> |
||
386 | <th>Nome</th> |
||
387 | <th>Total</th> |
||
388 | <th>T</th> |
||
389 | <th>TP</th> |
||
390 | <th>P</th> |
||
391 | <th>PL</th> |
||
392 | <th>PD</th> |
||
393 | <th>OT</th> |
||
394 | <th>E</th> |
||
395 | <th>S</th> |
||
396 | <th>TC</th> |
||
397 | <th>O</th> |
||
398 | <th>ECTS</th> |
||
399 | <th>URL UNIDADE</th> |
||
400 | <th>FICHA URL</th> |
||
401 | </tr> |
||
402 | </thead> |
||
403 | <tbody> |
||
404 | <nested:size id="tamanho" property="unidade"/> |
||
405 | <nested:iterate id="unit" indexId="indexId" property="unidade" type="pt.estgp.estgweb.services.courses.xsd.UnidadeType"> |
||
1507 | jmachado | 406 | |
1516 | jmachado | 407 | <% |
408 | dummyIndexIdUnidades++; |
||
409 | request.setAttribute("dummyIndexIdUnidades","dummyIndex" + dummyIndexIdUnidades); |
||
410 | %> |
||
411 | <% |
||
412 | int tamanhoMinus1 = tamanho - 1; |
||
413 | request.setAttribute("tamanhoMinus1",tamanhoMinus1); |
||
1507 | jmachado | 414 | |
1516 | jmachado | 415 | %> |
416 | <tr <nested:equal property="removed" value="true">class="hidden"</nested:equal>> |
||
417 | <td class="text-nowrap"> |
||
418 | |||
419 | <nested:greaterThan value="0" name="indexId"> |
||
420 | <button type="button" class="btn btn-warning" onclick="sendUpUnidadeCurricular(<%=dummyIndexIdUnidades%>)"> |
||
421 | <span class="glyphicon glyphicon-arrow-up"> </span> |
||
422 | </button> |
||
423 | </nested:greaterThan> |
||
424 | <nested:lessThan name="indexId" value="${tamanhoMinus1}"> |
||
425 | <button type="button" class="btn btn-warning" onclick="sendDownUnidadeCurricular(<%=dummyIndexIdUnidades%>)"> |
||
426 | <span class="glyphicon glyphicon-arrow-down"> </span> |
||
427 | </button> |
||
428 | </nested:lessThan> |
||
429 | </td> |
||
430 | <td> |
||
431 | <nested:hidden styleId="removed${dummyIndexIdUnidades}" property="removed"/> |
||
432 | <button type="button" class="btn btn-danger" onclick="removeUnit(<%=dummyIndexIdUnidades%>)"> |
||
433 | <span class="glyphicon glyphicon-remove"> </span> |
||
1507 | jmachado | 434 | </button> |
1516 | jmachado | 435 | </td> |
436 | <td><nested:text styleId="siges${dummyIndexIdUnidades}" styleClass="form-control" property="siges"/></td> |
||
437 | <td> |
||
438 | <div> |
||
439 | <div class="col-sm-1">(PT)</div> |
||
440 | <div class="col-sm-11"><nested:text styleId="nome${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nome"/></div> |
||
1505 | jmachado | 441 | |
1516 | jmachado | 442 | <div class="langs collapse" > |
443 | <div class="col-sm-1">(EN)</div> |
||
444 | <div class="col-sm-11"><nested:text styleId="nomeEn${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEn"/></div> |
||
445 | <div class="col-sm-1">(ES)</div> |
||
446 | <div class="col-sm-11"><nested:text styleId="nomeEs${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEs"/></div> |
||
447 | <div class="col-sm-1">(FR)</div> |
||
448 | <div class="col-sm-11"><nested:text styleId="nomeFr${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeFr"/></div> |
||
449 | </div> |
||
1505 | jmachado | 450 | </div> |
451 | |||
1516 | jmachado | 452 | </td> |
453 | <td><nested:text styleClass="form-control" styleId="totalHoras${dummyIndexIdUnidades}" property="totalHoras"/></td> |
||
454 | <td><nested:text styleClass="form-control" styleId="horasContactoT${dummyIndexIdUnidades}" property="horasContacto.t"/></td> |
||
455 | <td><nested:text styleClass="form-control" styleId="horasContactoTP${dummyIndexIdUnidades}" property="horasContacto.TP"/></td> |
||
456 | <td><nested:text styleClass="form-control" styleId="horasContactoP${dummyIndexIdUnidades}" property="horasContacto.p"/></td> |
||
457 | <td><nested:text styleClass="form-control" styleId="horasContactoPL${dummyIndexIdUnidades}" property="horasContacto.PL"/></td> |
||
458 | <td><nested:text styleClass="form-control" styleId="horasContactoPD${dummyIndexIdUnidades}" property="horasContacto.PD"/></td> |
||
459 | <td><nested:text styleClass="form-control" styleId="horasContactoOT${dummyIndexIdUnidades}" property="horasContacto.OT"/></td> |
||
460 | <td><nested:text styleClass="form-control" styleId="horasContactoE${dummyIndexIdUnidades}" property="horasContacto.e"/></td> |
||
461 | <td><nested:text styleClass="form-control" styleId="horasContactoS${dummyIndexIdUnidades}" property="horasContacto.s"/></td> |
||
462 | <td><nested:text styleClass="form-control" styleId="horasContactoTC${dummyIndexIdUnidades}" property="horasContacto.TC"/></td> |
||
463 | <td><nested:text styleClass="form-control" styleId="horasContactoO${dummyIndexIdUnidades}" property="horasContacto.o"/></td> |
||
464 | <td><nested:text styleClass="form-control" styleId="ECTS${dummyIndexIdUnidades}" property="ECTS"/></td> |
||
465 | <td><nested:text styleClass="form-control" styleId="urlUnidadeCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlUnidadeCurricular"/></td> |
||
466 | <td><nested:text styleClass="form-control" styleId="urlFichaCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlFichaCurricular"/></td> |
||
467 | </tr> |
||
468 | </nested:iterate> |
||
469 | </tbody> |
||
470 | </table> |
||
471 | </div> |
||
1505 | jmachado | 472 | </div> |
473 | |||
1516 | jmachado | 474 | </nested:iterate> |
1505 | jmachado | 475 | |
1516 | jmachado | 476 | <nested:notEmpty property="unidade"> |
1507 | jmachado | 477 | |
1516 | jmachado | 478 | <table class="tablesorterfiltered"> |
479 | <thead> |
||
480 | <tr> |
||
481 | <th></th> |
||
482 | <th></th> |
||
483 | <th>SIGES</th> |
||
484 | <th>Nome</th> |
||
485 | <th>Total</th> |
||
486 | <th>T</th> |
||
487 | <th>TP</th> |
||
488 | <th>P</th> |
||
489 | <th>PL</th> |
||
490 | <th>PD</th> |
||
491 | <th>OT</th> |
||
492 | <th>E</th> |
||
493 | <th>S</th> |
||
494 | <th>TC</th> |
||
495 | <th>O</th> |
||
496 | <th>ECTS</th> |
||
497 | <th>URL UNIDADE</th> |
||
498 | <th>FICHA URL</th> |
||
499 | </tr> |
||
500 | </thead> |
||
501 | <tbody> |
||
502 | <nested:size id="tamanho" property="unidade"/> |
||
503 | <nested:iterate id="unit" property="unidade" indexId="indexId" type="pt.estgp.estgweb.services.courses.xsd.UnidadeType"> |
||
504 | <% |
||
505 | dummyIndexIdUnidades++; |
||
506 | request.setAttribute("dummyIndexIdUnidades","dummyIndex" + dummyIndexIdUnidades); |
||
507 | %> |
||
508 | <% |
||
509 | int tamanhoMinus1 = tamanho - 1; |
||
510 | request.setAttribute("tamanhoMinus1",tamanhoMinus1); |
||
1507 | jmachado | 511 | |
1516 | jmachado | 512 | %> |
1507 | jmachado | 513 | |
1516 | jmachado | 514 | <tr <nested:equal property="removed" value="true">class="hidden"</nested:equal>> |
515 | <td class="text-nowrap"> |
||
1507 | jmachado | 516 | |
1516 | jmachado | 517 | <nested:greaterThan value="0" name="indexId"> |
518 | <button type="button" class="btn btn-warning" onclick="sendUpUnidadeCurricular(<%=dummyIndexIdUnidades%>)"> |
||
519 | <span class="glyphicon glyphicon-arrow-up"> </span> |
||
520 | </button> |
||
521 | </nested:greaterThan> |
||
522 | <nested:lessThan name="indexId" value="${tamanhoMinus1}"> |
||
523 | <button type="button" class="btn btn-warning" onclick="sendDownUnidadeCurricular(<%=dummyIndexIdUnidades%>)"> |
||
524 | <span class="glyphicon glyphicon-arrow-down"> </span> |
||
525 | </button> |
||
526 | </nested:lessThan> |
||
527 | </td> |
||
528 | <td> |
||
529 | <nested:hidden styleId="removed${dummyIndexIdUnidades}" property="removed"/> |
||
530 | <button type="button" class="btn btn-danger" onclick="removeUnit(<%=dummyIndexIdUnidades%>)" > |
||
531 | <span class="glyphicon glyphicon-remove"> </span> |
||
1507 | jmachado | 532 | </button> |
1516 | jmachado | 533 | </td> |
534 | <td><nested:text styleId="siges${dummyIndexIdUnidades}" styleClass="form-control" property="siges"/></td> |
||
535 | <td> |
||
536 | <div> |
||
537 | <div class="col-sm-1">(PT)</div> |
||
538 | <div class="col-sm-11"><nested:text styleId="nome${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nome"/></div> |
||
1505 | jmachado | 539 | |
1516 | jmachado | 540 | <div class="langs collapse" > |
541 | <div class="col-sm-1">(EN)</div> |
||
542 | <div class="col-sm-11"><nested:text styleId="nomeEn${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEn"/></div> |
||
543 | <div class="col-sm-1">(ES)</div> |
||
544 | <div class="col-sm-11"><nested:text styleId="nomeEs${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEs"/></div> |
||
545 | <div class="col-sm-1">(FR)</div> |
||
546 | <div class="col-sm-11"><nested:text styleId="nomeFr${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeFr"/></div> |
||
547 | </div> |
||
1505 | jmachado | 548 | </div> |
549 | |||
1516 | jmachado | 550 | </td> |
551 | <td><nested:text styleClass="form-control" styleId="totalHoras${dummyIndexIdUnidades}" property="totalHoras"/></td> |
||
552 | <td><nested:text styleClass="form-control" styleId="horasContactoT${dummyIndexIdUnidades}" property="horasContacto.t"/></td> |
||
553 | <td><nested:text styleClass="form-control" styleId="horasContactoTP${dummyIndexIdUnidades}" property="horasContacto.TP"/></td> |
||
554 | <td><nested:text styleClass="form-control" styleId="horasContactoP${dummyIndexIdUnidades}" property="horasContacto.p"/></td> |
||
555 | <td><nested:text styleClass="form-control" styleId="horasContactoPL${dummyIndexIdUnidades}" property="horasContacto.PL"/></td> |
||
556 | <td><nested:text styleClass="form-control" styleId="horasContactoPD${dummyIndexIdUnidades}" property="horasContacto.PD"/></td> |
||
557 | <td><nested:text styleClass="form-control" styleId="horasContactoOT${dummyIndexIdUnidades}" property="horasContacto.OT"/></td> |
||
558 | <td><nested:text styleClass="form-control" styleId="horasContactoE${dummyIndexIdUnidades}" property="horasContacto.e"/></td> |
||
559 | <td><nested:text styleClass="form-control" styleId="horasContactoS${dummyIndexIdUnidades}" property="horasContacto.s"/></td> |
||
560 | <td><nested:text styleClass="form-control" styleId="horasContactoTC${dummyIndexIdUnidades}" property="horasContacto.TC"/></td> |
||
561 | <td><nested:text styleClass="form-control" styleId="horasContactoO${dummyIndexIdUnidades}" property="horasContacto.o"/></td> |
||
562 | <td><nested:text styleClass="form-control" styleId="ECTS${dummyIndexIdUnidades}" property="ECTS"/></td> |
||
563 | <td><nested:text styleClass="form-control" styleId="urlUnidadeCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlUnidadeCurricular"/></td> |
||
564 | <td><nested:text styleClass="form-control" styleId="urlFichaCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlFichaCurricular"/></td> |
||
565 | </tr> |
||
566 | </nested:iterate> |
||
567 | </tbody> |
||
568 | </table> |
||
569 | </nested:notEmpty> |
||
1507 | jmachado | 570 | |
1516 | jmachado | 571 | </div> |
1505 | jmachado | 572 | </div> |
573 | |||
1516 | jmachado | 574 | </nested:iterate> |
1505 | jmachado | 575 | |
1516 | jmachado | 576 | </nested:notEmpty> |
1505 | jmachado | 577 | |
1516 | jmachado | 578 | <a type="button" class="btn btn-danger" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=${courseId}">Cancelar</a> |
579 | <html:submit styleClass="btn btn-success" >Salvar</html:submit> |
||
1505 | jmachado | 580 | |
581 | |||
582 | |||
1516 | jmachado | 583 | |
584 | </div> |
||
1505 | jmachado | 585 | </div> |
1516 | jmachado | 586 | </html:form> |
1505 | jmachado | 587 | </div> |
588 | </div> |
||
589 | |||
590 | <% |
||
591 | |||
592 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
593 | %> |
||
594 |