Rev 1312 | Rev 1465 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1040 | jmachado | 1 | <%@ page import="jomm.utils.MessageResources" %> |
2 | <%@ page import="pt.estgp.estgweb.Globals" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.CourseUnit" %> |
||
4 | <%@ page import="pt.estgp.estgweb.domain.StudentImpl" %> |
||
5 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
6 | <%@ page import="pt.estgp.estgweb.domain.views.AnnouncementView" %> |
||
7 | <%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
||
8 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
||
766 | jmachado | 9 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
10 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
||
11 | <%@ page import="java.util.List" %> |
||
198 | jmachado | 12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
202 | jmachado | 13 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
14 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
15 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
16 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
17 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
18 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
19 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
20 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSession" scope="request"/> |
||
766 | jmachado | 21 | |
1312 | jmachado | 22 | |
633 | jmachado | 23 | <% |
766 | jmachado | 24 | IServiceManager sm = ServiceManager.getInstance(); |
25 | String subTarget = null; |
||
26 | String[] names = new String[]{}; |
||
27 | Object[] args = new Object[]{Globals.ANNOUNCEMENT_TYPE_POPUP, subTarget}; |
||
28 | List<AnnouncementView> popupViews = (List<AnnouncementView>) sm.execute(RequestUtils.getRequester(request, response), "LoadTypeMaxAnnouncements", args, names); |
||
633 | jmachado | 29 | |
766 | jmachado | 30 | request.setAttribute("Popups", popupViews); |
633 | jmachado | 31 | |
766 | jmachado | 32 | for(AnnouncementView popup: popupViews) |
33 | { |
||
633 | jmachado | 34 | %> |
766 | jmachado | 35 | <script type="text/javascript"> |
36 | |||
37 | window.open('<%=popup.getUrl()%>','<%=popup.getTitle()%>',"status=0,toolbar=0,menubar=0,scrollbars=0,location=0,resizable=0,width=<%=popup.getPopupwidth()%>,height=<%=popup.getPopupheight()%>"); |
||
38 | |||
39 | </script> |
||
40 | <% |
||
41 | } |
||
42 | %> |
||
43 | |||
44 | |||
45 | |||
46 | |||
1312 | jmachado | 47 | |
433 | jmachado | 48 | <logic:notMatch value="StudentImpl" name="UserSession" property="user.class.name"> |
1312 | jmachado | 49 | <div class="alert alert-warning"> |
50 | <bean:message key="profile.bad.profile.student.iregular.user.class"/> |
||
51 | </div> |
||
433 | jmachado | 52 | </logic:notMatch> |
1463 | jmachado | 53 | <baco:isModuleOn module="todos"> |
54 | <jsp:include page="/user/home/todos.jsp"/> |
||
55 | </baco:isModuleOn> |
||
1312 | jmachado | 56 | <div class="row"> |
57 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
301 | jmachado | 58 | |
1312 | jmachado | 59 | <baco:isModuleOn module="courseunits"> |
1040 | jmachado | 60 | <% |
61 | java.util.List<String> years = new java.util.ArrayList<String>(); |
||
62 | String nowImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction(); |
||
63 | years.add(DaoFactory.getConfigurationDaoImpl().getInterfaceImportYearCreateTransaction()); |
||
64 | years.add(DatesUtils.getPreviousImportYear(nowImportYear)); |
||
635 | jmachado | 65 | |
1040 | jmachado | 66 | java.util.Collections.sort(years, new java.util.Comparator<String>() |
67 | { |
||
68 | public int compare(String o1, String o2) { |
||
69 | return o2.compareTo(o1); |
||
70 | } |
||
71 | }); |
||
635 | jmachado | 72 | |
549 | jmachado | 73 | |
632 | jmachado | 74 | |
1040 | jmachado | 75 | for(String year: years) |
76 | { |
||
632 | jmachado | 77 | |
1040 | jmachado | 78 | String yearFormatted = pt.estgp.estgweb.utils.DatesUtils.getImportYearFormatted(year); |
633 | jmachado | 79 | |
632 | jmachado | 80 | |
1040 | jmachado | 81 | %> |
633 | jmachado | 82 | |
83 | |||
1040 | jmachado | 84 | <div class="panel panel-primary"> |
85 | <div class="panel-heading"><bean:message key="intranet.course.units"/> - <%=yearFormatted%></div> |
||
86 | <div class="panel-body"> |
||
632 | jmachado | 87 | |
634 | jmachado | 88 | |
1040 | jmachado | 89 | <% |
90 | String[] semestres = new String[]{"A","S1","S2","T1","T2","T3","T4"}; |
||
91 | String[] semestreLabel = new String[]{ |
||
92 | MessageResources.getMessage(request, "courseunit.anuais"), |
||
93 | MessageResources.getMessage(request,"courseunit.semestre") + "1", |
||
94 | MessageResources.getMessage(request,"courseunit.semestre") + "2", |
||
95 | MessageResources.getMessage(request,"courseunit.trimestre") + "1", |
||
96 | MessageResources.getMessage(request,"courseunit.trimestre") + "2", |
||
97 | MessageResources.getMessage(request,"courseunit.trimestre") + "3", |
||
98 | MessageResources.getMessage(request,"courseunit.trimestre") + "4"}; |
||
632 | jmachado | 99 | |
1040 | jmachado | 100 | for(int i =0;i< semestres.length;i++) |
101 | { |
||
102 | request.setAttribute("LABEL",semestreLabel[i]); |
||
103 | %> |
||
634 | jmachado | 104 | |
1040 | jmachado | 105 | <jsp:useBean id="LABEL" scope="request" type="java.lang.String"/> |
106 | <% |
||
107 | StudentImpl u = ((pt.estgp.estgweb.domain.StudentImpl)UserSession.getUser()); |
||
108 | List<pt.estgp.estgweb.domain.CourseUnit> cus= |
||
109 | (List<CourseUnit>) |
||
110 | u.getClass().getMethod("getSubscribedUnitsView" + semestres[i],String.class) |
||
111 | .invoke(u,year); |
||
112 | request.setAttribute("units",cus); |
||
113 | if(cus == null || cus.size() == 0) |
||
114 | {} |
||
115 | else if(cus.size() > 0) |
||
116 | { |
||
117 | %> |
||
118 | <jsp:useBean id="units" scope="request" type="java.util.Collection"/> |
||
1312 | jmachado | 119 | <div class="list-group"> |
120 | <div class="list-group-item list-group-item-heading"><bean:write name="LABEL"/></div> |
||
121 | |||
122 | <logic:iterate id="unit" name="units" type="pt.estgp.estgweb.domain.CourseUnit"> |
||
123 | <div class="list-group-item"> |
||
124 | <div class="row"> |
||
125 | <div class="col-sm-10"><html:link action="/user/startLoadCourseUnitFromHome?id=${unit.id}">${unit.name} (${unit.courseName} (${unit.courseCode}) (${unit.cdTurma}))</html:link></div> |
||
126 | <div class="col-sm-2"><html:link action="/user/startLoadCourseUnitRootFromHome?courseUnitView.id=${unit.id}"> <span style="padding:5px" class="glyphicon glyphicon-folder-open"></span> </html:link></div> |
||
127 | </div> |
||
128 | </div> |
||
129 | </logic:iterate> |
||
130 | </div> |
||
1040 | jmachado | 131 | <% |
132 | } |
||
133 | } |
||
634 | jmachado | 134 | |
1040 | jmachado | 135 | %> |
1312 | jmachado | 136 | |
1040 | jmachado | 137 | </div> |
138 | </div> |
||
139 | <% |
||
140 | } |
||
141 | %> |
||
635 | jmachado | 142 | |
634 | jmachado | 143 | |
728 | jmachado | 144 | |
145 | |||
146 | |||
215 | jmachado | 147 | </baco:isModuleOn> |
1312 | jmachado | 148 | </div> |
149 | <div class="col-md-6 col-sm-12 col-xs-12"> |
||
1040 | jmachado | 150 | <div class="panel panel-primary"> |
151 | <div class="panel-heading"><bean:message key="intranet.home.curricular"/></div> |
||
152 | <div class="panel-body"> |
||
1054 | jmachado | 153 | <ul> |
154 | <li> |
||
155 | <html:link action="/user/startLoadCoursesProgramsFromHome"><bean:message key="courseunit.indexes"/> (Novo Estilo) </html:link> |
||
156 | </li> |
||
157 | </ul> |
||
1040 | jmachado | 158 | </div> |
159 | </div> |
||
1312 | jmachado | 160 | |
1054 | jmachado | 161 | <div class="panel panel-primary"> |
162 | <div class="panel-heading">Atalhos</div> |
||
163 | <div class="panel-body"> |
||
164 | <ul> |
||
165 | <li> |
||
166 | <a href="<%=request.getContextPath()%>/dir/utilsIntranet/horarios/intranet/escola/horarios.html">Horários</a> |
||
167 | </li> |
||
168 | <li> |
||
169 | <a href="<%=request.getContextPath()%>/dir/utilsIntranet/calEscolar/public/portal/CL20102011.pdf">Calendário Escolar</a> |
||
170 | </li> |
||
171 | <li> |
||
172 | <a href="<%=request.getContextPath()%>/dir/utilsIntranet/secretaria/Forms.Alunos/intranet/escola/secretaria/formulariosAlunos.html">Formulários Alunos</a> |
||
173 | </li> |
||
174 | <li> |
||
1312 | jmachado | 175 | <a href="<%=request.getContextPath()%>/user/startProfileGrades.do">Notas Importadas para o Baco</a> (Sincronizadas a partir do NETPA periodicamente) - Listagem meramente informativa (Para consultar as suas notas oficiais deve fazê-lo pelo sistema <a href="http://netpa.ipportalegre.pt">NETPA</a>) |
176 | <logic:equal value="false" name="UserSession" property="user.propinasEmDia">(Situação de propinas não confirmada no sistema central, deve consultar o <a href="http://netpa.ipportalegre.pt">NETPA</a>)</logic:equal> |
||
1054 | jmachado | 177 | </li> |
178 | |||
179 | </ul> |
||
180 | </div> |
||
181 | </div> |
||
1312 | jmachado | 182 | |
215 | jmachado | 183 | <baco:isModuleOn module="courseunits"> |
184 | <jsp:include page="/user/home/courseUnitsAnnouncements.jsp"/> |
||
185 | </baco:isModuleOn> |
||
1463 | jmachado | 186 | |
1312 | jmachado | 187 | </div> |
766 | jmachado | 188 | </div> |