Rev 1315 | Rev 1338 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
209 | jmachado | 1 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
2 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
3 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
9 | <jsp:useBean id="CourseUnitView" type="pt.estgp.estgweb.domain.views.CourseUnitView" scope="request"/> |
||
215 | jmachado | 10 | |
11 | <% |
||
12 | String fromAction = ""; |
||
13 | String user = ""; |
||
14 | if (request.getParameter("from") != null) |
||
15 | { |
||
16 | user = "/user"; |
||
17 | fromAction = "From" + request.getParameter("from"); |
||
18 | if(request.getParameter("from").equals("CourseUnit")) |
||
19 | { |
||
20 | fromAction = "FromHome"; |
||
21 | } |
||
22 | } |
||
23 | request.setAttribute("user", user); |
||
24 | request.setAttribute("fromAction", fromAction); |
||
405 | jmachado | 25 | |
26 | String orderBy = request.getParameter("order"); |
||
27 | if(orderBy != null && orderBy.equals("byNumber")) |
||
28 | request.setAttribute("students",CourseUnitView.getStudentsOrderedByNumber()); |
||
29 | else |
||
30 | request.setAttribute("students",CourseUnitView.getStudentsOrderedByName()); |
||
31 | |||
215 | jmachado | 32 | %> |
1312 | jmachado | 33 | <div class="panel panel-default"> |
34 | <div class="panel-body"> |
||
405 | jmachado | 35 | <p><bean:message key="courseunit.students.count"/>: ${CourseUnitView.studentsSize}</p> |
1315 | jmachado | 36 | <table id="myTable" class="tablesorterfiltered"> |
843 | jmachado | 37 | <thead> |
209 | jmachado | 38 | <tr> |
842 | jmachado | 39 | <%/*<th><html:link action="${user}/startLoadCourseUnitStudents${fromAction}?courseUnitView.id=${CourseUnitView.id}&order=byNumber"><bean:message key="number"/></html:link></th> |
405 | jmachado | 40 | <th><html:link action="${user}/startLoadCourseUnitStudents${fromAction}?courseUnitView.id=${CourseUnitView.id}&order=byName"><bean:message key="name"/></html:link></th> |
842 | jmachado | 41 | */%> |
42 | <th><bean:message key="number"/></th> |
||
43 | <th><bean:message key="name"/></th> |
||
44 | |||
214 | jmachado | 45 | <th><bean:message key="user"/></th> |
842 | jmachado | 46 | |
214 | jmachado | 47 | <th><bean:message key="email"/></th> |
844 | jmachado | 48 | |
49 | <baco:hasRole role="teacher"> |
||
50 | <th><bean:message key="phone.number"/></th> |
||
51 | </baco:hasRole> |
||
52 | |||
1316 | jmachado | 53 | <th class="filter-name filter-select" data-placeholder="Todas">Turma</th> |
209 | jmachado | 54 | </tr> |
843 | jmachado | 55 | </thead> |
56 | <tbody> |
||
405 | jmachado | 57 | <logic:iterate id="student" name="students" type="pt.estgp.estgweb.domain.views.UserView"> |
214 | jmachado | 58 | <tr> |
59 | <td> |
||
60 | ${student.code} |
||
61 | </td> |
||
62 | <td> |
||
215 | jmachado | 63 | <html:link action="${user}/startLoadStudentCourseUnit${fromAction}?code=${student.code}&courseUnitView.id=${CourseUnitView.id}">${student.name}</html:link> |
214 | jmachado | 64 | </td> |
65 | <td> |
||
66 | ${student.username} |
||
67 | </td> |
||
68 | <td> |
||
298 | jmachado | 69 | ${student.safeEmail} |
214 | jmachado | 70 | </td> |
844 | jmachado | 71 | <baco:hasRole role="teacher"> |
72 | <td>${student.phonenumber} </td> |
||
73 | </baco:hasRole> |
||
1315 | jmachado | 74 | <td> |
75 | ${student.studentTurma} |
||
76 | </td> |
||
214 | jmachado | 77 | </tr> |
78 | </logic:iterate> |
||
843 | jmachado | 79 | </tbody> |
214 | jmachado | 80 | </table> |
81 | </div> |
||
209 | jmachado | 82 | </div> |