Rev 1529 | Rev 1670 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1147 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.domain.UserImpl" %> |
1074 | jmachado | 2 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
3 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
||
4 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
||
1315 | jmachado | 5 | <%@ page import="java.util.List" %> |
6 | <%@ page import="java.util.Map" %> |
||
203 | jmachado | 7 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
8 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
11 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
12 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
13 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
14 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
15 | <jsp:useBean id="CourseUnitView" type="pt.estgp.estgweb.domain.views.CourseUnitView" scope="request"/> |
||
204 | jmachado | 16 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
215 | jmachado | 17 | |
18 | <% |
||
19 | String fromAction = ""; |
||
20 | String user = ""; |
||
21 | if (request.getParameter("from") != null) |
||
22 | { |
||
23 | user = "/user"; |
||
24 | fromAction = "From" + request.getParameter("from"); |
||
25 | if(request.getParameter("from").equals("CourseUnit")) |
||
26 | { |
||
27 | fromAction = "FromHome"; |
||
28 | } |
||
29 | } |
||
30 | request.setAttribute("user", user); |
||
31 | request.setAttribute("fromAction", fromAction); |
||
1022 | jmachado | 32 | |
33 | |||
1147 | jmachado | 34 | //String activeEvaluationYear = DaoFactory.getConfigurationDaoImpl().getCourseUnitEvaluationActiveYearCreateTransaction(); |
1022 | jmachado | 35 | |
1074 | jmachado | 36 | IServiceManager sm = ServiceManager.getInstance(); |
37 | |||
38 | String[] names = new String[]{}; |
||
39 | Object[] args = new Object[]{CourseUnitView.getCode(), CourseUnitView.getCourseCode()}; |
||
40 | |||
41 | pt.estgp.estgweb.domain.views.CourseUnitView courseUnitViewInEvaluation = (pt.estgp.estgweb.domain.views.CourseUnitView) sm.execute(RequestUtils.getRequester(request, response), "LoadCourseUnitInEvaluationBySigesCodes", args, names); |
||
42 | if(courseUnitViewInEvaluation != null) |
||
43 | { |
||
44 | request.setAttribute("CourseUnitInEvaluation",courseUnitViewInEvaluation); |
||
45 | } |
||
46 | |||
1105 | jmachado | 47 | |
1312 | jmachado | 48 | |
215 | jmachado | 49 | %> |
50 | |||
1147 | jmachado | 51 | |
52 | |||
881 | jmachado | 53 | <jomm:messages/> |
54 | |||
1147 | jmachado | 55 | <div class="panel panel-primary panel-container"> |
1105 | jmachado | 56 | <div class="panel-heading"> |
1312 | jmachado | 57 | ${CourseUnitView.name} (${CourseUnitView.code}) - <bean:message key="courseunit.semestre"/> ${CourseUnitView.semestre} - ano ${CourseUnitView.importYear} |
58 | |||
59 | <baco:hasRole role="admin,all,services,ci"> |
||
60 | |||
61 | <html:link styleClass="btn btn-default" action="/user/startEditCourseUnitAdminFromServiceZone.do?id=${CourseUnitView.id}"> |
||
62 | <span class="glyphicon glyphicon-pencil"></span> <bean:message key="admin.resource"/> |
||
63 | </html:link> |
||
64 | |||
65 | <html:link styleClass="btn btn-default pull-right" action="/user/courseControllerFromServiceZone.do?dispatch=edit&courseView.id=${CourseUnitView.courseId}"> |
||
66 | <span class="glyphicon glyphicon-pencil"></span> <bean:message key="admin.resource"/> <bean:message key="course" arg0="${CourseUnitView.courseName}"/> |
||
67 | </html:link> |
||
68 | |||
69 | </baco:hasRole> |
||
1105 | jmachado | 70 | </div> |
71 | <div class="panel-body"> |
||
749 | jmachado | 72 | |
1105 | jmachado | 73 | |
74 | |||
995 | jmachado | 75 | <baco:isAuthenticated> |
1022 | jmachado | 76 | <% |
1312 | jmachado | 77 | if(UserSession.getUser().isTeacher() && courseUnitViewInEvaluation != null) |
78 | { |
||
1529 | jmachado | 79 | if(courseUnitViewInEvaluation.isValidationEvaluation()) |
80 | { |
||
1530 | jmachado | 81 | if(!CourseUnitView.getImportYear().equals(courseUnitViewInEvaluation.getImportYear())) |
82 | {} |
||
1529 | jmachado | 83 | %> |
84 | <div class="row"> |
||
85 | <div class="col-sm-8"> |
||
1530 | jmachado | 86 | <div class="alert alert-warning" role="alert">Atenção tem um relatório de avaliação em fase de VALIDAÇÃO PELA COMISSÂO DE CURSO no ano <%=courseUnitViewInEvaluation.getImportYear()%> |
87 | <% |
||
88 | if(!CourseUnitView.getImportYear().equals(courseUnitViewInEvaluation.getImportYear())) |
||
89 | { |
||
90 | %> |
||
91 | (Entrar no <%=courseUnitViewInEvaluation.getImportYear()%> pelo menu lateral esquerdo antes de clicar em relatório de avaliação e confirmar no titulo da unidade). |
||
92 | <% |
||
93 | } |
||
94 | %> |
||
95 | |||
96 | </div> |
||
1529 | jmachado | 97 | </div> |
98 | </div> |
||
99 | <% |
||
100 | } |
||
101 | else if(courseUnitViewInEvaluation.isValidEvaluation()) |
||
102 | { |
||
103 | %> |
||
104 | |||
105 | <% |
||
106 | } |
||
107 | else |
||
108 | { |
||
109 | |||
110 | |||
1312 | jmachado | 111 | %> |
112 | <div class="row"> |
||
113 | <div class="col-sm-8"> |
||
1530 | jmachado | 114 | <div class="alert alert-warning" role="alert">Atenção tem um relatório de avaliação em fase de preenchimento pelos DOCENTES no ano <%=courseUnitViewInEvaluation.getImportYear()%> |
115 | <% |
||
116 | if(!CourseUnitView.getImportYear().equals(courseUnitViewInEvaluation.getImportYear())) |
||
117 | { |
||
118 | %> |
||
119 | (Entrar no <%=courseUnitViewInEvaluation.getImportYear()%> pelo menu lateral esquerdo antes de clicar em relatório de avaliação e confirmar no titulo da unidade). |
||
120 | <% |
||
121 | } |
||
122 | %> |
||
123 | </div> |
||
1312 | jmachado | 124 | </div> |
125 | </div> |
||
1529 | jmachado | 126 | <% |
127 | } |
||
1104 | jmachado | 128 | |
950 | jmachado | 129 | } |
130 | %> |
||
995 | jmachado | 131 | </baco:isAuthenticated> |
1312 | jmachado | 132 | |
1353 | jmachado | 133 | |
134 | |||
1105 | jmachado | 135 | <html:form styleClass="form" action="/user/courseUnitControllerFromHome" enctype="multipart/form-data"> |
136 | <input type="hidden" name="dispatch" value="update"/> |
||
137 | <html:hidden property="courseUnitView.id"/> |
||
749 | jmachado | 138 | |
139 | |||
1105 | jmachado | 140 | <div class="row"> |
141 | <div class="col-md-8 col-sm-6 col-xs-12"> |
||
142 | <div class="row"> |
||
143 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
1077 | jmachado | 144 | |
1105 | jmachado | 145 | <div class="panel panel-default"> |
146 | <div class="panel-heading"> |
||
147 | <bean:message key="courseunit.objectives"/> |
||
148 | </div> |
||
149 | <div class="panel-body"> |
||
150 | <p><logic:present name="CourseUnitView" property="objectives"> |
||
151 | ${CourseUnitView.formatedObjectives} |
||
152 | </logic:present> |
||
153 | <logic:notPresent name="CourseUnitView" property="objectives"> |
||
154 | <bean:message key="courseunit.objectives.not.available"/> |
||
155 | </logic:notPresent></p> |
||
156 | </div> |
||
157 | </div> |
||
158 | </div> |
||
159 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
160 | <div class="panel panel-default"> |
||
161 | <div class="panel-heading"> |
||
1312 | jmachado | 162 | Recursos Documentais |
1105 | jmachado | 163 | </div> |
164 | <div class="panel-body"> |
||
1077 | jmachado | 165 | |
1105 | jmachado | 166 | <div class="list-group"> |
751 | jmachado | 167 | |
1312 | jmachado | 168 | |
169 | |||
170 | <baco:isAdmin> |
||
1105 | jmachado | 171 | <baco:canManage name="CourseUnitView"> |
172 | <div class="list-group-item"> |
||
1312 | jmachado | 173 | <html:radio style="vertical-align: middle" onclick="set(form,'update');form.submit()" property="courseUnitView.contentsGrants" value="INTERNAL"/> <bean:message key="courseunits.contentsGrants"/> <bean:message key="courseunits.contentsGrants.INTERNAL"/> <br/> |
174 | <html:radio onclick="set(form,'update');form.submit()" property="courseUnitView.contentsGrants" value="PRIVATE" /> <bean:message key="courseunits.contentsGrants"/> <bean:message key="courseunits.contentsGrants.PRIVATE"/> |
||
1105 | jmachado | 175 | </div> |
176 | </baco:canManage> |
||
1312 | jmachado | 177 | </baco:isAdmin> |
751 | jmachado | 178 | |
1105 | jmachado | 179 | <baco:isAuthenticated> |
751 | jmachado | 180 | |
374 | jmachado | 181 | |
705 | jmachado | 182 | |
751 | jmachado | 183 | |
374 | jmachado | 184 | |
1312 | jmachado | 185 | |
186 | |||
187 | |||
188 | <logic:present name="CourseUnitView" property="programStreamId"> |
||
189 | <baco:checkRepositoryFileAccess repositoryId="${CourseUnitView.programStreamId}"> |
||
190 | <div class="list-group-item"> |
||
191 | <bean:message key="courseunit.programfilepath"/> |
||
1164 | jmachado | 192 | <logic:equal value="false" name="CourseUnitView" property="validProgram"> |
1312 | jmachado | 193 | <span class="label label-danger">*</span> |
1105 | jmachado | 194 | </logic:equal> |
1312 | jmachado | 195 | |
196 | <span class="badge icon"> |
||
197 | <a href="javascript:invoqueDataVersionForm(${CourseUnitView.programStreamId})"><span class="icon icon-history icon-large"></span></a> |
||
198 | </span> |
||
199 | <span class="badge icon"> |
||
200 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseUnitView.programStreamId}"><span class="icon icon-file-pdf icon-large"></span></a> |
||
201 | </span> |
||
202 | </div> |
||
203 | <logic:equal value="false" name="CourseUnitView" property="validProgram"> |
||
204 | <div class="list-group-item"> |
||
205 | <span class="label label-danger">*</span> Aguarda validação |
||
206 | </div> |
||
1164 | jmachado | 207 | </logic:equal> |
1312 | jmachado | 208 | </baco:checkRepositoryFileAccess> |
209 | </logic:present> |
||
730 | jmachado | 210 | |
1312 | jmachado | 211 | <logic:present name="CourseUnitView" property="evaluationStreamId"> |
212 | <baco:checkRepositoryFileAccess repositoryId="${CourseUnitView.evaluationStreamId}"> |
||
213 | <div class="list-group-item clearfix"> |
||
214 | <bean:message key="courseunit.evaluation.report"/> |
||
215 | <span class="badge icon"> |
||
216 | <a href="javascript:invoqueDataVersionForm(${CourseUnitView.evaluationStreamId})"><span class="icon icon-history icon-large"></span></a> |
||
217 | </span> |
||
218 | <span class="badge icon"> |
||
219 | <a href="<%=request.getContextPath()%>/repositoryStream/${CourseUnitView.evaluationStreamId}"><span class="icon icon-file-pdf icon-large"></span></a> |
||
220 | </span> |
||
221 | </div> |
||
222 | </baco:checkRepositoryFileAccess> |
||
223 | </logic:present> |
||
224 | |||
1105 | jmachado | 225 | </baco:isAuthenticated> |
226 | </div> |
||
227 | </div> |
||
228 | </div> |
||
229 | </div> |
||
230 | </div> |
||
231 | <div class="row"> |
||
232 | <div class="col-md-12 col-sm-12 col-xs-12"> |
||
233 | <baco:isAuthenticated> |
||
1147 | jmachado | 234 | <% |
235 | if(CourseUnitView.getContentsGrants() == null) |
||
236 | CourseUnitView.setContentsGrants("INTERNAL"); |
||
237 | if(CourseUnitView.getContentsGrants().equals("INTERNAL") || (CourseUnitView.getContentsGrants().equals("PRIVATE") && |
||
238 | ( |
||
239 | ((UserImpl)UserSession.getUser()).isTeacherOfCourseUnit(CourseUnitView.getId()) || |
||
240 | ((UserImpl)UserSession.getUser()).isStudentfCourseUnit(CourseUnitView.getId()) || |
||
241 | (UserSession.getUser()).getId() == CourseUnitView.getResponsableId() |
||
242 | ))) |
||
243 | { |
||
762 | jmachado | 244 | |
1147 | jmachado | 245 | %> |
1105 | jmachado | 246 | <h2><bean:message key="module.Announcements"/></h2> |
247 | <logic:notEmpty name="CourseUnitView" property="announcements"> |
||
248 | <%--<div class="listCircleWhite"> |
||
249 | <ul> |
||
250 | <logic:iterate id="announcement" name="CourseUnitView" property="announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
||
251 | <li> |
||
252 | <h3><html:link action="/user/startLoadAnnouncementFromCourseUnit?id=${announcement.id}">${announcement.title}</html:link></h3> |
||
253 | <p>${announcement.formatedText}</p> |
||
254 | <p class="pFooterSeccao"><bean:message key="from"/>: ${announcement.owner.name} (${announcement.owner.username}) <bean:message key="at"/> ${announcement.formatedSaveDate} </p> |
||
255 | </li> |
||
256 | </logic:iterate> |
||
257 | </ul> |
||
258 | </div>--%> |
||
259 | <logic:iterate id="announcement" name="CourseUnitView" property="announcements" type="pt.estgp.estgweb.domain.views.AnnouncementView"> |
||
1147 | jmachado | 260 | <div class="panel panel-info"> |
1105 | jmachado | 261 | <div class="panel-heading"> |
262 | <html:link action="/user/startLoadAnnouncementFromCourseUnit?id=${announcement.id}">${announcement.title}</html:link> |
||
263 | </div> |
||
264 | <div class="panel-body"> |
||
265 | <p>${announcement.formatedText}</p> |
||
266 | </div> |
||
267 | <div class="panel-footer"><bean:message key="from"/>: ${announcement.owner.name} (${announcement.owner.username}) <bean:message key="at"/> ${announcement.formatedSaveDate} </div> |
||
268 | </div> |
||
269 | </logic:iterate> |
||
204 | jmachado | 270 | |
209 | jmachado | 271 | |
1105 | jmachado | 272 | </logic:notEmpty> |
273 | <logic:empty name="CourseUnitView" property="announcements"> |
||
274 | <p><bean:message key="announcement.zero.placed"/></p> |
||
275 | </logic:empty> |
||
1147 | jmachado | 276 | <% |
277 | } |
||
278 | %> |
||
995 | jmachado | 279 | |
1105 | jmachado | 280 | </baco:isAuthenticated> |
1077 | jmachado | 281 | </div> |
282 | </div> |
||
1105 | jmachado | 283 | </div> |
284 | <div class="col-md-4 col-sm-6 col-xs-12"> |
||
1077 | jmachado | 285 | |
286 | |||
995 | jmachado | 287 | |
1105 | jmachado | 288 | <div class="panel panel-default"> |
289 | <div class="panel-heading"> |
||
290 | <bean:message key="courseunit.teachers"/> |
||
1337 | jmachado | 291 | <!--<a href="#" data-toggle="modal" data-target="#teachersInfo" class="pull-right"> |
292 | Mais Info. <span class="glyphicon glyphicon-info-sign"> </span> |
||
293 | </a>--> |
||
294 | <a href="javascript:return false;" class="pull-right" data-href="<%=request.getContextPath()%>/user/courseunits/teachersInfo.jsp?courseUnitId=${CourseUnitView.id}" data-title="<bean:message key="courseunit.teachers"/>" data-toggle="modal" data-target="#modalAjaxRequest"> |
||
295 | Mais Info. <span class="glyphicon glyphicon-info-sign small"> </span> |
||
1315 | jmachado | 296 | </a> |
1105 | jmachado | 297 | </div> |
298 | <div class="panel-body"> |
||
1315 | jmachado | 299 | |
300 | <div class="modal fade" id="teachersInfo" tabindex="-1" role="dialog" > |
||
301 | <div class="modal-dialog" data-width="750" style="display: block; width: 750px; margin-top: 50px;" aria-hidden="false"> |
||
302 | <div class="modal-content"> |
||
303 | <div class="modal-header"> |
||
304 | <h4 class="modal-title"><bean:message key="courseunit.teachers"/> |
||
305 | <button type="button" class="btn btn-danger btn-sm pull-right glyphicon glyphicon-remove " data-dismiss="modal"></button> |
||
306 | </h4> |
||
307 | </div> |
||
308 | <div class="modal-body"> |
||
309 | <div class="well well-sm"><bean:message key="courseunit.responsable"/></div> |
||
310 | |||
311 | <logic:lessEqual value="0" name="CourseUnitView" property="responsableTeacher.id"> |
||
312 | <p> Não existe informação disponivel.</p> |
||
313 | </logic:lessEqual> |
||
314 | <logic:greaterThan value="0" name="CourseUnitView" property="responsableTeacher.id"> |
||
315 | <p class="lead"><strong><bean:message key="name"/></strong>: ${CourseUnitView.responsableTeacher.name}</p> |
||
316 | <p><strong><bean:message key="profile.siges.code.public"/></strong>: ${CourseUnitView.responsableTeacher.code}</p> |
||
317 | <p><label class=""><bean:message key="email"/></label>: ${CourseUnitView.responsableTeacher.safeEmail}</p> |
||
318 | </logic:greaterThan> |
||
319 | |||
320 | <div class="well well-sm"><bean:message key="courseunit.teachers.teaching"/></div> |
||
321 | <logic:iterate id="teacher" name="CourseUnitView" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
322 | |||
323 | <p class="lead"><strong><bean:message key="name"/></strong>: ${teacher.name}</p> |
||
324 | <p><strong><bean:message key="profile.siges.code.public"/></strong>: ${teacher.code}</p> |
||
325 | <p><label class=""><bean:message key="email"/></label>: ${teacher.safeEmail}</p> |
||
326 | <logic:present name="CourseUnitView" property="tipologias"> |
||
327 | <% |
||
328 | Map<String,List<String>> mapa = CourseUnitView.getTipologiasTurmas(""+teacher.getCode()); |
||
329 | for(Map.Entry<String,List<String>> entry: mapa.entrySet()) |
||
330 | { |
||
331 | String tipologia = entry.getKey(); |
||
332 | List<String> turmas = entry.getValue(); |
||
333 | request.setAttribute("turmas", turmas); |
||
334 | request.setAttribute("tipologia", tipologia); |
||
335 | %> |
||
336 | <p>${tipologia}: |
||
337 | <logic:iterate id="turma" name="turmas" type="java.lang.String" scope="request"> |
||
338 | ${turma} |
||
339 | </logic:iterate> |
||
340 | </p> |
||
341 | <% |
||
342 | } |
||
343 | %> |
||
344 | |||
345 | </logic:present> |
||
346 | </logic:iterate> |
||
347 | </div> |
||
348 | <div class="modal-footer"> |
||
349 | <button type="button" class="btn btn-default" data-dismiss="modal">Voltar</button> |
||
350 | </div> |
||
351 | </div> |
||
352 | </div> |
||
353 | </div> |
||
354 | |||
355 | |||
1105 | jmachado | 356 | <logic:notEmpty name="CourseUnitView" property="responsableTeacher"> |
357 | <div class="list-group"> |
||
1312 | jmachado | 358 | <div class="list-group-item list-group-item-heading"><bean:message key="courseunit.responsable"/></div> |
359 | <div class="list-group-item clearfix"> |
||
1147 | jmachado | 360 | |
1315 | jmachado | 361 | <logic:lessEqual value="0" name="CourseUnitView" property="responsableTeacher.id"> |
362 | <p> Não existe informação disponivel.</p> |
||
363 | </logic:lessEqual> |
||
364 | <logic:greaterThan value="0" name="CourseUnitView" property="responsableTeacher.id"> |
||
1147 | jmachado | 365 | <html:link action="${user}/startLoadTeacherCourseUnit${fromAction}?code=${CourseUnitView.responsableTeacher.code}&courseUnitView.id=${CourseUnitView.id}">${CourseUnitView.responsableTeacher.name}</html:link> |
366 | <span class="badge">${CourseUnitView.responsableTeacher.code}</span> |
||
1315 | jmachado | 367 | </logic:greaterThan> |
1147 | jmachado | 368 | |
369 | </div> |
||
1312 | jmachado | 370 | <div class="list-group-item list-group-item-footer"> ${CourseUnitView.responsableTeacher.safeEmail}</div> |
1105 | jmachado | 371 | </div> |
372 | </logic:notEmpty> |
||
373 | <div class="list-group"> |
||
374 | <logic:iterate id="teacher" name="CourseUnitView" property="teachers" type="pt.estgp.estgweb.domain.views.UserView"> |
||
1312 | jmachado | 375 | <div class="list-group-item clearfix"> |
376 | <html:link action="${user}/startLoadTeacherCourseUnit${fromAction}?code=${teacher.code}&courseUnitView.id=${CourseUnitView.id}">${teacher.name}</html:link> |
||
377 | <span class="badge">${teacher.code}</span> |
||
378 | </div> |
||
379 | <div class="list-group-item list-group-item-footer"> ${teacher.safeEmail}</div> |
||
1105 | jmachado | 380 | </logic:iterate> |
381 | </div> |
||
995 | jmachado | 382 | |
214 | jmachado | 383 | |
1105 | jmachado | 384 | </div> |
1077 | jmachado | 385 | |
386 | </div> |
||
387 | |||
388 | |||
389 | |||
995 | jmachado | 390 | |
391 | |||
1022 | jmachado | 392 | |
1105 | jmachado | 393 | <baco:isAuthenticated> |
394 | <div class="panel panel-default"> |
||
395 | <div class="panel-heading"> |
||
396 | <bean:message key="courseunit.summaries"/> |
||
1312 | jmachado | 397 | |
398 | <span class="badge icon"> |
||
399 | <a href="<%=request.getContextPath()%>/ftpProxyStream/ionline${CourseUnitView.sumariosPathFileIntranet}"> |
||
400 | <span class="icon icon-large icon-file-pdf"></span> |
||
401 | </a> |
||
402 | </span> |
||
403 | |||
1105 | jmachado | 404 | </div> |
405 | <div class="panel-body"> |
||
749 | jmachado | 406 | |
1105 | jmachado | 407 | <logic:notEmpty name="CourseUnitView" property="summariesFromJson"> |
408 | <baco:hasRole role="teacher"> |
||
409 | <logic:greaterThan value="0" name="CourseUnitView" property="lateSummaries"> |
||
1312 | jmachado | 410 | <div class="row"> |
411 | <div class="col-sm-12"> |
||
412 | <div class="alert alert-warning" role="alert"> |
||
413 | Alerta.Tem <bean:write name="CourseUnitView" property="lateSummaries"/> |
||
414 | <logic:equal name="CourseUnitView" property="lateSummaries" value="1">Sumário</logic:equal> |
||
415 | <logic:greaterThan name="CourseUnitView" property="lateSummaries" value="1">Sumários</logic:greaterThan> |
||
416 | lançados pelos serviços que não estão preenchidos e estão abertos há mais de 48 horas. Se este for um falso alerta pedimos desculpa pelo incómodo. |
||
417 | <a target="_blank" href="http://netpa.ipportalegre.pt">Aceda ao NETPA para regularizar</a> |
||
418 | ou entre em contacto com o Sr José Luis para confirmar a situação: |
||
419 | <ul> |
||
420 | <logic:iterate id="sumLate" name="CourseUnitView" property="lateSummariesDates"> |
||
421 | <li>Por lançar: <bean:write name="sumLate"/></li> |
||
422 | </logic:iterate> |
||
423 | </ul> |
||
424 | </div> |
||
425 | </div> |
||
426 | </div> |
||
1105 | jmachado | 427 | </logic:greaterThan> |
428 | </baco:hasRole> |
||
429 | </logic:notEmpty> |
||
430 | |||
431 | |||
1312 | jmachado | 432 | |
1105 | jmachado | 433 | <logic:notEmpty name="CourseUnitView" property="summariesFromJson"> |
1312 | jmachado | 434 | <%-- |
435 | <% |
||
436 | //Docente-Tipologia |
||
437 | Map<String,Map<String,String>> docenteTipologia = new HashMap<String,Map<String,String>>(); |
||
438 | List<CourseUnitSummaryView> sums = CourseUnitView.getSummariesFromJson(); |
||
439 | if(sums != null) |
||
440 | { |
||
441 | for(CourseUnitSummaryView sumView: sums) |
||
442 | { |
||
443 | Map<String,String> tipologias = docenteTipologia.get(sumView.getCodigoDocente()); |
||
444 | if(tipologias == null) |
||
445 | { |
||
446 | tipologias = new HashMap<String,String>(); |
||
447 | docenteTipologia.put(sumView.getCodigoDocente(),tipologias); |
||
448 | } |
||
449 | tipologias.put(sumView.getTipoAula(), ""); |
||
450 | } |
||
451 | } |
||
452 | %> |
||
453 | |||
454 | <p>Tipologia - Docente</p> |
||
455 | <% |
||
456 | for(Map.Entry<String,Map<String,String>> entry: docenteTipologia.entrySet()) |
||
457 | { |
||
458 | String codigoDocente = entry.getKey(); |
||
459 | for(String tipologia: entry.getValue().keySet()) |
||
460 | { |
||
461 | %> |
||
462 | <p><%=codigoDocente%> - <%=tipologia%></p> |
||
463 | <% |
||
464 | } |
||
465 | } |
||
466 | %>--%> |
||
467 | <div class="list-group"> |
||
1353 | jmachado | 468 | <div class="list-group-item"> |
469 | <label > |
||
470 | Filtrar: |
||
471 | </label> |
||
472 | |||
473 | <input id="summariesFilterInput" type="text" style="width: 80%"/> |
||
474 | <script> |
||
475 | $.extend($.expr[':'], { |
||
476 | 'containsi': function(elem, i, match, array) |
||
477 | { |
||
478 | return (elem.textContent || elem.innerText || '').toLowerCase() |
||
479 | .indexOf((match[3] || "").toLowerCase()) >= 0; |
||
480 | } |
||
481 | }); |
||
482 | $(document).ready( |
||
483 | function(){ |
||
484 | |||
485 | $("#summariesFilterInput").unbind("click"); |
||
486 | $('#summariesFilterInput').bind("keypress", function(e) { |
||
487 | if (e.keyCode == 13) { |
||
488 | e.preventDefault(); |
||
489 | return false; |
||
490 | } |
||
491 | }); |
||
492 | $("#summariesFilterInput").keyup( |
||
493 | function(){ |
||
494 | if($("#summariesFilterInput").val()=="") |
||
495 | { |
||
496 | $(".summary").show(); |
||
497 | } |
||
498 | else |
||
499 | { |
||
500 | $(".summary").show(); |
||
501 | $(".summary").each( |
||
502 | function() |
||
503 | { |
||
504 | if($(this).find("*:containsi('"+$("#summariesFilterInput").val()+"')").length == 0) |
||
505 | { |
||
506 | $(this).hide(); |
||
507 | } |
||
508 | } |
||
509 | ); |
||
510 | } |
||
511 | } |
||
512 | ); |
||
513 | } |
||
514 | ); |
||
515 | </script> |
||
516 | </div> |
||
1105 | jmachado | 517 | <logic:iterate id="summary" name="CourseUnitView" property="summariesFromJson" type="pt.estgp.estgweb.domain.views.CourseUnitSummaryView"> |
1353 | jmachado | 518 | <div class="summary" id="summary${summary.number}"> |
519 | <div class="list-group-item list-group-item-heading">Aula ${summary.number} - ${summary.title}</div> |
||
520 | <div class="list-group-item"> |
||
521 | <span class="label label-info">${summary.tipoAula}</span> |
||
522 | <span class="badge">${summary.codigoDocente}</span> |
||
523 | ${summary.description} |
||
524 | </div> |
||
525 | <div class="list-group-item list-group-item-footer"> |
||
526 | ${summary.date} - ${summary.horas} Horas - ${summary.students} <bean:message key="courseunit.summary.present.students"/> |
||
527 | </div> |
||
1312 | jmachado | 528 | </div> |
1105 | jmachado | 529 | </logic:iterate> |
1312 | jmachado | 530 | </div> |
1105 | jmachado | 531 | </logic:notEmpty> |
532 | <logic:empty name="CourseUnitView" property="summariesFromJson"> |
||
533 | <p><bean:message key="courseunit.summaries.zero.placed"/></p> |
||
534 | </logic:empty> |
||
535 | </div> |
||
995 | jmachado | 536 | </div> |
1105 | jmachado | 537 | </baco:isAuthenticated> |
538 | </div> |
||
995 | jmachado | 539 | </div> |
540 | |||
541 | |||
1105 | jmachado | 542 | |
543 | </html:form> |
||
544 | |||
545 | |||
546 | |||
547 | |||
548 | |||
549 | |||
550 | </div> |
||
203 | jmachado | 551 | </div> |