Rev 1667 | Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1618 | jmachado | 1 | <%@ page import="pt.estgp.estgweb.domain.Course" %> |
2 | <%@ page import="pt.estgp.estgweb.domain.dao.DaoFactory" %> |
||
3 | <%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %> |
||
4 | <%@ page import="java.util.List" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %> |
||
10 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
11 | <%@taglib prefix="bacoTags" tagdir="/WEB-INF/tags" %> |
||
12 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
13 | <% |
||
14 | boolean showAllCourses = request.getParameter("showAllCourses") != null ? Boolean.parseBoolean(request.getParameter("showAllCourses")) : false; |
||
15 | boolean showWithStudiesPlanActive = ! showAllCourses; |
||
16 | List<String> institutionCodes = ConfigProperties.getListValues("institution.code.prefix.inverse."); |
||
17 | %> |
||
18 | <script> |
||
19 | $(document).ready( |
||
20 | function(){ |
||
21 | |||
22 | } |
||
23 | ); |
||
24 | |||
25 | |||
26 | function showInstitutionCode(institutionCode) |
||
27 | { |
||
28 | <% |
||
29 | for(String institutionCode: institutionCodes) |
||
30 | { |
||
31 | %> |
||
32 | if(institutionCode == '<%=institutionCode%>') |
||
33 | { |
||
34 | $("#institution<%=institutionCode%>").show(); |
||
35 | $("#institutionsSeparators<%=institutionCode%>").addClass("active"); |
||
36 | } |
||
37 | else |
||
38 | { |
||
39 | $("#institution<%=institutionCode%>").hide(); |
||
40 | $("#institutionsSeparators<%=institutionCode%>").removeClass("active"); |
||
41 | } |
||
42 | <% |
||
43 | } |
||
44 | %> |
||
45 | } |
||
46 | |||
47 | function showDegreeInst(degree,inst) |
||
48 | { |
||
49 | $(".degree").hide(); |
||
50 | $("#institution" + inst + " #degree" + degree).show(); |
||
51 | $(".degreeSep").removeClass("active"); |
||
52 | $("#degreeSeparators" + degree).addClass("active"); |
||
53 | } |
||
54 | </script> |
||
55 | |||
56 | <p>Nesta listagem apenas são mostrados os Cursos publicos no Site do IPP, se o curso que procura não está listado clique aqui para ver todos <a class="btn btn-default" href="<%=request.getContextPath()%>/user/showRoleUsers.do?showAllCourses=true#comissoes">Mostrar Todos</a></p> |
||
57 | |||
58 | |||
59 | <!--TBS DE INSTITUICAO--> |
||
60 | <ul class="nav nav-tabs"> |
||
61 | <% |
||
62 | for(String institutionCode: institutionCodes) |
||
63 | { |
||
64 | String institutionName = ConfigProperties.getProperty("institution.code." + institutionCode); |
||
65 | %> |
||
66 | <li id="institutionsSeparators<%=institutionCode%>"><a href="javascript:showInstitutionCode('<%=institutionCode%>')"><%=institutionName%></a></li> |
||
67 | <% |
||
68 | } |
||
69 | %> |
||
70 | </ul> |
||
71 | <!--TBS DE INSTITUICAO--> |
||
72 | |||
73 | <% |
||
74 | for(String instCode : institutionCodes) |
||
75 | { |
||
76 | %> |
||
77 | <div class="panel panel-default" id="institution<%=instCode%>" style="display: none"> |
||
78 | <div class="panel-heading"> |
||
79 | Tipos de Curso da <%=ConfigProperties.getProperty("institution.code." + instCode)%> |
||
80 | </div> |
||
81 | <div class="panel-body"> |
||
82 | |||
83 | |||
84 | <% |
||
85 | List<String> degrees = DaoFactory.getCourseDaoImpl().findDegrees(instCode,showWithStudiesPlanActive); |
||
86 | %> |
||
87 | <!--TBS DE DEGREES--> |
||
88 | <ul class="nav nav-tabs"> |
||
89 | <% |
||
90 | for(String degree: degrees) |
||
91 | { |
||
92 | %> |
||
93 | <li class="degreeSep" id="degreeSeparators<%=degree%>"><a href="javascript:showDegreeInst('<%=degree%>','<%=instCode%>')"><%=ConfigProperties.getProperty("course.degree.desc.plural." + degree)%></a></li> |
||
94 | <% |
||
95 | } |
||
96 | %> |
||
97 | </ul> |
||
98 | <!--TBS DE DEGREES--> |
||
99 | <% |
||
100 | for(String degree: degrees) |
||
101 | { |
||
102 | |||
103 | %> |
||
104 | |||
105 | |||
106 | |||
107 | <div class="degree" id="degree<%=degree%>" style="display: none"> |
||
108 | <% |
||
109 | List<Course> courses = DaoFactory.getCourseDaoImpl().findAllCoursesOrderByNameEvenWithoutCourseUnit(instCode,degree,showWithStudiesPlanActive); |
||
110 | for(Course course: courses) |
||
111 | { |
||
112 | request.setAttribute("course",course); |
||
113 | %> |
||
114 | <h4 class="well well-sm clearfix"> |
||
115 | <%=course.getName()%> (<%=course.getCode()%>) |
||
116 | <baco:isAdmin> |
||
117 | <%--<bacoTags:callAjaxModal targetUrl="/user/courseControllerFromServiceZone.do?dispatch=editAdmin&courseView.id=${course.id}" title="Atalho para Edição do Curso ${course.name}" btnClass="btn btn-warning pull-right btn-xs" btnIconClass="glyphicon-wrench"/>--%> |
||
118 | <a class="btn btn-warning pull-right btn-xs" target="_blank" href="<%=request.getContextPath()%>/user/courseControllerFromServiceZone.do?dispatch=editAdmin&courseView.id=${course.id}"> |
||
119 | <span class="glyphicon glyphicon-wrench"></span> |
||
120 | </a> |
||
121 | </baco:isAdmin> |
||
122 | </h4> |
||
123 | |||
124 | <p>Papel da Coordenação:</label> |
||
125 | <logic:notEmpty name="course" property="validationRole"><bean:message key="user.role.${course.validationRole}"/></logic:notEmpty> |
||
126 | <logic:empty name="course" property="validationRole">Este curso não tem papel definido para a sua Coordenação, por favor contacte os serviços de informática, terá de ser definido um papel para a coordenação para lhe poder adicionar elementos</logic:empty> |
||
127 | </p> |
||
128 | <p>Coordenador: |
||
129 | <% |
||
130 | if(course.getCoordinator() != null) |
||
131 | { |
||
132 | %><%=course.getCoordinator().getName()%> (<%=course.getCoordinator().getSigesCode()%>)<% |
||
133 | } |
||
134 | else |
||
135 | { |
||
136 | %>Não está atribuido<% |
||
137 | } |
||
138 | %> |
||
139 | </p> |
||
140 | <% |
||
141 | if(course.getValidationRole() != null && course.getValidationRole().length() > 0) |
||
142 | { |
||
143 | %> |
||
144 | <bacoTags:printRoleGroup title="Restante Coordenação" role="${course.validationRole}" transactional="true"/> |
||
145 | <% |
||
146 | } |
||
147 | } |
||
148 | %> |
||
149 | </div><!--Degree div End--> |
||
150 | <% |
||
151 | } |
||
152 | |||
153 | %> |
||
154 | </div><!--Panel Body--> |
||
155 | </div><!--Panel Instituicao--> |
||
156 | <% |
||
157 | } |
||
158 | %> |