Rev 1516 | Rev 1539 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1506 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.CourseDepartment" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.Teacher" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.User" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
6 | <%@ page import="pt.estgp.estgweb.domain.views.UserView" %> |
||
507 | jmachado | 7 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
1506 | jmachado | 8 | <%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %> |
507 | jmachado | 9 | <%@ page import="java.util.ArrayList" %> |
1506 | jmachado | 10 | <%@ page import="java.util.Collection" %> |
11 | <%@ page import="java.util.List" %> |
||
214 | jmachado | 12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
13 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
17 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
18 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
19 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
20 | <jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/> |
||
1133 | jmachado | 21 | <script> |
22 | function alertPermissions() |
||
23 | { |
||
1285 | jmachado | 24 | alert("Aviso a transmitir ao Centro Informático. Este procedimento afecta as permissões atuais no sistema de ficheiros da intranet. Após salvar estas alterações, por favor gere o BAT de geração de pastas e corra-o novamente na raiz do servidor IONLINE") |
1133 | jmachado | 25 | } |
26 | function alertFolders(place) |
||
27 | { |
||
1285 | jmachado | 28 | alert("Aviso a transmitir ao Centro Informático. Caro administrador, lembramos-lhe que alterar o " + place + " de uma unidade curricular implica trocar a pasta de ficheiros da intranet do " + place + " onde esta se encontrava para o " + place + " onde actualmente se encontra. O BACO irá actualizar a nova LOCALIZAÇÃO da pasta de ficheiros na sua base de dados. Mas a pasta terá de ser fisicamente alterada pela administração de sistemas."); |
1133 | jmachado | 29 | } |
30 | |||
31 | </script> |
||
444 | jmachado | 32 | <html:errors/> |
33 | <jomm:messages/> |
||
1506 | jmachado | 34 | <html:form styleClass="form-horizontal" action="/user/courseControllerFromServiceZone" enctype="multipart/form-data"> |
214 | jmachado | 35 | <input type="hidden" name="dispatch" value="submit"/> |
36 | <html:hidden property="courseView.id"/> |
||
1506 | jmachado | 37 | <jsp:useBean id="CourseForm" type="pt.estgp.estgweb.web.form.courses.CourseForm" scope="request"/> |
248 | jmachado | 38 | <logic:present name="CourseView" property="htmlResult"> |
39 | <pre class="log"> |
||
40 | <bean:write name="CourseView" property="htmlResult"/> |
||
41 | </pre> |
||
42 | </logic:present> |
||
1133 | jmachado | 43 | |
1506 | jmachado | 44 | <div class="panel panel-default"> |
45 | <div class="panel-body"> |
||
376 | jmachado | 46 | |
1506 | jmachado | 47 | <div class="form-group"> |
48 | <label class="control-label col-sm-2"><bean:message key="course.code"/></label> |
||
49 | <div class="col-sm-10"> |
||
50 | <html:text styleClass="form-control" property="courseView.code" size="20"/> |
||
51 | </div> |
||
52 | </div> |
||
53 | <div class="form-group"> |
||
54 | <label class="control-label col-sm-2"><bean:message key="course.area"/></label> |
||
55 | <div class="col-sm-10"> |
||
1505 | jmachado | 56 | <% |
57 | AbstractDao.getCurrentSession().beginTransaction(); |
||
58 | List<CourseDepartment> departments = DaoFactory.getCourseDepartmentDaoImpl().findActives(); |
||
1506 | jmachado | 59 | request.setAttribute("departaments",departments); |
1505 | jmachado | 60 | %> |
1506 | jmachado | 61 | <html:select styleClass="form-control" property="courseView.area"> |
1505 | jmachado | 62 | <html:option value="">Nenhum</html:option> |
63 | <logic:iterate id="area" name="departaments" type="pt.estgp.estgweb.domain.CourseDepartmentImpl"> |
||
64 | <html:option value="${area.sigla}">${area.schoolFromInstitutionalCode} - ${area.name}</html:option> |
||
376 | jmachado | 65 | </logic:iterate> |
66 | </html:select> |
||
1505 | jmachado | 67 | <% |
68 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
69 | %> |
||
1506 | jmachado | 70 | </div> |
71 | </div> |
||
72 | <div class="form-group"> |
||
73 | <label class="control-label col-sm-2"><bean:message key="name"/> PT</label> |
||
74 | <div class="col-sm-10"> |
||
75 | <html:text styleClass="form-control" property="courseView.name" size="20"/> |
||
76 | </div> |
||
77 | </div> |
||
78 | <div class="form-group"> |
||
79 | <label class="control-label col-sm-2"><bean:message key="name"/> EN</label> |
||
80 | <div class="col-sm-10"> |
||
81 | <html:text styleClass="form-control" property="courseView.nameEn" size="20"/> |
||
82 | </div> |
||
83 | </div> |
||
84 | <div class="form-group"> |
||
85 | <label class="control-label col-sm-2"><bean:message key="name"/> ES</label> |
||
86 | <div class="col-sm-10"> |
||
87 | <html:text styleClass="form-control" property="courseView.nameEs" size="20"/> |
||
88 | </div> |
||
89 | </div> |
||
90 | <div class="form-group"> |
||
91 | <label class="control-label col-sm-2"><bean:message key="name"/> FR</label> |
||
92 | <div class="col-sm-10"> |
||
93 | <html:text styleClass="form-control" property="courseView.nameFr" size="20"/> |
||
94 | </div> |
||
95 | </div> |
||
96 | <div class="form-group"> |
||
97 | <label class="control-label col-sm-2"><bean:message key="course.description"/></label> |
||
98 | <div class="col-sm-10"> |
||
99 | <html:textarea styleClass="form-control" property="courseView.description"/> |
||
100 | </div> |
||
101 | </div> |
||
102 | <div class="form-group"> |
||
103 | <label class="control-label col-sm-2"><bean:message key="status"/></label> |
||
104 | <div class="col-sm-10"> |
||
105 | <html:select styleClass="form-control" property="courseView.status"> |
||
797 | jmachado | 106 | <html:option value="true"><bean:message key="yes"/></html:option> |
107 | <html:option value="false"><bean:message key="no"/></html:option> |
||
790 | jmachado | 108 | </html:select> |
1506 | jmachado | 109 | </div> |
110 | </div> |
||
111 | <div class="form-group"> |
||
1521 | jmachado | 112 | <label class="control-label col-sm-2">Mostrar Plano Estudos na API (Sites Externos/ex: Site IPP)</label> |
113 | <div class="col-sm-10"> |
||
114 | <html:select styleClass="form-control" property="courseView.showStudiesPlan"> |
||
115 | <html:option value="true"><bean:message key="yes"/></html:option> |
||
116 | <html:option value="false"><bean:message key="no"/></html:option> |
||
117 | </html:select> |
||
118 | </div> |
||
119 | </div> |
||
120 | <div class="form-group"> |
||
1507 | jmachado | 121 | <label class="control-label col-sm-2"><bean:message key="course.degree"/></label> |
1506 | jmachado | 122 | <div class="col-sm-10"> |
123 | <html:select styleClass="form-control" property="courseView.degree"> |
||
249 | jmachado | 124 | <html:option value="B"><bean:message key="course.B"/></html:option> |
125 | <html:option value="L"><bean:message key="course.L"/></html:option> |
||
126 | <html:option value="M"><bean:message key="course.M"/></html:option> |
||
127 | <html:option value="P"><bean:message key="course.P"/></html:option> |
||
128 | <html:option value="E"><bean:message key="course.E"/></html:option> |
||
417 | jmachado | 129 | <html:option value="A"><bean:message key="course.A"/></html:option> |
130 | <html:option value="C"><bean:message key="course.C"/></html:option> |
||
131 | <html:option value="O"><bean:message key="course.O"/></html:option> |
||
896 | jmachado | 132 | <html:option value="T"><bean:message key="course.T"/></html:option> |
214 | jmachado | 133 | </html:select> |
1133 | jmachado | 134 | ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento |
1506 | jmachado | 135 | </div> |
136 | </div> |
||
1312 | jmachado | 137 | <logic:notEmpty name="CourseForm" property="courseView.courseYearViews"> |
1506 | jmachado | 138 | <div class="form-group"> |
139 | <label class="control-label col-sm-2">Politica de Separação de Turmas</label> |
||
140 | <div class="col-sm-10"> |
||
1312 | jmachado | 141 | <table class="tablesorterfiltered"> |
142 | <thead> |
||
143 | <tr> |
||
144 | <th>Ano Lectivo</th> |
||
145 | <th>Usar Turmas Separadas</th> |
||
146 | <th>Ultima alteração</th> |
||
147 | </tr> |
||
148 | </thead> |
||
149 | <tbody> |
||
1506 | jmachado | 150 | <nested:iterate id="cyv" property="courseView.courseYearViews" type="pt.estgp.estgweb.domain.views.CourseView.CourseYearView"> |
151 | <tr> |
||
152 | <td>${cyv.importYear}</td> |
||
153 | <td><nested:hidden property="id"/> |
||
154 | <nested:checkbox property="separatedTurmas"/></td> |
||
155 | <td>${cyv.updateDate}</td> |
||
156 | </tr> |
||
157 | </nested:iterate> |
||
1312 | jmachado | 158 | </tbody> |
159 | </table> |
||
1506 | jmachado | 160 | </div> |
161 | </div> |
||
1312 | jmachado | 162 | </logic:notEmpty> |
1506 | jmachado | 163 | <div class="form-group"> |
164 | <label class="control-label col-sm-2"><bean:message key="course.importYear"/></label> |
||
165 | <div class="col-sm-10"> |
||
166 | <html:select styleClass="form-control" property="courseView.importYear"> |
||
214 | jmachado | 167 | <logic:iterate id="item" name="CourseForm" property="importYears"> |
168 | <html:option value="${item}">${item}</html:option> |
||
169 | </logic:iterate> |
||
170 | </html:select> |
||
1506 | jmachado | 171 | </div> |
172 | </div> |
||
173 | |||
174 | <div class="form-group"> |
||
175 | <label class="control-label col-sm-2"><bean:message key="course.institutionalCode"/></label> |
||
176 | <div class="col-sm-10"> |
||
1505 | jmachado | 177 | <!--Dependente do app.properties--> |
1506 | jmachado | 178 | <html:select styleClass="form-control" property="courseView.institutionalCode"> |
1505 | jmachado | 179 | <html:option value="1"><%=ConfigProperties.getProperty("institution.code.prefix.1")%></html:option> |
180 | <html:option value="2"><%=ConfigProperties.getProperty("institution.code.prefix.2")%></html:option> |
||
181 | <html:option value="3"><%=ConfigProperties.getProperty("institution.code.prefix.3")%></html:option> |
||
182 | <html:option value="4"><%=ConfigProperties.getProperty("institution.code.prefix.4")%></html:option> |
||
183 | </html:select> |
||
1506 | jmachado | 184 | </div> |
185 | </div> |
||
1505 | jmachado | 186 | |
1506 | jmachado | 187 | <div class="form-group"> |
188 | <label class="control-label col-sm-2"><bean:message key="course.userGroupStudents"/></label> |
||
189 | <div class="col-sm-10"> |
||
190 | <html:text styleClass="form-control" onchange="alertPermissions()" property="courseView.userGroupStudents"/> |
||
191 | </div> |
||
192 | </div> |
||
901 | jmachado | 193 | |
194 | |||
1506 | jmachado | 195 | <div class="form-group"> |
196 | <label class="control-label col-sm-2"><bean:message key="course.coordinator"/></label> |
||
197 | <div class="col-sm-10"> |
||
198 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.coordinator.id"> |
||
214 | jmachado | 199 | <html:option value="0"> |
200 | <bean:message key="none"/> |
||
201 | </html:option> |
||
202 | <logic:present name="CourseForm" property="teachers"> |
||
203 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
204 | <html:option value="${teacher.id}"> |
||
205 | (${teacher.code}) ${teacher.name} |
||
206 | </html:option> |
||
207 | </logic:iterate> |
||
208 | </logic:present> |
||
209 | </html:select> |
||
1506 | jmachado | 210 | </div> |
211 | </div> |
||
507 | jmachado | 212 | |
1506 | jmachado | 213 | <div class="form-group"> |
214 | <label class="control-label col-sm-2"><bean:message key="course.validation.role"/></label> |
||
215 | <div class="col-sm-10"> |
||
216 | <% |
||
507 | jmachado | 217 | List<String> targetRoles = new ArrayList<String>(); |
1283 | jmachado | 218 | for(String role: UserRoleProxy.getUserRoles()) |
507 | jmachado | 219 | { |
1506 | jmachado | 220 | if(role.startsWith("courseValidateProgram")) |
221 | targetRoles.add(role); |
||
507 | jmachado | 222 | } |
223 | request.setAttribute("targetRoles",targetRoles); |
||
1506 | jmachado | 224 | %> |
225 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.validationRole"> |
||
226 | <logic:iterate id="role" name="targetRoles"> |
||
227 | <html:option value="${role}" key="user.role.${role}"/> |
||
507 | jmachado | 228 | </logic:iterate> |
229 | </html:select> |
||
1506 | jmachado | 230 | </div> |
231 | </div> |
||
249 | jmachado | 232 | |
1506 | jmachado | 233 | <div class="form-group"> |
234 | <label class="control-label col-sm-2">Membros da Comissão</label> |
||
235 | <div class="col-sm-10"> |
||
507 | jmachado | 236 | |
237 | |||
238 | |||
1506 | jmachado | 239 | <% |
240 | request.setAttribute("teachersForComissions", CourseForm.getTeachers()); |
||
241 | request.setAttribute("courseIdForComissions", CourseView.getId()); |
||
1507 | jmachado | 242 | //CourseView needed ja la esta neste caso |
1506 | jmachado | 243 | %> |
507 | jmachado | 244 | |
1507 | jmachado | 245 | <jsp:include page="courseComissionEditPanel.jsp"/> |
1506 | jmachado | 246 | <%-- // PAINEL INDEPENDENTE PARA GERIR COMISSAO DE CURSO --%> |
247 | </div> |
||
248 | </div> |
||
249 | |||
250 | |||
251 | <div class="form-group"> |
||
252 | <label class="control-label col-sm-2"><bean:message key="course.externalSite"/></label> |
||
253 | <div class="col-sm-10"> |
||
254 | <html:select styleClass="form-control" property="courseView.externalSiteServer"> |
||
249 | jmachado | 255 | <html:option value="estgp">ESTG</html:option> |
256 | </html:select> |
||
1506 | jmachado | 257 | <html:text styleClass="form-control" property="courseView.externalSitePath"/> |
258 | </div> |
||
259 | </div> |
||
260 | |||
261 | <div class="form-group"> |
||
262 | <label class="control-label col-sm-2"><bean:message key="course.studies.plan"/>(VERSAO ANTIGA)</label> |
||
263 | <div class="col-sm-10"> |
||
264 | <baco:isAdmin> |
||
265 | <html:file styleClass="form-control" property="studiesPlan"/> |
||
266 | </baco:isAdmin> |
||
267 | <baco:isNotAdmin> |
||
268 | <html:file disabled="true" styleClass="form-control" property="studiesPlan"/> |
||
269 | </baco:isNotAdmin> |
||
270 | |||
214 | jmachado | 271 | <logic:present name="CourseView" property="studiesPlan"> |
1506 | jmachado | 272 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/> XML antigo</a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate}) |
214 | jmachado | 273 | </logic:present> |
274 | <logic:notPresent name="CourseView" property="studiesPlan"> |
||
275 | <bean:message key="course.studies.plan.not.available"/> |
||
276 | </logic:notPresent> |
||
1505 | jmachado | 277 | |
1506 | jmachado | 278 | </div> |
279 | </div> |
||
280 | |||
281 | |||
1507 | jmachado | 282 | |
1506 | jmachado | 283 | <div class="form-group"> |
284 | <label class="control-label col-sm-2"> |
||
285 | <bean:message key="course.studies.plan"/>(Versão nova PAE) |
||
1513 | jmachado | 286 | |
1507 | jmachado | 287 | <baco:hasRole role="admin,all,servicesStudiesPlans"> |
1516 | jmachado | 288 | <a class="btn btn-warning" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=<%=CourseView.getId()%>"> |
289 | <span class="glyphicon glyphicon-pencil"></span> Gerir Planos</a> |
||
1507 | jmachado | 290 | </baco:hasRole> |
291 | <baco:hasNotRole role="admin,all,servicesStudiesPlans"> |
||
292 | <label class="text-info"> Necessita do papel de Gestão de Planos de Estudos para editar os planos</label> |
||
1513 | jmachado | 293 | </baco:hasNotRole> |
1506 | jmachado | 294 | </label> |
295 | <div class="col-sm-10"> |
||
1505 | jmachado | 296 | <logic:present name="CourseView" property="courseStudiesPlans"> |
297 | <table class="tablesorterfiltered"> |
||
298 | <thead> |
||
299 | <tr> |
||
300 | <th>Versão</th> |
||
301 | <th>Data Produção</th> |
||
302 | <th>Ultima alteração</th> |
||
303 | <th>Descrição</th> |
||
304 | </tr> |
||
305 | </thead> |
||
306 | <tbody> |
||
307 | <logic:iterate id="studyPlan" name="CourseView" property="courseStudiesPlans" type="pt.estgp.estgweb.domain.CourseStudiesPlan"> |
||
308 | <tr> |
||
309 | <td>${studyPlan.version}</td> |
||
310 | <td>${studyPlan.saveDate}</td> |
||
311 | <td>${studyPlan.updateDate}</td> |
||
312 | <td>${studyPlan.versionDescription}</td> |
||
313 | </tr> |
||
314 | </logic:iterate> |
||
315 | </tbody> |
||
316 | </table> |
||
317 | </logic:present> |
||
1506 | jmachado | 318 | </div> |
319 | </div> |
||
1505 | jmachado | 320 | |
1506 | jmachado | 321 | |
322 | |||
1507 | jmachado | 323 | |
1506 | jmachado | 324 | <%-- |
325 | |||
326 | <tr> |
||
327 | <th> |
||
328 | <bean:message key="course.director"/> |
||
329 | </th> |
||
330 | <td> |
||
331 | <html:select onchange="alertPermissions()" property="courseView.director.id"> |
||
332 | <html:option value="0"> |
||
333 | <bean:message key="none"/> |
||
334 | </html:option> |
||
335 | <logic:present name="CourseForm" property="teachers"> |
||
336 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
337 | <html:option value="${teacher.id}"> |
||
338 | (${teacher.code}) ${teacher.name} |
||
339 | </html:option> |
||
340 | </logic:iterate> |
||
341 | </logic:present> |
||
342 | </html:select> |
||
1505 | jmachado | 343 | </td> |
344 | </tr> |
||
1506 | jmachado | 345 | --%> |
214 | jmachado | 346 | |
1506 | jmachado | 347 | |
348 | |||
349 | |||
350 | |||
351 | |||
352 | <button class="btn btn-success" type="button" onclick="set(this.form,'submit');this.form.submit()"> |
||
353 | <bean:message key="confirm"/> |
||
354 | </button> |
||
355 | |||
356 | |||
357 | </div><!-- //panel-body--> |
||
358 | </div><!-- //panel panel-default--> |
||
359 | |||
214 | jmachado | 360 | </html:form> |