34,6 → 34,7 |
<% |
String importYear = request.getParameter("importYear"); |
|
String nowInterfaceImportYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
|
if(importYear == null || importYear.length()==0) |
{ |
86,16 → 87,18 |
<thead> |
<tr> |
<th>Codigo</th> |
<th>Grau</th> |
<th>Tipo de Curso</th> |
<th>Curso</th> |
<baco:hasRole role="services,admin,all"> |
<th>Activo</th> |
<th>Papel Comissão Curso</th> |
<th>Unidades <%=importYear%></th> |
<th>Unidades noutros anos</th> |
</baco:hasRole> |
<th>Comissão de Curso</th> |
<baco:hasRole role="services,admin,all"> |
<th></th> |
<th>Unidades</th> |
<th>Editar</th> |
</baco:hasRole> |
</tr> |
</thead> |
109,7 → 112,9 |
int unitsSize=DaoFactory.getCourseDaoImpl().countCoursesUnits(importYear,c.getId()); |
int unitsSizeOthers=DaoFactory.getCourseDaoImpl().countCoursesUnitsNot(importYear, c.getId()); |
int totalUnits = unitsSize + unitsSizeOthers; |
if(totalUnits > 0 || userSession.getUser().isAdmin() || userSession.getUser().hasRole("services")) |
//So da verdadeiro se estivermos neste ano e ele estiver inativo |
boolean notActiveAndActualThisYear = nowInterfaceImportYear.equals(importYear) && !cv.isStatus(); |
if((totalUnits > 0 && !notActiveAndActualThisYear) || userSession.getUser().isAdmin() || userSession.getUser().hasRole("services")) |
{ |
%> |
|
118,6 → 123,7 |
<td><bean:message key="course.${CourseView.degreeCleanCode}"/></td> |
<td>${CourseView.name}</td> |
<baco:hasRole role="services,admin,all"> |
<td>${CourseView.status}</td> |
<td> |
<logic:notEmpty name="CourseView" property="validationRole"> |
<bean:message key="user.role.${CourseView.validationRole}"/> |
157,7 → 163,13 |
<a class="btn btn-default" target="_blank" href="<%=request.getContextPath()%>/user/courseCourseUnits.do?courseId=<%=c.getId()%>"> |
<span class="glyphicon glyphicon-list-alt"></span> |
</a> |
|
</td> |
<td> |
<a class="btn btn-warning" target="_blank" href="<%=request.getContextPath()%>/user/courseControllerFromServiceZone.do?dispatch=edit&courseView.id=<%=c.getId()%>"> |
<span class="glyphicon glyphicon-pencil"></span> |
</a> |
</td> |
</baco:hasRole> |
</tr> |
<% |