Rev 1699 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1516 | jmachado | 1 | <%@ page import="jomm.dao.impl.AbstractDao" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
3 | <%@ page import="pt.estgp.estgweb.domain.views.CourseView" %> |
||
4 | <%@ page import="pt.estgp.estgweb.web.utils.RequestUtils" %> |
||
5 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.IServiceManager" %> |
||
214 | jmachado | 6 | <%@ page import="pt.utl.ist.berserk.logic.serviceManager.ServiceManager" %> |
7 | <%@ page import="java.util.List" %> |
||
1540 | jmachado | 8 | <%@ page import="pt.estgp.estgweb.domain.dao.impl.ConfigurationDaoImpl" %> |
9 | <%@ page import="pt.estgp.estgweb.domain.*" %> |
||
10 | <%@ page import="pt.estgp.estgweb.web.UserSessionProxy" %> |
||
214 | jmachado | 11 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
12 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
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" %> |
||
1540 | jmachado | 18 | <jsp:useBean id="UserSession" type="pt.estgp.estgweb.domain.UserSessionImpl" scope="request"/> |
214 | jmachado | 19 | <% |
20 | IServiceManager sm = ServiceManager.getInstance(); |
||
21 | String[] names = new String[]{}; |
||
22 | Object[] args = new Object[]{}; |
||
23 | List<CourseView> courseViews = (List<CourseView>) sm.execute(RequestUtils.getRequester(request, response), "LoadCourses", args, names); |
||
24 | request.setAttribute("Courses", courseViews); |
||
1516 | jmachado | 25 | |
26 | |||
27 | AbstractDao.getCurrentSession().beginTransaction(); |
||
28 | List<CourseDepartment> departments = DaoFactory.getCourseDepartmentDaoImpl().findActives(); |
||
29 | request.setAttribute("departaments",departments); |
||
30 | |||
214 | jmachado | 31 | %> |
32 | <jsp:useBean id="Courses" type="java.util.List" scope="request"/> |
||
1699 | jmachado | 33 | |
214 | jmachado | 34 | <div class="seccao"> |
35 | <h2><bean:message key="course.select.message"/> </h2> |
||
36 | <div class="form"> |
||
1147 | jmachado | 37 | <table class="tablesorter tablesorterfiltered"> |
38 | <thead> |
||
39 | <tr> |
||
1540 | jmachado | 40 | <th class="filter-name filter-select">SITE IPP</th> |
1147 | jmachado | 41 | <th class="filter-name filter-select"><bean:message key="status"/></th> |
42 | <th><bean:message key="course.code"/>(SIGES)</th> |
||
1670 | jmachado | 43 | <th class="filter-name filter-select responsiveChosenFilter"><bean:message key="institution"/></th> |
1506 | jmachado | 44 | <th class="filter-name filter-select responsiveChosenFilter"><bean:message key="course.label"/></th> |
1147 | jmachado | 45 | <th class="filter-name filter-select"><bean:message key="course.degree"/></th> |
1516 | jmachado | 46 | <th class="filter-name filter-select"><bean:message key="course.area"/></th> |
1147 | jmachado | 47 | <th class="filter-name filter-select"><bean:message key="course.importYear"/></th> |
1540 | jmachado | 48 | <th> |
49 | <bean:message key="course.coordinator"/> |
||
50 | <%--<bean:message key="course.validation.role"/>--%> |
||
51 | |||
52 | </th> |
||
1147 | jmachado | 53 | <th><bean:message key="course.studies.plan"/></th> |
54 | <th></th> |
||
55 | </tr> |
||
56 | </thead> |
||
57 | <tbody> |
||
214 | jmachado | 58 | <logic:iterate id="course" name="Courses" type="pt.estgp.estgweb.domain.views.CourseView"> |
1147 | jmachado | 59 | <tr> |
60 | <td> |
||
1540 | jmachado | 61 | <logic:equal value="true" name="course" property="showStudiesPlan"> |
62 | <label class="label label-success"><bean:message key="yes"/></label> |
||
63 | </logic:equal> |
||
64 | <logic:equal value="false" name="course" property="showStudiesPlan"> |
||
65 | <bean:message key="no"/> |
||
66 | </logic:equal> |
||
67 | </td> |
||
68 | <td> |
||
1147 | jmachado | 69 | <logic:equal value="true" name="course" property="status"> |
70 | <bean:message key="yes"/> |
||
71 | </logic:equal> |
||
72 | <logic:equal value="false" name="course" property="status"> |
||
73 | <bean:message key="no"/> |
||
74 | </logic:equal> |
||
75 | </td> |
||
76 | <td>${course.code}</td> |
||
1699 | jmachado | 77 | <td <logic:empty name="course" property="courseDepartment">class="bg-red"</logic:empty>> |
78 | <logic:notEmpty name="course" property="courseDepartment"> |
||
79 | <logic:notEmpty name="course" property="courseDepartment.courseSchool"> |
||
80 | ${course.courseDepartment.courseSchool.name} |
||
81 | </logic:notEmpty> |
||
82 | </logic:notEmpty> |
||
83 | <logic:empty name="course" property="courseDepartment"> |
||
84 | |||
85 | </logic:empty> |
||
1670 | jmachado | 86 | </td> |
1147 | jmachado | 87 | <td>${course.name}</td> |
88 | <td><bean:message key="course.${course.degreeCleanCode}"/></td> |
||
1699 | jmachado | 89 | <td <logic:empty name="course" property="courseDepartment">class="bg-red"</logic:empty>> |
1516 | jmachado | 90 | <%--<baco:hasRole role="admin,all,servicesCoursesManagement"> |
91 | <html:select styleClass="form-control" name="course" property="area"> |
||
92 | <html:option value="">Nenhum</html:option> |
||
93 | <logic:iterate id="area" name="departaments" type="pt.estgp.estgweb.domain.CourseDepartmentImpl"> |
||
94 | <html:option value="${area.sigla}">${area.schoolFromInstitutionalCode} - ${area.name}</html:option> |
||
95 | </logic:iterate> |
||
96 | </html:select> |
||
97 | </baco:hasRole>--%> |
||
1699 | jmachado | 98 | <logic:notEmpty name="course" property="courseDepartment"> |
99 | ${course.courseDepartment.name} |
||
100 | </logic:notEmpty> |
||
1516 | jmachado | 101 | </td> |
1147 | jmachado | 102 | <td> |
1540 | jmachado | 103 | <% |
104 | if(course.getImportYear().equals(UserSession.getNowConfiguration().getInterfaceImportYear())) |
||
105 | { |
||
106 | %><label class="label label-info">${course.importYear}</label><% |
||
107 | } |
||
108 | else |
||
109 | { |
||
110 | %>${course.importYear}<% |
||
111 | } |
||
112 | %> |
||
113 | |||
114 | </td> |
||
1699 | jmachado | 115 | <td <logic:empty name="course" property="coordinator">class="bg-red"</logic:empty><logic:equal name="course" property="coordinator.name" value="">class="bg-red"</logic:equal>> |
116 | <logic:notEmpty name="course" property="coordinator"> |
||
117 | <logic:notEqual name="course" property="coordinator.name" value=""> |
||
118 | ${course.coordinator.name} |
||
119 | </logic:notEqual> |
||
120 | <logic:equal name="course" property="coordinator.name" value=""> |
||
121 | --- |
||
122 | </logic:equal> |
||
123 | </logic:notEmpty> |
||
1540 | jmachado | 124 | |
125 | |||
126 | <%--<logic:present name="course" property="validationRole"> |
||
1147 | jmachado | 127 | <bean:message key="user.role.${course.validationRole}"/> |
128 | </logic:present> |
||
129 | <logic:notPresent name="course" property="validationRole"> |
||
130 | --- |
||
1540 | jmachado | 131 | </logic:notPresent>--%> |
132 | |||
1147 | jmachado | 133 | </td> |
134 | <td> |
||
1540 | jmachado | 135 | |
136 | <logic:equal name="course" property="studiesPlanVersion" value=""> |
||
137 | --- |
||
138 | </logic:equal> |
||
139 | <logic:notEqual name="course" property="studiesPlanVersion" value=""> |
||
140 | <label class="label label-info">v${course.studiesPlanVersion}</label> |
||
141 | </logic:notEqual> |
||
142 | |||
143 | <%--</logic:notEqual> |
||
1147 | jmachado | 144 | <a href="<%=request.getContextPath()%>/repositoryStream/${course.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> |
145 | </logic:present> |
||
1540 | jmachado | 146 | <logic:notPresent name="course" property="studiesPlan"> |
1147 | jmachado | 147 | --- |
1540 | jmachado | 148 | </logic:notPresent>--%> |
1147 | jmachado | 149 | </td> |
150 | <td> |
||
1505 | jmachado | 151 | <a class="btn btn-warning" href="<%=request.getContextPath()%>/user/courseControllerFromServiceZone.do?dispatch=editAdmin&courseView.id=${course.id}"> |
1147 | jmachado | 152 | <span class="glyphicon glyphicon-pencil"></span> |
153 | </a> |
||
154 | </td> |
||
155 | </tr> |
||
214 | jmachado | 156 | </logic:iterate> |
1147 | jmachado | 157 | </tbody> |
158 | |||
159 | </table> |
||
160 | |||
214 | jmachado | 161 | </div> |
1516 | jmachado | 162 | </div> |
163 | <% |
||
164 | AbstractDao.getCurrentSession().getTransaction().commit(); |
||
165 | %> |