Rev 1506 | Rev 1509 | 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"> |
||
1507 | jmachado | 112 | <label class="control-label col-sm-2"><bean:message key="course.degree"/></label> |
1506 | jmachado | 113 | <div class="col-sm-10"> |
114 | <html:select styleClass="form-control" property="courseView.degree"> |
||
249 | jmachado | 115 | <html:option value="B"><bean:message key="course.B"/></html:option> |
116 | <html:option value="L"><bean:message key="course.L"/></html:option> |
||
117 | <html:option value="M"><bean:message key="course.M"/></html:option> |
||
118 | <html:option value="P"><bean:message key="course.P"/></html:option> |
||
119 | <html:option value="E"><bean:message key="course.E"/></html:option> |
||
417 | jmachado | 120 | <html:option value="A"><bean:message key="course.A"/></html:option> |
121 | <html:option value="C"><bean:message key="course.C"/></html:option> |
||
122 | <html:option value="O"><bean:message key="course.O"/></html:option> |
||
896 | jmachado | 123 | <html:option value="T"><bean:message key="course.T"/></html:option> |
214 | jmachado | 124 | </html:select> |
1133 | jmachado | 125 | ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento |
1506 | jmachado | 126 | </div> |
127 | </div> |
||
1312 | jmachado | 128 | <logic:notEmpty name="CourseForm" property="courseView.courseYearViews"> |
1506 | jmachado | 129 | <div class="form-group"> |
130 | <label class="control-label col-sm-2">Politica de Separação de Turmas</label> |
||
131 | <div class="col-sm-10"> |
||
1312 | jmachado | 132 | <table class="tablesorterfiltered"> |
133 | <thead> |
||
134 | <tr> |
||
135 | <th>Ano Lectivo</th> |
||
136 | <th>Usar Turmas Separadas</th> |
||
137 | <th>Ultima alteração</th> |
||
138 | </tr> |
||
139 | </thead> |
||
140 | <tbody> |
||
1506 | jmachado | 141 | <nested:iterate id="cyv" property="courseView.courseYearViews" type="pt.estgp.estgweb.domain.views.CourseView.CourseYearView"> |
142 | <tr> |
||
143 | <td>${cyv.importYear}</td> |
||
144 | <td><nested:hidden property="id"/> |
||
145 | <nested:checkbox property="separatedTurmas"/></td> |
||
146 | <td>${cyv.updateDate}</td> |
||
147 | </tr> |
||
148 | </nested:iterate> |
||
1312 | jmachado | 149 | </tbody> |
150 | </table> |
||
1506 | jmachado | 151 | </div> |
152 | </div> |
||
1312 | jmachado | 153 | </logic:notEmpty> |
1506 | jmachado | 154 | <div class="form-group"> |
155 | <label class="control-label col-sm-2"><bean:message key="course.importYear"/></label> |
||
156 | <div class="col-sm-10"> |
||
157 | <html:select styleClass="form-control" property="courseView.importYear"> |
||
214 | jmachado | 158 | <logic:iterate id="item" name="CourseForm" property="importYears"> |
159 | <html:option value="${item}">${item}</html:option> |
||
160 | </logic:iterate> |
||
161 | </html:select> |
||
1506 | jmachado | 162 | </div> |
163 | </div> |
||
164 | |||
165 | <div class="form-group"> |
||
166 | <label class="control-label col-sm-2"><bean:message key="course.institutionalCode"/></label> |
||
167 | <div class="col-sm-10"> |
||
1505 | jmachado | 168 | <!--Dependente do app.properties--> |
1506 | jmachado | 169 | <html:select styleClass="form-control" property="courseView.institutionalCode"> |
1505 | jmachado | 170 | <html:option value="1"><%=ConfigProperties.getProperty("institution.code.prefix.1")%></html:option> |
171 | <html:option value="2"><%=ConfigProperties.getProperty("institution.code.prefix.2")%></html:option> |
||
172 | <html:option value="3"><%=ConfigProperties.getProperty("institution.code.prefix.3")%></html:option> |
||
173 | <html:option value="4"><%=ConfigProperties.getProperty("institution.code.prefix.4")%></html:option> |
||
174 | </html:select> |
||
1506 | jmachado | 175 | </div> |
176 | </div> |
||
1505 | jmachado | 177 | |
1506 | jmachado | 178 | <div class="form-group"> |
179 | <label class="control-label col-sm-2"><bean:message key="course.userGroupStudents"/></label> |
||
180 | <div class="col-sm-10"> |
||
181 | <html:text styleClass="form-control" onchange="alertPermissions()" property="courseView.userGroupStudents"/> |
||
182 | </div> |
||
183 | </div> |
||
901 | jmachado | 184 | |
185 | |||
1506 | jmachado | 186 | <div class="form-group"> |
187 | <label class="control-label col-sm-2"><bean:message key="course.coordinator"/></label> |
||
188 | <div class="col-sm-10"> |
||
189 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.coordinator.id"> |
||
214 | jmachado | 190 | <html:option value="0"> |
191 | <bean:message key="none"/> |
||
192 | </html:option> |
||
193 | <logic:present name="CourseForm" property="teachers"> |
||
194 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
195 | <html:option value="${teacher.id}"> |
||
196 | (${teacher.code}) ${teacher.name} |
||
197 | </html:option> |
||
198 | </logic:iterate> |
||
199 | </logic:present> |
||
200 | </html:select> |
||
1506 | jmachado | 201 | </div> |
202 | </div> |
||
507 | jmachado | 203 | |
1506 | jmachado | 204 | <div class="form-group"> |
205 | <label class="control-label col-sm-2"><bean:message key="course.validation.role"/></label> |
||
206 | <div class="col-sm-10"> |
||
207 | <% |
||
507 | jmachado | 208 | List<String> targetRoles = new ArrayList<String>(); |
1283 | jmachado | 209 | for(String role: UserRoleProxy.getUserRoles()) |
507 | jmachado | 210 | { |
1506 | jmachado | 211 | if(role.startsWith("courseValidateProgram")) |
212 | targetRoles.add(role); |
||
507 | jmachado | 213 | } |
214 | request.setAttribute("targetRoles",targetRoles); |
||
1506 | jmachado | 215 | %> |
216 | <html:select styleClass="form-control" onchange="alertPermissions()" property="courseView.validationRole"> |
||
217 | <logic:iterate id="role" name="targetRoles"> |
||
218 | <html:option value="${role}" key="user.role.${role}"/> |
||
507 | jmachado | 219 | </logic:iterate> |
220 | </html:select> |
||
1506 | jmachado | 221 | </div> |
222 | </div> |
||
249 | jmachado | 223 | |
1506 | jmachado | 224 | <div class="form-group"> |
225 | <label class="control-label col-sm-2">Membros da Comissão</label> |
||
226 | <div class="col-sm-10"> |
||
507 | jmachado | 227 | |
228 | |||
229 | |||
1506 | jmachado | 230 | <% |
231 | request.setAttribute("teachersForComissions", CourseForm.getTeachers()); |
||
232 | request.setAttribute("courseIdForComissions", CourseView.getId()); |
||
1507 | jmachado | 233 | //CourseView needed ja la esta neste caso |
1506 | jmachado | 234 | %> |
507 | jmachado | 235 | |
1507 | jmachado | 236 | <jsp:include page="courseComissionEditPanel.jsp"/> |
1506 | jmachado | 237 | <%-- // PAINEL INDEPENDENTE PARA GERIR COMISSAO DE CURSO --%> |
238 | </div> |
||
239 | </div> |
||
240 | |||
241 | |||
242 | <div class="form-group"> |
||
243 | <label class="control-label col-sm-2"><bean:message key="course.externalSite"/></label> |
||
244 | <div class="col-sm-10"> |
||
245 | <html:select styleClass="form-control" property="courseView.externalSiteServer"> |
||
249 | jmachado | 246 | <html:option value="estgp">ESTG</html:option> |
247 | </html:select> |
||
1506 | jmachado | 248 | <html:text styleClass="form-control" property="courseView.externalSitePath"/> |
249 | </div> |
||
250 | </div> |
||
251 | |||
252 | <div class="form-group"> |
||
253 | <label class="control-label col-sm-2"><bean:message key="course.studies.plan"/>(VERSAO ANTIGA)</label> |
||
254 | <div class="col-sm-10"> |
||
255 | <baco:isAdmin> |
||
256 | <html:file styleClass="form-control" property="studiesPlan"/> |
||
257 | </baco:isAdmin> |
||
258 | <baco:isNotAdmin> |
||
259 | <html:file disabled="true" styleClass="form-control" property="studiesPlan"/> |
||
260 | </baco:isNotAdmin> |
||
261 | |||
214 | jmachado | 262 | <logic:present name="CourseView" property="studiesPlan"> |
1506 | jmachado | 263 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/> XML antigo</a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate}) |
214 | jmachado | 264 | </logic:present> |
265 | <logic:notPresent name="CourseView" property="studiesPlan"> |
||
266 | <bean:message key="course.studies.plan.not.available"/> |
||
267 | </logic:notPresent> |
||
1505 | jmachado | 268 | |
1506 | jmachado | 269 | </div> |
270 | </div> |
||
271 | |||
272 | |||
1507 | jmachado | 273 | |
1506 | jmachado | 274 | <div class="form-group"> |
275 | <label class="control-label col-sm-2"> |
||
276 | <bean:message key="course.studies.plan"/>(Versão nova PAE) |
||
1507 | jmachado | 277 | <baco:hasRole role="admin,all,servicesStudiesPlans"> |
278 | <a class="btn btn-default" href="<%=request.getContextPath()%>/user/adminStudyPlans.do?courseId=<%=CourseView.getId()%>">Gerir Planos</a> |
||
279 | </baco:hasRole> |
||
280 | <baco:hasNotRole role="admin,all,servicesStudiesPlans"> |
||
281 | <label class="text-info"> Necessita do papel de Gestão de Planos de Estudos para editar os planos</label> |
||
282 | </baco:hasNotRole> |
||
1506 | jmachado | 283 | </label> |
284 | <div class="col-sm-10"> |
||
1505 | jmachado | 285 | <logic:present name="CourseView" property="courseStudiesPlans"> |
286 | <table class="tablesorterfiltered"> |
||
287 | <thead> |
||
288 | <tr> |
||
289 | <th>Versão</th> |
||
290 | <th>Data Produção</th> |
||
291 | <th>Ultima alteração</th> |
||
292 | <th>Descrição</th> |
||
293 | </tr> |
||
294 | </thead> |
||
295 | <tbody> |
||
296 | <logic:iterate id="studyPlan" name="CourseView" property="courseStudiesPlans" type="pt.estgp.estgweb.domain.CourseStudiesPlan"> |
||
297 | <tr> |
||
298 | <td>${studyPlan.version}</td> |
||
299 | <td>${studyPlan.saveDate}</td> |
||
300 | <td>${studyPlan.updateDate}</td> |
||
301 | <td>${studyPlan.versionDescription}</td> |
||
302 | </tr> |
||
303 | </logic:iterate> |
||
304 | </tbody> |
||
305 | </table> |
||
306 | </logic:present> |
||
1506 | jmachado | 307 | </div> |
308 | </div> |
||
1505 | jmachado | 309 | |
1506 | jmachado | 310 | |
311 | |||
1507 | jmachado | 312 | |
1506 | jmachado | 313 | <%-- |
314 | |||
315 | <tr> |
||
316 | <th> |
||
317 | <bean:message key="course.director"/> |
||
318 | </th> |
||
319 | <td> |
||
320 | <html:select onchange="alertPermissions()" property="courseView.director.id"> |
||
321 | <html:option value="0"> |
||
322 | <bean:message key="none"/> |
||
323 | </html:option> |
||
324 | <logic:present name="CourseForm" property="teachers"> |
||
325 | <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
326 | <html:option value="${teacher.id}"> |
||
327 | (${teacher.code}) ${teacher.name} |
||
328 | </html:option> |
||
329 | </logic:iterate> |
||
330 | </logic:present> |
||
331 | </html:select> |
||
1505 | jmachado | 332 | </td> |
333 | </tr> |
||
1506 | jmachado | 334 | --%> |
214 | jmachado | 335 | |
1506 | jmachado | 336 | |
337 | |||
338 | |||
339 | |||
340 | |||
341 | <button class="btn btn-success" type="button" onclick="set(this.form,'submit');this.form.submit()"> |
||
342 | <bean:message key="confirm"/> |
||
343 | </button> |
||
344 | |||
345 | |||
346 | </div><!-- //panel-body--> |
||
347 | </div><!-- //panel panel-default--> |
||
348 | |||
214 | jmachado | 349 | </html:form> |