4,6 → 4,7 |
<%@ page import="pt.estgp.estgweb.domain.User" %> |
<%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
<%@ page import="pt.estgp.estgweb.domain.views.CourseView" %> |
<%@ page import="pt.estgp.estgweb.utils.DatesUtils" %> |
<%@ page import="java.util.List" %> |
<%@ page contentType="text/html;charset=UTF-8" language="java" %> |
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
13,12 → 14,53 |
|
<% |
AbstractDao.getCurrentSession().beginTransaction(); |
String importYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAll(); |
|
|
%> |
<% |
String importYear = request.getParameter("importYear"); |
|
|
if(importYear == null || importYear.length()==0) |
{ |
importYear = DaoFactory.getConfigurationDaoImpl().getInterfaceImportYear(); |
} |
List<Course> courses = DaoFactory.getCourseDaoImpl().findAll(importYear); |
|
%> |
<div class="container"> |
<div class="row"> |
|
<div class="col-sm-12 col-md-6"> |
|
<div class="panel panel-primary"> |
<div class="panel-heading"><bean:message key="course.pedagogic.contents.admin"/> - <%=importYear%></div> |
<div class="panel-body"> |
<form role="form" action="<%=request.getContextPath()%>/user/courseComissions.do" method="post"> |
<div class="form-group"> |
<label for="importYear"><bean:message key="courseunit.importYear"/></label> |
<select name="importYear" id="importYear" class="form-control" onchange="this.form.submit()"> |
<option value="">Escolha o úlitmo ano em que o curso esteve ativo:</option> |
<% |
List<String> years = DatesUtils.getImportYears(10); |
for(String year: years) |
{ |
String activo = year.equals(importYear)?"selected":""; |
%> |
<option value="<%=year%>" <%=activo%>><%=year%></option> |
<% |
} |
%> |
</select> |
|
</div> |
</form> |
</div> |
</div> |
</div> |
</div> |
|
|
<style> |
.nav-menu li |
{ |