Subversion Repositories bacoAlunos

Rev

Rev 1542 | Rev 1771 | 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);
1684 jmachado 66
    request.setAttribute("courseSigesCode",course.getCode());
1505 jmachado 67
 
68
 
69
 
70
 
71
 
72
 
73
    /*
74
    if(planoEdicao != null)
75
    {
76
 
77
 
78
    }
79
    */
80
 
81
%>
82
    <div class="panel panel-default">
83
        <div class="panel-heading">
84
            Edição do plano de estudos. Versão <%=versaoPlano%> <%=ultimaVersao? "(<u>é a versão em vigor</u>)":""%> do curso de <%=course.getName()%> (<%=course.getCode()%>)
85
        </div>
86
        <div class="panel-body">
87
 
88
            <html:errors/>
89
            <jomm:messages/>
90
 
1534 jmachado 91
 
92
 
1505 jmachado 93
            <div class="panel panel-default">
94
                <div class="panel-heading">Dados do Curso</div>
95
                <div class="panel-body">
96
 
97
                    <div class="col-sm-12">Código do Curso <label class="text-info">${course.code}</label></div>
98
                    <div class="col-sm-12">
99
                        <table class="tablesorter-blue">
100
                            <thead>
101
                                <tr>
102
                                    <th>Língua</th>
103
                                    <th>Nome do Curso</th>
104
                                    <th>Departamento</th>
105
                                </tr>
106
                            </thead>
107
                            <tbody>
108
                                <tr>
109
                                    <td>PT</td>
110
                                    <td>${course.name}</td>
111
                                    <td>
112
                                    <%if(course.getDepartment() != null){%>${course.department.name}<%}%>
113
                                    </td>
114
                                </tr>
115
                                <tr>
116
                                    <td>EN</td>
117
                                    <td>${course.nameEn}</td>
118
                                    <td>
119
                                        <%if(course.getDepartment() != null){%>${course.department.nameEn}<%}%>
120
 
121
                                    </td>
122
                                </tr>
123
                                <tr>
124
                                    <td>ES</td>
125
                                    <td>${course.nameEs}</td>
126
                                    <td>
127
                                        <%if(course.getDepartment() != null){%>${course.department.nameEs}<%}%>
128
                                    </td>
129
                                </tr>
130
                                <tr>
131
                                    <td>FR</td>
132
                                    <td>${course.nameFr}</td>
133
                                    <td>
134
                                        <%if(course.getDepartment() != null){%>${course.department.nameFr}<%}%>
135
                                    </td>
136
                                </tr>
137
                            </tbody>
138
                        </table>
139
                   </div>
140
 
141
                </div>
142
            </div>
1534 jmachado 143
            <html:form action="/user/courseControllerStudiesPlan" styleId="CourseStudiesPlansAdminForm" styleClass="form-horizontal"  enctype="multipart/form-data">
144
 
1516 jmachado 145
                <div class="panel panel-warning">
146
                    <div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> Clonagem a partir de outro plano de Estudos</div>
147
                    <div class="panel-body">
1505 jmachado 148
 
149
                            <div class="form-group">
1516 jmachado 150
                                <label class="control-label col-sm-2">Versão Fonte para Clonagem</label>
1505 jmachado 151
                                <div class="col-sm-10">
1516 jmachado 152
                                    <html:select styleClass="form-control" property="sourcePlanId">
153
                                        <html:option value="">Nenhuma</html:option>
154
                                    <%
155
                                        for(CourseStudiesPlan plan:course.getStudiesPlans())
156
                                        {
157
                                            if(plan.getId() != studyPlanId)
158
                                            {
159
                                                request.setAttribute("nowPlanId",plan.getId());
160
                                        %>
161
                                            <html:option value="${nowPlanId}">Versão <%=plan.getVersion()%></html:option>
162
                                        <%
163
                                            }
164
 
165
                                        }
166
                                    %>
167
                                    </html:select>
1505 jmachado 168
                                </div>
169
                            </div>
1516 jmachado 170
                            <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();">
171
                                Clonar para a fonte escolhida
172
                            </button>
1505 jmachado 173
 
1507 jmachado 174
 
175
 
1516 jmachado 176
                    </div>
177
                </div>
1507 jmachado 178
 
1684 jmachado 179
                <script>
180
                    function createFichasUrls()
181
                    {
182
                        $("[data-unit-ficha-url-target-id]").each(
183
                                function()
184
                                {
185
                                    var targetId = $(this).attr("data-unit-ficha-url-target-id");
186
                                    var sigesUnit = $(this).attr("data-unit-siges-code");
187
                                    var sigesCourse = $(this).attr("data-course-siges-code");
188
                                    var unitSemestre = $(this).attr("data-unit-semestre");
189
                                    var sigesUrlInput = $("#" + targetId);
190
                                    var urlPattern = $("#urlPadraoFicha").val();
191
                                    var targetsType = $("#urlPadraoFichaAlvo option:selected").val();
192
                                    if(targetsType == "all" || sigesUrlInput.val() == "")
193
                                    {
194
                                        urlPattern = urlPattern.replace("{SIGES_CURSO}",'${courseSigesCode}');
195
                                        urlPattern = urlPattern.replace("{SIGES_UNIT}",sigesUnit);
196
                                        urlPattern = urlPattern.replace("{UNIT_SEMESTRE}",unitSemestre);
197
 
198
                                        $("#" + targetId).val(urlPattern);
199
                                    }
200
                                }
201
                        );
202
                        alert("URLS gerados com Sucesso, Necessita de SALVAR o Plano.");
203
                    }
204
                </script>
205
 
206
                <div class="panel panel-warning">
207
                    <div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> Ferramenta Auxiliar de Auto-Preenchimento de URL's de Fichas</div>
208
                    <div class="panel-body">
209
 
210
                        <div class="form-group">
211
                            <label class="control-label col-sm-2">URL Padrão</label>
212
                            <div class="col-sm-10">
213
                                <p>exemplo para a ESTG: http://www.estgp.pt/startLoadCourseUnitProgramSiges.do?unitCode={SIGES_UNIT}&courseCode={SIGES_CURSO}&semestre={UNIT_SEMESTRE}</p>
214
                                <p>Nenhum dos campos é obrigatório, o sistema substitui se existir no padrão, Na estg o Semestre é obrigatório para diferenciar unidades que são lecionadas em ambos os semestres</p>
215
                                <p>O semestre presente neste sistema e que vai ser preenchido vai de S1 a S6 e de T1 a T8 ou A, portanto se o semestre for usado à que ter isto em atenção</p>
216
                                <input type="text" class="form-control" id="urlPadraoFicha" placeholder="http://exemplo.com/exemplo/{SIGES_CURSO}/{SEMESTRE}/{SIGES_UNIT}.pdf">
217
                            </div>
218
                        </div>
219
                        <div class="form-group">
220
                            <label class="control-label col-sm-2">Alvos</label>
221
                            <div class="col-sm-10">
222
                                <select id="urlPadraoFichaAlvo">
223
                                    <option value="all">Todos</option>
224
                                    <option value="onlyEmpty">Apenas Vazios</option>
225
                                </select>
226
                            </div>
227
                        </div>
228
                        <button class="btn btn-warning" type="button" data-toggle="modal" onclick="createFichasUrls()">
229
                            Gerar URL's de Fichas
230
                        </button>
231
 
232
 
233
 
234
                    </div>
235
                </div>
236
 
1536 jmachado 237
                <%
238
                    CourseStudiesPlansAdminForm courseStudiesPlansAdminForm = (CourseStudiesPlansAdminForm) request.getAttribute("CourseStudiesPlansAdminForm");
239
                    //Form ainda não iniciado vai iniciar é a primeira vez
240
                    if(courseStudiesPlansAdminForm.getCourseStudiesPlan().getId() <= 0)
241
                    {
242
                        courseStudiesPlansAdminForm.setCourseStudiesPlan(planoEdicao);
243
                        courseStudiesPlansAdminForm.setCourseId(courseId);
244
                        courseStudiesPlansAdminForm.setVersaoVigor(ultimaVersao);
245
                        courseStudiesPlansAdminForm.setPlanoEstudos(new CoursesService().loadCursoPlanoFromXml(planoEdicao.getXml()));
246
                    }
247
                %>
1535 jmachado 248
                <logic:notEmpty name="CourseStudiesPlansAdminForm" property="courseStudiesPlan.importLog">
1534 jmachado 249
                    <div class="panel panel-warning">
1536 jmachado 250
                        <div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> LOG DA ULTIMA IMPORTAÇÃO</div>
1534 jmachado 251
                        <div class="panel-body">
252
                            <pre>
1535 jmachado 253
                                <html:hidden name="CourseStudiesPlansAdminForm" property="courseStudiesPlan.importLog"/>
254
                                <bean:write name="CourseStudiesPlansAdminForm" property="courseStudiesPlan.importLog"/>
1536 jmachado 255
 
1534 jmachado 256
                            </pre>
257
                        </div>
258
                    </div>
259
                </logic:notEmpty>
260
                <div class="panel panel-warning">
261
                    <div class="panel-heading"><span class="glyphicon glyphicon-wrench"></span> Importar Ficheiro do SIGES em formato TXT: <a href="<%=request.getContextPath()%>/user/courses/9500-Enfermagem.TXT">VEJA UM EXEMPLO DE ENFERMAGEM</a></div>
262
                    <div class="panel-body">
1541 jmachado 263
                        <div class="col-md-6">
264
                            <div class="panel panel-default">
265
                                <div class="panel-body">
266
                                    <div class="form-group">
267
                                        <label class="control-label col-sm-2">Escolher Ficheiro Exportado do Siges</label>
268
                                        <div class="col-sm-10">
269
                                            <html:file styleClass="form-control" property="formFileImport"/>
270
                                        </div>
271
                                    </div>
272
                                    <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),'importarPlano');$('#CourseStudiesPlansAdminForm').get(0).submit();">
273
                                        Importar o ficheiro sobrepondo esta versão do plano
274
                                    </button>
275
                                </div>
1534 jmachado 276
                            </div>
277
                        </div>
1541 jmachado 278
                        <div class="col-md-6">
279
                            <div class="panel panel-default">
280
                                <div class="panel-body">
281
                                    <div class="form-group">
282
                                        <label class="control-label col-sm-2">Escolher Ficheiro Exportado do Siges Com Ramos</label>
283
                                        <div class="col-sm-10">
1542 jmachado 284
                                            <html:file styleClass="form-control" property="formFileImport2"/>
1541 jmachado 285
                                        </div>
286
                                    </div>
287
                                    <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),'mergePlano');$('#CourseStudiesPlansAdminForm').get(0).submit();">
288
                                        FUNDIR o ficheiro com esta versão do plano
289
                                    </button>
290
                                </div>
291
                            </div>
292
                        </div>
293
 
294
 
1534 jmachado 295
                    </div>
296
                </div>
297
 
298
 
1516 jmachado 299
                <div class="panel panel-default">
300
                    <div class="panel-heading">Plano de Estudos
1507 jmachado 301
 
1516 jmachado 302
                        <button style="margin-left: 4px"  type="button" class="btn btn-success pull-right" onclick="set(this.form,'addNewSemestre');this.form.submit()">
303
                            <span class="glyphicon glyphicon-plus"> </span> Semestre
304
                        </button>
305
                    </div>
306
                    <div class="panel-body">
1507 jmachado 307
 
308
 
1516 jmachado 309
                                <input type="hidden" name="dispatch" value="savePlano"/>
310
                                <html:hidden property="courseId"/>
311
                                <html:hidden property="versaoVigor"/>
312
                                <html:hidden property="courseStudiesPlan.id"/>
313
                                <html:hidden styleId="semestreId" property="semestreId"/>
314
                                <html:hidden styleId="perfilId" property="perfilId"/>
1505 jmachado 315
 
1516 jmachado 316
                                <div class="form-group">
317
                                    <label class="control-label col-sm-2">Versão</label>
318
                                    <div class="col-sm-10">
319
                                        <html:text styleClass="form-control" property="courseStudiesPlan.version" size="3"/>
320
                                    </div>
321
                                </div>
322
                                <div class="form-group">
323
                                    <label class="control-label col-sm-2">Descrição</label>
324
                                    <div class="col-sm-10">
325
                                        <html:text styleClass="form-control" property="courseStudiesPlan.versionDescription"/>
326
                                    </div>
327
                                </div>
1507 jmachado 328
 
1534 jmachado 329
 
330
 
331
 
1516 jmachado 332
                                <%
333
                                    int dummyIndexIdUnidades = 0;
334
                                    int dummyIndexPerfilId = 0;
335
                                    int dummyIndexSemestreId = 0;
1507 jmachado 336
 
1516 jmachado 337
                                %>
338
                                <script>
1505 jmachado 339
 
1516 jmachado 340
                                    function sendUpUnidadeCurricular(dummyIndexId)
341
                                    {
342
                                        sendFieldUp("removed",dummyIndexId);
343
                                        sendFieldUp("siges",dummyIndexId);
344
                                        sendFieldUp("nome",dummyIndexId);
345
                                        sendFieldUp("nomeEn",dummyIndexId);
346
                                        sendFieldUp("nomeEs",dummyIndexId);
347
                                        sendFieldUp("nomeFr",dummyIndexId);
1507 jmachado 348
 
1516 jmachado 349
                                        sendFieldUp("totalHoras",dummyIndexId);
350
                                        sendFieldUp("horasContactoT",dummyIndexId);
351
                                        sendFieldUp("horasContactoTP",dummyIndexId);
352
                                        sendFieldUp("horasContactoP",dummyIndexId);
353
                                        sendFieldUp("horasContactoPL",dummyIndexId);
354
                                        sendFieldUp("horasContactoPD",dummyIndexId);
355
                                        sendFieldUp("horasContactoOT",dummyIndexId);
356
                                        sendFieldUp("horasContactoE",dummyIndexId);
357
                                        sendFieldUp("horasContactoS",dummyIndexId);
358
                                        sendFieldUp("horasContactoTC",dummyIndexId);
359
                                        sendFieldUp("horasContactoO",dummyIndexId);
360
                                        sendFieldUp("ECTS",dummyIndexId);
361
                                        sendFieldUp("urlUnidadeCurricular",dummyIndexId);
362
                                        sendFieldUp("urlFichaCurricular",dummyIndexId);
1507 jmachado 363
 
1516 jmachado 364
                                    }
365
                                    function sendDownUnidadeCurricular(dummyIndexId)
366
                                    {
367
                                        sendFieldDown("removed",dummyIndexId);
368
                                        sendFieldDown("siges",dummyIndexId);
369
                                        sendFieldDown("nome",dummyIndexId);
370
                                        sendFieldDown("nomeEn",dummyIndexId);
371
                                        sendFieldDown("nomeEs",dummyIndexId);
372
                                        sendFieldDown("nomeFr",dummyIndexId);
1507 jmachado 373
 
1516 jmachado 374
                                        sendFieldDown("totalHoras",dummyIndexId);
375
                                        sendFieldDown("horasContactoT",dummyIndexId);
376
                                        sendFieldDown("horasContactoTP",dummyIndexId);
377
                                        sendFieldDown("horasContactoP",dummyIndexId);
378
                                        sendFieldDown("horasContactoPL",dummyIndexId);
379
                                        sendFieldDown("horasContactoPD",dummyIndexId);
380
                                        sendFieldDown("horasContactoOT",dummyIndexId);
381
                                        sendFieldDown("horasContactoE",dummyIndexId);
382
                                        sendFieldDown("horasContactoS",dummyIndexId);
383
                                        sendFieldDown("horasContactoTC",dummyIndexId);
384
                                        sendFieldDown("horasContactoO",dummyIndexId);
385
                                        sendFieldDown("ECTS",dummyIndexId);
386
                                        sendFieldDown("urlUnidadeCurricular",dummyIndexId);
387
                                        sendFieldDown("urlFichaCurricular",dummyIndexId);
388
 
389
                                    }
390
                                    function sendFieldUp(field,dummyIndexId){
391
                                        nome = $("#" + field + "dummyIndex" + dummyIndexId).val();
392
                                        $("#" + field + "dummyIndex" + (dummyIndexId)).val($("#" + field + "dummyIndex" + (dummyIndexId-1)).val());
393
                                        $("#" + field + "dummyIndex" + (dummyIndexId-1)).val(nome);
394
                                    }
395
                                    function sendFieldDown(field,dummyIndexId){
396
                                        nome = $("#" + field + "dummyIndex" + dummyIndexId).val();
397
                                        $("#" + field + "dummyIndex" + (dummyIndexId)).val($("#" + field + "dummyIndex" + (dummyIndexId+1)).val());
398
                                        $("#" + field + "dummyIndex" + (dummyIndexId+1)).val(nome);
399
                                    }
400
                                    function removeUnit(dummyIndexId)
401
                                    {
402
                                        $("#removed" + "dummyIndex" + dummyIndexId).val("true");
403
                                        $("#removed" + "dummyIndex" + dummyIndexId).closest("tr").hide("slow");
404
 
405
                                    }
1517 jmachado 406
 
407
                                    function sendUpSemestre(dummySemestreId,form)
408
                                    {
409
                                        $(form.semestreId).val("semestreDummy" + dummySemestreId);
410
                                        $(form.dispatch).val("sendUpSemestre");
411
                                        form.submit();
412
                                    }
413
                                    function sendDownSemestre(dummySemestreId,form)
414
                                    {
415
                                        $(form.semestreId).val("semestreDummy" +dummySemestreId);
416
                                        $(form.dispatch).val("sendDownSemestre");
417
                                        form.submit();
418
                                    }
419
 
420
                                    function sendUpPerfil(dummyPerfilId,form,dummySemestreId)
421
                                    {
422
                                        form.action = form.action + "#" + dummySemestreId;
423
                                        $(form.perfilId).val("perfilDummy" + dummyPerfilId);
424
                                        $(form.dispatch).val("sendUpPerfil");
425
                                        form.submit();
426
                                    }
427
                                    function sendDownPerfil(dummyPerfilId,form,dummySemestreId)
428
                                    {
429
                                        form.action = form.action + "#" + dummySemestreId;
430
                                        $(form.perfilId).val("perfilDummy" + dummyPerfilId);
431
                                        $(form.dispatch).val("sendDownPerfil");
432
                                        form.submit();
433
                                    }
1516 jmachado 434
                                </script>
435
                                <nested:notEmpty  property="planoEstudos">
436
 
1534 jmachado 437
                                    <div class="panel panel-default">
438
                                        <div class="panel-heading">
439
                                            Informação obtida do Siges (Auxiliar)
440
                                        </div>
441
                                        <div class="panel-body">
442
                                            <div class="form-group">
443
                                                <label class="control-label col-sm-2">Ano do Plano no Siges</label>
444
                                                <div class="col-sm-10">
445
                                                    <html:text styleClass="form-control" property="planoEstudos.anoPlanoSiges"/>
446
                                                </div>
447
                                            </div>
448
                                            <div class="form-group">
449
                                                <label class="control-label col-sm-2">Código do Plano no Siges</label>
450
                                                <div class="col-sm-10">
451
                                                    <html:text styleClass="form-control" property="planoEstudos.codigoPlanoSiges"/>
452
                                                </div>
453
                                            </div>
454
                                            <div class="form-group">
455
                                                <label class="control-label col-sm-2">Linha Descritiva do Plano no Siges</label>
456
                                                <div class="col-sm-10">
457
                                                    <html:text styleClass="form-control" property="planoEstudos.descPlanoSiges"/>
458
                                                </div>
459
                                            </div>
460
                                        </div>
461
                                    </div>
462
 
1516 jmachado 463
                                    <html:hidden property="planoEstudos.siges"/>
464
                                    <html:hidden property="planoEstudos.nome"/>
465
                                    <html:hidden property="planoEstudos.dep"/>
1517 jmachado 466
                                    <nested:size id="tamanhoSemestre" property="planoEstudos.semestre"/>
467
                                    <nested:iterate id="semestre" indexId="semestreIndexId" property="planoEstudos.semestre" type="pt.estgp.estgweb.services.courses.xsd.Curso.Semestre">
468
                                        <div class="panel panel-primary">
1516 jmachado 469
                                            <div class="panel-heading">
470
 
471
                                                <div class="form-group">
472
                                                    <%
473
                                                        dummyIndexSemestreId++;
474
                                                        request.setAttribute("dummyIndexSemestreId",dummyIndexSemestreId);
475
                                                    %>
476
                                                    <nested:hidden property="semestreId" value="semestreDummy${dummyIndexSemestreId}"/>
1517 jmachado 477
                                                    <div class="col-sm-2">
478
                                                        <button type="button" class="btn btn-warning" onclick="sendUpSemestre('<%=dummyIndexSemestreId%>',this.form)">
479
                                                            <span class="glyphicon glyphicon-arrow-up"> </span>
480
                                                        </button>
481
                                                        <button type="button" class="btn btn-warning" onclick="sendDownSemestre('<%=dummyIndexSemestreId%>',this.form)">
482
                                                            <span class="glyphicon glyphicon-arrow-down"> </span>
483
                                                        </button>
1516 jmachado 484
                                                        <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()">
485
                                                            <span class="glyphicon glyphicon-remove"> </span>
1507 jmachado 486
                                                        </button>
1505 jmachado 487
                                                    </div>
1516 jmachado 488
                                                    <div class="col-sm-1">
489
                                                        Duração
490
                                                    </div>
1517 jmachado 491
                                                    <div class="col-sm-3">
492
                                                        <script>
493
                                                            $(document).ready(
494
                                                                    function()
495
                                                                    {
496
                                                                        showHideSemestreDesc${dummyIndexSemestreId}();
497
                                                                    }
498
                                                            );
499
 
500
 
501
                                                            function showHideSemestreDesc${dummyIndexSemestreId}()
502
                                                            {
503
                                                                if($("#selectSemestreDesc${dummyIndexSemestreId}").val()=='OP')
504
                                                                {
505
                                                                    $('#semestreDescContainer${dummyIndexSemestreId}').show();
506
                                                                }
507
                                                                else
508
                                                                {
509
                                                                    $('#semestreDescContainer${dummyIndexSemestreId}').hide();
510
                                                                }
511
                                                            }
512
                                                        </script>
513
                                                        <nested:select styleClass="form-control" property="id" styleId="selectSemestreDesc${dummyIndexSemestreId}" onchange="showHideSemestreDesc${dummyIndexSemestreId}(this)">
1516 jmachado 514
                                                            <html:option value="S1">Semestre 1</html:option>
515
                                                            <html:option value="S2">Semestre 2</html:option>
516
                                                            <html:option value="S3">Semestre 3</html:option>
517
                                                            <html:option value="S4">Semestre 4</html:option>
518
                                                            <html:option value="S5">Semestre 5</html:option>
519
                                                            <html:option value="S6">Semestre 6</html:option>
1534 jmachado 520
                                                            <html:option value="S7">Semestre 7</html:option>
521
                                                            <html:option value="S8">Semestre 8</html:option>
1528 jmachado 522
                                                            <html:option value="A1">Anual 1</html:option>
523
                                                            <html:option value="A2">Anual 2</html:option>
524
                                                            <html:option value="A3">Anual 3</html:option>
525
                                                            <html:option value="A4">Anual 4</html:option>
1516 jmachado 526
                                                            <html:option value="T1">Trimestre 1</html:option>
527
                                                            <html:option value="T2">Trimestre 2</html:option>
528
                                                            <html:option value="T3">Trimestre 3</html:option>
529
                                                            <html:option value="T4">Trimestre 4</html:option>
530
                                                            <html:option value="T5">Trimestre 5</html:option>
531
                                                            <html:option value="T6">Trimestre 6</html:option>
532
                                                            <html:option value="T7">Trimestre 7</html:option>
533
                                                            <html:option value="T8">Trimestre 8</html:option>
1517 jmachado 534
                                                            <html:option value="OP">Opcionais</html:option>
1516 jmachado 535
                                                        </nested:select>
1517 jmachado 536
                                                        <div id="semestreDescContainer${dummyIndexSemestreId}">
537
                                                            Descrição (PT) <nested:text property="semestreDesc" styleClass="form-control"/>
538
                                                            Descrição (EN) <nested:text property="semestreDescEn" styleClass="form-control"/>
539
                                                            Descrição (ES) <nested:text property="semestreDescEs" styleClass="form-control"/>
540
                                                            Descrição (FR) <nested:text property="semestreDescFr" styleClass="form-control"/>
541
                                                        </div>
1516 jmachado 542
                                                    </div>
543
                                                    <div class="col-sm-6">
1507 jmachado 544
 
1516 jmachado 545
                                                        <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()">
546
                                                            <span class="glyphicon glyphicon-plus"> </span> Unidade
547
                                                        </button>
548
 
549
                                                        <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()">
550
                                                            <span class="glyphicon glyphicon-plus"> </span> Perfil
551
                                                        </button>
552
 
553
                                                        <a name="semestreDummy${dummyIndexSemestreId}"></a>
554
                                                    </div>
555
                                                </div>
556
                                            </div>
557
                                            <div class="panel-body">
558
 
1521 jmachado 559
                                                <div class="form-group">
1516 jmachado 560
 
1521 jmachado 561
                                                    <div class="col-sm-2">
562
                                                        Notas do Semestre (Pode ser utilizado para mostrar Optativas)
563
                                                    </div>
564
                                                    <div class="col-sm-10">
565
                                                        <nested:textarea property="notas" rows="5" styleClass="form-control"/>
566
                                                    </div>
567
                                                </div>
568
 
1516 jmachado 569
                                                <button class="btn btn-default" data-toggle="collapse" type="button" data-target=".langs">Ver Campos Multingua</button>
1517 jmachado 570
 
571
                                                <nested:size id="tamanhoPerfil" property="perfil"/>
572
                                                <nested:iterate id="perfil" indexId="perfilIndexId" property="perfil" type="pt.estgp.estgweb.services.courses.xsd.Curso.Semestre.Perfil">
1518 jmachado 573
                                                    <div class="panel panel-info">
1516 jmachado 574
                                                        <div class="panel-heading">
575
                                                            <div class="form-group">
1507 jmachado 576
                                                                <%
1516 jmachado 577
                                                                    dummyIndexPerfilId++;
578
                                                                    request.setAttribute("dummyIndexPerfilId",dummyIndexPerfilId);
1507 jmachado 579
                                                                %>
1516 jmachado 580
                                                                <a name="perfilDummy${dummyIndexPerfilId}"></a>
581
                                                                <nested:hidden property="perfilId" value="perfilDummy${dummyIndexPerfilId}"/>
1517 jmachado 582
                                                                <div class="col-sm-2">
583
                                                                    <button type="button" class="btn btn-warning" onclick="sendUpPerfil('<%=dummyIndexPerfilId%>',this.form,'semestreDummy${dummyIndexSemestreId}')">
584
                                                                        <span class="glyphicon glyphicon-arrow-up"> </span>
585
                                                                    </button>
586
                                                                    <button type="button" class="btn btn-warning" onclick="sendDownPerfil('<%=dummyIndexPerfilId%>',this.form,'semestreDummy${dummyIndexSemestreId}')">
587
                                                                        <span class="glyphicon glyphicon-arrow-down"> </span>
588
                                                                    </button>
1516 jmachado 589
                                                                    <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()">
590
                                                                        <span class="glyphicon glyphicon-remove"> </span>
591
                                                                    </button>
592
                                                                </div>
593
                                                                <div class="col-sm-1">
594
                                                                    Perfil
595
                                                                </div>
1517 jmachado 596
                                                                <div class="col-sm-5">
1516 jmachado 597
                                                                    <nested:text styleClass="form-control" property="nome"/>
598
                                                                </div>
599
                                                                <div  class="col-sm-4">
600
                                                                    <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()">
601
                                                                        <span class="glyphicon glyphicon-plus"> </span>  Unidade
602
                                                                    </button>
603
                                                                </div>
604
                                                            </div>
605
                                                        </div>
606
                                                        <div class="panel-body">
607
                                                            <table class="tablesorterfiltered">
608
                                                                <thead>
609
                                                                <tr>
610
                                                                    <td></td>
611
                                                                    <td></td>
612
                                                                    <th>SIGES</th>
613
                                                                    <th>Nome</th>
614
                                                                    <th>Total</th>
615
                                                                    <th>T</th>
616
                                                                    <th>TP</th>
617
                                                                    <th>P</th>
618
                                                                    <th>PL</th>
619
                                                                    <th>PD</th>
620
                                                                    <th>OT</th>
621
                                                                    <th>E</th>
622
                                                                    <th>S</th>
623
                                                                    <th>TC</th>
624
                                                                    <th>O</th>
625
                                                                    <th>ECTS</th>
626
                                                                    <th>URL UNIDADE</th>
627
                                                                    <th>FICHA URL</th>
628
                                                                </tr>
629
                                                                </thead>
630
                                                                <tbody>
631
                                                                <nested:size id="tamanho" property="unidade"/>
632
                                                                <nested:iterate id="unit" indexId="indexId"  property="unidade" type="pt.estgp.estgweb.services.courses.xsd.UnidadeType">
1507 jmachado 633
 
1516 jmachado 634
                                                                    <%
635
                                                                        dummyIndexIdUnidades++;
636
                                                                        request.setAttribute("dummyIndexIdUnidades","dummyIndex" + dummyIndexIdUnidades);
637
                                                                    %>
638
                                                                    <%
639
                                                                        int tamanhoMinus1 = tamanho - 1;
640
                                                                        request.setAttribute("tamanhoMinus1",tamanhoMinus1);
1507 jmachado 641
 
1516 jmachado 642
                                                                    %>
643
                                                                    <tr <nested:equal property="removed" value="true">class="hidden"</nested:equal>>
644
                                                                        <td class="text-nowrap">
645
 
1517 jmachado 646
                                                                            <%--
647
                                                                                Usando o dummyIndex apenas não colocamos botao de up na primeira de todas as unidades de todos os semestres
648
                                                                                Antes usavamos o indexId e trabalhavamos lista a lista considerando semestres e perfis independentes
649
                                                                            --%>
650
                                                                            <nested:notEqual value="dummyIndex1" name="dummyIndexIdUnidades">
1516 jmachado 651
                                                                                <button type="button" class="btn btn-warning" onclick="sendUpUnidadeCurricular(<%=dummyIndexIdUnidades%>)">
652
                                                                                    <span class="glyphicon glyphicon-arrow-up"> </span>
653
                                                                                </button>
1517 jmachado 654
                                                                            </nested:notEqual>
655
                                                                            <%
656
                                                                                boolean perfilMaximoAtingido = perfilIndexId >= tamanhoPerfil - 1;
657
                                                                                boolean semestreMaximoAtingido = semestreIndexId >= tamanhoSemestre - 1;
658
                                                                                boolean tamanhoMaximoAtingido = indexId >= tamanho - 1;
659
                                                                                if(!perfilMaximoAtingido || !semestreMaximoAtingido || !tamanhoMaximoAtingido)
660
                                                                                {
661
                                                                            %>
1516 jmachado 662
                                                                                <button type="button" class="btn btn-warning" onclick="sendDownUnidadeCurricular(<%=dummyIndexIdUnidades%>)">
663
                                                                                    <span class="glyphicon glyphicon-arrow-down"> </span>
664
                                                                                </button>
1517 jmachado 665
                                                                            <%
666
                                                                                }
667
                                                                            %>
1516 jmachado 668
                                                                        </td>
669
                                                                        <td>
670
                                                                            <nested:hidden styleId="removed${dummyIndexIdUnidades}" property="removed"/>
671
                                                                            <button type="button" class="btn btn-danger" onclick="removeUnit(<%=dummyIndexIdUnidades%>)">
672
                                                                                <span class="glyphicon glyphicon-remove"> </span>
1507 jmachado 673
                                                                            </button>
1516 jmachado 674
                                                                        </td>
675
                                                                        <td>
1519 jmachado 676
                                                                            <script>
677
                                                                                $(document).ready(
678
                                                                                        function()
679
                                                                                        {
680
                                                                                            $("#siges${dummyIndexIdUnidades}").focusout(
681
                                                                                                    function(){
682
                                                                                                        var code = $("#siges${dummyIndexIdUnidades}").val();
683
                                                                                                        $.getJSON("<%=request.getContextPath()%>/user/courses/courseApiJson.jsp",
684
                                                                                                                { service:"findCourseUnit",
685
                                                                                                                  siges: code,
686
                                                                                                                  courseSigesCode: "${course.code}"
687
                                                                                                                },
688
                                                                                                                function(data)
689
                                                                                                                {
690
                                                                                                                    if(data.response == "ok")
691
                                                                                                                    {
692
                                                                                                                        $("#nome${dummyIndexIdUnidades}").val(data.courseUnitName);
693
                                                                                                                        $("#sigesResponse${dummyIndexIdUnidades}").html("");
694
                                                                                                                    }
695
                                                                                                                    else
696
                                                                                                                    {
697
                                                                                                                        $("#sigesResponse${dummyIndexIdUnidades}").html("Não encontrado");
698
                                                                                                                    }
699
                                                                                                                }
700
                                                                                                        );
701
                                                                                                    }
702
                                                                                            );
703
                                                                                        }
704
                                                                                );
705
                                                                            </script>
706
 
707
                                                                            <nested:text styleId="siges${dummyIndexIdUnidades}" styleClass="form-control" property="siges"/>
708
                                                                            <div id="sigesResponse${dummyIndexIdUnidades}"></div>
709
                                                                        </td>
710
                                                                        <td>
1516 jmachado 711
                                                                            <div>
712
                                                                                <div class="col-sm-1">(PT)</div>
713
                                                                                <div class="col-sm-11"><nested:text styleId="nome${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nome"/></div>
1505 jmachado 714
 
1516 jmachado 715
                                                                                <div class="langs collapse" >
716
                                                                                    <div class="col-sm-1">(EN)</div>
717
                                                                                    <div class="col-sm-11"><nested:text styleId="nomeEn${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEn"/></div>
718
                                                                                    <div class="col-sm-1">(ES)</div>
719
                                                                                    <div class="col-sm-11"><nested:text styleId="nomeEs${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEs"/></div>
720
                                                                                    <div class="col-sm-1">(FR)</div>
721
                                                                                    <div class="col-sm-11"><nested:text styleId="nomeFr${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeFr"/></div>
722
                                                                                </div>
1505 jmachado 723
                                                                            </div>
724
 
1516 jmachado 725
                                                                        </td>
726
                                                                        <td><nested:text styleClass="form-control" styleId="totalHoras${dummyIndexIdUnidades}" property="totalHoras"/></td>
727
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoT${dummyIndexIdUnidades}" property="horasContacto.t"/></td>
728
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoTP${dummyIndexIdUnidades}" property="horasContacto.TP"/></td>
729
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoP${dummyIndexIdUnidades}" property="horasContacto.p"/></td>
730
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoPL${dummyIndexIdUnidades}" property="horasContacto.PL"/></td>
731
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoPD${dummyIndexIdUnidades}" property="horasContacto.PD"/></td>
732
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoOT${dummyIndexIdUnidades}" property="horasContacto.OT"/></td>
733
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoE${dummyIndexIdUnidades}" property="horasContacto.e"/></td>
734
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoS${dummyIndexIdUnidades}" property="horasContacto.s"/></td>
735
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoTC${dummyIndexIdUnidades}" property="horasContacto.TC"/></td>
736
                                                                        <td><nested:text styleClass="form-control" styleId="horasContactoO${dummyIndexIdUnidades}" property="horasContacto.o"/></td>
737
                                                                        <td><nested:text styleClass="form-control" styleId="ECTS${dummyIndexIdUnidades}" property="ECTS"/></td>
738
                                                                        <td><nested:text styleClass="form-control" styleId="urlUnidadeCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlUnidadeCurricular"/></td>
1684 jmachado 739
                                                                        <td data-unit-semestre="${semestre.id}" data-course-siges-code="${courseSigesCode}" data-unit-siges-code="${unit.siges}" data-unit-ficha-url-target-id="urlFichaCurricular${dummyIndexIdUnidades}" data-unit-site-url-target-id="urlUnidadeCurricular${dummyIndexIdUnidades}">
740
                                                                            <nested:text styleClass="form-control" styleId="urlFichaCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlFichaCurricular"/>
741
                                                                        </td>
1516 jmachado 742
                                                                    </tr>
743
                                                                </nested:iterate>
744
                                                                </tbody>
745
                                                            </table>
746
                                                        </div>
1505 jmachado 747
                                                    </div>
748
 
1516 jmachado 749
                                                </nested:iterate>
1505 jmachado 750
 
1516 jmachado 751
                                                <nested:notEmpty property="unidade">
1507 jmachado 752
 
1516 jmachado 753
                                                    <table class="tablesorterfiltered">
754
                                                    <thead>
755
                                                        <tr>
756
                                                            <th></th>
757
                                                            <th></th>
758
                                                            <th>SIGES</th>
759
                                                            <th>Nome</th>
760
                                                            <th>Total</th>
761
                                                            <th>T</th>
762
                                                            <th>TP</th>
763
                                                            <th>P</th>
764
                                                            <th>PL</th>
765
                                                            <th>PD</th>
766
                                                            <th>OT</th>
767
                                                            <th>E</th>
768
                                                            <th>S</th>
769
                                                            <th>TC</th>
770
                                                            <th>O</th>
771
                                                            <th>ECTS</th>
772
                                                            <th>URL UNIDADE</th>
773
                                                            <th>FICHA URL</th>
774
                                                        </tr>
775
                                                    </thead>
776
                                                    <tbody>
777
                                                        <nested:size id="tamanho" property="unidade"/>
778
                                                        <nested:iterate id="unit" property="unidade" indexId="indexId"  type="pt.estgp.estgweb.services.courses.xsd.UnidadeType">
779
                                                            <%
780
                                                                dummyIndexIdUnidades++;
781
                                                                request.setAttribute("dummyIndexIdUnidades","dummyIndex" + dummyIndexIdUnidades);
782
                                                            %>
783
                                                            <%
784
                                                                int tamanhoMinus1 = tamanho - 1;
785
                                                                request.setAttribute("tamanhoMinus1",tamanhoMinus1);
1507 jmachado 786
 
1516 jmachado 787
                                                            %>
1507 jmachado 788
 
1516 jmachado 789
                                                            <tr <nested:equal property="removed" value="true">class="hidden"</nested:equal>>
790
                                                                <td class="text-nowrap">
1507 jmachado 791
 
1517 jmachado 792
                                                                <%--
793
                                                                           Usando o dummyIndex apenas não colocamos botao de up na primeira de todas as unidades de todos os semestres
794
                                                                           Antes usavamos o indexId e trabalhavamos lista a lista considerando semestres e perfis independentes
795
                                                                   --%>
796
                                                                    <nested:notEqual value="dummyIndex1" name="dummyIndexIdUnidades">
1516 jmachado 797
                                                                        <button type="button" class="btn btn-warning" onclick="sendUpUnidadeCurricular(<%=dummyIndexIdUnidades%>)">
798
                                                                            <span class="glyphicon glyphicon-arrow-up"> </span>
799
                                                                        </button>
1517 jmachado 800
                                                                    </nested:notEqual>
801
                                                                    <%
802
                                                                        boolean semestreMaximoAtingido = semestreIndexId >= tamanhoSemestre - 1;
803
                                                                        boolean tamanhoMaximoAtingido = indexId >= tamanho - 1;
804
                                                                        if(!semestreMaximoAtingido || !tamanhoMaximoAtingido)
805
                                                                        {
806
                                                                    %>
807
                                                                    <button type="button" class="btn btn-warning" onclick="sendDownUnidadeCurricular(<%=dummyIndexIdUnidades%>)">
808
                                                                        <span class="glyphicon glyphicon-arrow-down"> </span>
809
                                                                    </button>
810
                                                                    <%
811
                                                                        }
812
                                                                    %>
1516 jmachado 813
                                                                </td>
814
                                                                <td>
815
                                                                    <nested:hidden styleId="removed${dummyIndexIdUnidades}" property="removed"/>
816
                                                                    <button type="button" class="btn btn-danger" onclick="removeUnit(<%=dummyIndexIdUnidades%>)" >
817
                                                                        <span class="glyphicon glyphicon-remove"> </span>
1507 jmachado 818
                                                                    </button>
1516 jmachado 819
                                                                </td>
820
                                                                <td>
1520 jmachado 821
                                                                    <script>
822
                                                                        $(document).ready(
823
                                                                                function()
824
                                                                                {
825
                                                                                    $("#siges${dummyIndexIdUnidades}").focusout(
826
                                                                                            function(){
827
                                                                                                var code = $("#siges${dummyIndexIdUnidades}").val();
828
                                                                                                $.getJSON("<%=request.getContextPath()%>/user/courses/courseApiJson.jsp",
829
                                                                                                        { service:"findCourseUnit",
830
                                                                                                            siges: code,
831
                                                                                                            courseSigesCode: "${course.code}"
832
                                                                                                        },
833
                                                                                                        function(data)
834
                                                                                                        {
835
                                                                                                            if(data.response == "ok")
836
                                                                                                            {
837
                                                                                                                $("#nome${dummyIndexIdUnidades}").val(data.courseUnitName);
838
                                                                                                                $("#sigesResponse${dummyIndexIdUnidades}").html("");
839
                                                                                                            }
840
                                                                                                            else
841
                                                                                                            {
842
                                                                                                                $("#sigesResponse${dummyIndexIdUnidades}").html("Não encontrado");
843
                                                                                                            }
844
                                                                                                        }
845
                                                                                                );
846
                                                                                            }
847
                                                                                    );
848
                                                                                }
849
                                                                        );
850
                                                                    </script>
851
                                                                    <nested:text styleId="siges${dummyIndexIdUnidades}" styleClass="form-control" property="siges"/>
852
                                                                    <div id="sigesResponse${dummyIndexIdUnidades}"></div>
853
                                                                </td>
854
 
855
                                                                <td>
1516 jmachado 856
                                                                    <div>
857
                                                                        <div class="col-sm-1">(PT)</div>
1520 jmachado 858
                                                                        <div class="col-sm-11">
859
                                                                            <nested:text styleId="nome${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nome"/>
860
                                                                        </div>
1505 jmachado 861
 
1516 jmachado 862
                                                                        <div class="langs collapse" >
863
                                                                            <div class="col-sm-1">(EN)</div>
864
                                                                            <div class="col-sm-11"><nested:text styleId="nomeEn${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEn"/></div>
865
                                                                            <div class="col-sm-1">(ES)</div>
866
                                                                            <div class="col-sm-11"><nested:text styleId="nomeEs${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeEs"/></div>
867
                                                                            <div class="col-sm-1">(FR)</div>
868
                                                                            <div class="col-sm-11"><nested:text styleId="nomeFr${dummyIndexIdUnidades}" style="width:300px" styleClass="form-control" property="nomeFr"/></div>
869
                                                                        </div>
1505 jmachado 870
                                                                    </div>
871
 
1516 jmachado 872
                                                                </td>
873
                                                                <td><nested:text styleClass="form-control" styleId="totalHoras${dummyIndexIdUnidades}" property="totalHoras"/></td>
874
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoT${dummyIndexIdUnidades}" property="horasContacto.t"/></td>
875
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoTP${dummyIndexIdUnidades}" property="horasContacto.TP"/></td>
876
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoP${dummyIndexIdUnidades}" property="horasContacto.p"/></td>
877
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoPL${dummyIndexIdUnidades}" property="horasContacto.PL"/></td>
878
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoPD${dummyIndexIdUnidades}" property="horasContacto.PD"/></td>
879
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoOT${dummyIndexIdUnidades}" property="horasContacto.OT"/></td>
880
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoE${dummyIndexIdUnidades}" property="horasContacto.e"/></td>
881
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoS${dummyIndexIdUnidades}" property="horasContacto.s"/></td>
882
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoTC${dummyIndexIdUnidades}" property="horasContacto.TC"/></td>
883
                                                                <td><nested:text styleClass="form-control" styleId="horasContactoO${dummyIndexIdUnidades}" property="horasContacto.o"/></td>
884
                                                                <td><nested:text styleClass="form-control" styleId="ECTS${dummyIndexIdUnidades}" property="ECTS"/></td>
885
                                                                <td><nested:text styleClass="form-control" styleId="urlUnidadeCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlUnidadeCurricular"/></td>
1684 jmachado 886
                                                                <td data-unit-semestre="${semestre.id}" data-course-siges-code="${courseSigesCode}" data-unit-siges-code="${unit.siges}" data-unit-ficha-url-target-id="urlFichaCurricular${dummyIndexIdUnidades}" data-unit-site-url-target-id="urlUnidadeCurricular${dummyIndexIdUnidades}">
887
                                                                    <nested:text styleClass="form-control" styleId="urlFichaCurricular${dummyIndexIdUnidades}" style="width:600px" property="urlFichaCurricular"/>
888
                                                                </td>
1516 jmachado 889
                                                            </tr>
890
                                                        </nested:iterate>
891
                                                    </tbody>
892
                                                </table>
893
                                                </nested:notEmpty>
1507 jmachado 894
 
1516 jmachado 895
                                            </div>
1505 jmachado 896
                                        </div>
897
 
1516 jmachado 898
                                    </nested:iterate>
1505 jmachado 899
 
1516 jmachado 900
                                </nested:notEmpty>
1505 jmachado 901
 
1516 jmachado 902
                                <a type="button" class="btn btn-danger" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=${courseId}">Cancelar</a>
903
                                <html:submit styleClass="btn btn-success" >Salvar</html:submit>
1505 jmachado 904
 
905
 
906
 
1516 jmachado 907
 
908
                    </div>
1505 jmachado 909
                </div>
1516 jmachado 910
            </html:form>
1505 jmachado 911
        </div>
912
    </div>
913
 
914
<%
915
 
916
    AbstractDao.getCurrentSession().getTransaction().commit();
917
%>
918