Rev 1285 | Blame | Compare with Previous | Last modification | View Log | RSS feed
<%@ page import="java.util.List" %>
<%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %>
<%@ page import="pt.estgp.estgweb.Globals" %>
<%@ page import="java.util.ArrayList" %>
<%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
<jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/>
<script>
function alertPermissions()
{
alert("Aviso a transmitir ao Centro Informático. Este procedimento afecta as permissões atuais no sistema de ficheiros da intranet. Após salvar estas alterações, por favor gere o BAT de geração de pastas e corra-o novamente na raiz do servidor IONLINE")
}
function alertFolders(place)
{
alert("Aviso a transmitir ao Centro Informático. Caro administrador, lembramos-lhe que alterar o " + place + " de uma unidade curricular implica trocar a pasta de ficheiros da intranet do " + place + " onde esta se encontrava para o " + place + " onde actualmente se encontra. O BACO irá actualizar a nova LOCALIZAÇÃO da pasta de ficheiros na sua base de dados. Mas a pasta terá de ser fisicamente alterada pela administração de sistemas.");
}
</script>
<html:errors/>
<jomm:messages/>
<html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data">
<input type="hidden" name="dispatch" value="submit"/>
<html:hidden property="courseView.id"/>
<logic:present name="CourseView" property="htmlResult">
<pre class="log">
<bean:write name="CourseView" property="htmlResult"/>
</pre>
</logic:present>
<table class="form">
<tr>
<th>
<bean:message key="course.code"/>
</th>
<td>
<html:text property="courseView.code"/>
</td>
</tr>
<tr>
<th>
<bean:message key="course.area"/>
</th>
<td>
<html:select property="courseView.area">
<logic:iterate id="area" name="CourseForm" property="areas">
<html:option value="${area}" key="area.${area}"/>
</logic:iterate>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="name"/>
</th>
<td>
<html:text property="courseView.name"/>
</td>
</tr>
<tr>
<th>
<bean:message key="status"/>
</th>
<td>
<html:select property="courseView.status">
<html:option value="true"><bean:message key="yes"/></html:option>
<html:option value="false"><bean:message key="no"/></html:option>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="course.degree"/>
</th>
<td>
<html:select property="courseView.degree">
<html:option value="B"><bean:message key="course.B"/></html:option>
<html:option value="L"><bean:message key="course.L"/></html:option>
<html:option value="M"><bean:message key="course.M"/></html:option>
<html:option value="P"><bean:message key="course.P"/></html:option>
<html:option value="E"><bean:message key="course.E"/></html:option>
<html:option value="A"><bean:message key="course.A"/></html:option>
<html:option value="C"><bean:message key="course.C"/></html:option>
<html:option value="O"><bean:message key="course.O"/></html:option>
<html:option value="T"><bean:message key="course.T"/></html:option>
</html:select>
** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento
</td>
</tr>
<tr>
<th>
<bean:message key="course.importYear"/>
</th>
<td>
<html:select property="courseView.importYear">
<logic:iterate id="item" name="CourseForm" property="importYears">
<html:option value="${item}">${item}</html:option>
</logic:iterate>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="course.institutionalCode"/>
</th>
<td>
<html:text property="courseView.institutionalCode"/>
</td>
</tr>
<tr>
<th>
<bean:message key="course.userGroupStudents"/>
</th>
<td>
<html:text onchange="alertPermissions()" property="courseView.userGroupStudents"/>
</td>
</tr>
<tr>
<th>
<bean:message key="course.description"/>
</th>
<td>
<html:textarea property="courseView.description"/>
</td>
</tr>
<tr>
<th>
<bean:message key="course.coordinator"/>
</th>
<td>
<html:select onchange="alertPermissions()" property="courseView.coordinator.id">
<html:option value="0">
<bean:message key="none"/>
</html:option>
<logic:present name="CourseForm" property="teachers">
<logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<html:option value="${teacher.id}">
(${teacher.code}) ${teacher.name}
</html:option>
</logic:iterate>
</logic:present>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="course.director"/>
</th>
<td>
<html:select onchange="alertPermissions()" property="courseView.director.id">
<html:option value="0">
<bean:message key="none"/>
</html:option>
<logic:present name="CourseForm" property="teachers">
<logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
<html:option value="${teacher.id}">
(${teacher.code}) ${teacher.name}
</html:option>
</logic:iterate>
</logic:present>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="course.validation.role"/>
</th>
<%
List<String> targetRoles = new ArrayList<String>();
for(String role: UserRoleProxy.getUserRoles())
{
if(role.startsWith("courseValidateProgram"))
targetRoles.add(role);
}
request.setAttribute("targetRoles",targetRoles);
%>
<td>
<html:select onchange="alertPermissions()" property="courseView.validationRole">
<logic:iterate id="role" name="targetRoles">
<html:option value="${role}" key="user.role.${role}"/>
</logic:iterate>
</html:select>
</td>
</tr>
<tr>
<th>
<bean:message key="course.externalSite"/>
</th>
<td>
<html:select property="courseView.externalSiteServer">
<html:option value="estgp">ESTG</html:option>
</html:select>
<html:text property="courseView.externalSitePath"/>
</td>
</tr>
<tr>
<th>
<bean:message key="course.studies.plan"/>
</th>
<td>
<html:file property="studiesPlan"/>
<logic:present name="CourseView" property="studiesPlan">
<a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
</logic:present>
<logic:notPresent name="CourseView" property="studiesPlan">
<bean:message key="course.studies.plan.not.available"/>
</logic:notPresent>
</td>
</tr>
<tr class="buttons">
<td colspan="2">
<input type="button"
onclick="set(this.form,'submit');this.form.submit()"
value="<bean:message key="confirm"/>"/>
</td>
</tr>
</table>
</html:form>