Subversion Repositories bacoAlunos

Rev

Rev 448 | Rev 551 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
204 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="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/>
10
<div class="portal">
432 jmachado 11
    <logic:notMatch value="TeacherImpl" name="UserSession" property="user.class.name">
301 jmachado 12
    <ul>
13
        <li class="WARNING">
432 jmachado 14
            <bean:message key="profile.bad.profile.teacher.iregular.user.class"/>
301 jmachado 15
        </li>
16
    </ul>
432 jmachado 17
    </logic:notMatch>
204 jmachado 18
    <table class="columnTable" width="100%">
19
        <tbody>
20
            <tr>
215 jmachado 21
                <baco:isModuleOn module="courseunits">
22
                    <td class="column">
23
                        <div class="block">
24
                            <p><bean:message key="intranet.course.units"/></p>
25
                            <ul>
262 jmachado 26
                                <li>
27
                                    <p><bean:message key="courseunit.semestre"/> 1</p>
266 jmachado 28
                                    <logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
301 jmachado 29
                                        <logic:empty name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
30
                                            <bean:message key="courseunit.zero.units"/>
31
                                        </logic:empty>
32
                                    </logic:present>
33
                                    <logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
266 jmachado 34
                                        <logic:notEmpty name="UserSession" property="user.teachedUnitsCurrentYearViewS1">
35
                                            <ul>
36
                                                <logic:iterate id="unit" name="UserSession" property="user.teachedUnitsCurrentYearViewS1" type="pt.estgp.estgweb.domain.CourseUnit">
37
                                                    <li>
550 jmachado 38
                                                        <%
39
                                                            String courseCode = "";
40
                                                            if(unit.getCourse() != null)
41
                                                            {
42
                                                                String courseName = unit.getCourse().getName();
43
                                                                String[] words = courseName.split(" ");
44
                                                                for(String word: words)
45
                                                                {
46
                                                                    if(word != null && word.length() > 3 && word.charAt(0) >= 'A' && word.charAt(0) <= 'Z' )
47
                                                                    {
48
                                                                        courseCode += word.charAt(0);
49
                                                                    }
50
                                                                }
51
                                                            }
52
 
53
                                                        %>
54
                                                        <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (<%=courseCode%> ${unit.courseName} (${unit.courseCode}))</html:link>
266 jmachado 55
                                                    </li>
262 jmachado 56
                                                </logic:iterate>
266 jmachado 57
                                            </ul>
58
                                        </logic:notEmpty>
59
                                    </logic:present>
262 jmachado 60
                                </li>
61
                                <li>
62
                                    <p><bean:message key="courseunit.semestre"/> 2</p>
266 jmachado 63
                                    <logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
301 jmachado 64
                                        <logic:empty name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
65
                                            <bean:message key="courseunit.zero.units"/>
66
                                        </logic:empty>
67
                                    </logic:present>
68
                                    <logic:present name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
266 jmachado 69
                                        <logic:notEmpty name="UserSession" property="user.teachedUnitsCurrentYearViewS2">
70
                                            <ul>
71
                                                <logic:iterate id="unit" name="UserSession" property="user.teachedUnitsCurrentYearViewS2" type="pt.estgp.estgweb.domain.CourseUnit">
72
                                                    <li>
550 jmachado 73
                                                         <%
74
                                                            String courseCode = "";
75
                                                            if(unit.getCourse() != null)
76
                                                            {
77
                                                                String courseName = unit.getCourse().getName();
78
                                                                String[] words = courseName.split(" ");
79
                                                                for(String word: words)
80
                                                                {
81
                                                                    if(word != null && word.length() > 3 && word.charAt(0) >= 'A' && word.charAt(0) <= 'Z' )
82
                                                                    {
83
                                                                        courseCode += word.charAt(0);
84
                                                                    }
85
                                                                }
86
                                                            }
87
 
88
                                                        %>
89
                                                        <html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (<%=courseCode%> ${unit.courseName} (${unit.courseCode}))</html:link>
266 jmachado 90
                                                    </li>
262 jmachado 91
                                                </logic:iterate>
266 jmachado 92
                                            </ul>
93
                                        </logic:notEmpty>
94
                                    </logic:present>
262 jmachado 95
                                </li>
215 jmachado 96
                            </ul>
97
                        </div>
376 jmachado 98
                        <div class="block">
99
                            <p><bean:message key="intranet.home.curricular"/></p>
100
                            <ul>
101
                                <li>
102
                                    <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.programs"/></html:link>
103
                                </li>
104
                            </ul>
105
                        </div>
215 jmachado 106
                    </td>
107
                </baco:isModuleOn>
204 jmachado 108
                <td class="column">
215 jmachado 109
                    <baco:isModuleOn module="courseunits">
110
                        <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/>
111
                    </baco:isModuleOn>
112
                    <baco:isModuleOn module="todos">
113
                        <jsp:include page="/user/home/todos.jsp"/>
114
                    </baco:isModuleOn>
204 jmachado 115
                </td>
116
            </tr>
117
        </tbody>
118
    </table>
119
</div>