Subversion Repositories bacoAlunos

Rev

Rev 444 | Rev 790 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
507 jmachado 1
<%@ page import="java.util.List" %>
2
<%@ page import="pt.estgp.estgweb.utils.ConfigProperties" %>
3
<%@ page import="pt.estgp.estgweb.Globals" %>
4
<%@ page import="java.util.ArrayList" %>
214 jmachado 5
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
6
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
7
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
8
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
9
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
10
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
11
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
12
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
13
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
14
<jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/>
444 jmachado 15
<html:errors/>
16
<jomm:messages/>
214 jmachado 17
<html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data">
18
<input type="hidden" name="dispatch" value="submit"/>
19
<html:hidden property="courseView.id"/>
248 jmachado 20
<logic:present name="CourseView" property="htmlResult">
21
    <pre class="log">
22
        <bean:write name="CourseView" property="htmlResult"/>
23
    </pre>
24
</logic:present>
214 jmachado 25
<table class="form">
26
    <tr>
27
        <th>
28
            <bean:message key="course.code"/>
29
        </th>
30
        <td>
31
            <html:text property="courseView.code"/>
32
        </td>
33
    </tr>
34
    <tr>
35
        <th>
376 jmachado 36
            <bean:message key="course.area"/>
37
        </th>
38
 
39
        <td>
40
            <html:select property="courseView.area">
41
                <logic:iterate id="area" name="CourseForm" property="areas">
42
                    <html:option value="${area}" key="area.${area}"/>
43
                </logic:iterate>
44
            </html:select>
45
        </td>
46
    </tr>
47
    <tr>
48
        <th>
214 jmachado 49
            <bean:message key="name"/>
50
        </th>
51
        <td>
52
            <html:text property="courseView.name"/>
53
        </td>
54
    </tr>
55
    <tr>
56
        <th>
57
            <bean:message key="course.degree"/>
58
        </th>
59
        <td>
60
            <html:select property="courseView.degree">
249 jmachado 61
                <html:option value="B"><bean:message key="course.B"/></html:option>
62
                <html:option value="L"><bean:message key="course.L"/></html:option>
63
                <html:option value="M"><bean:message key="course.M"/></html:option>
64
                <html:option value="P"><bean:message key="course.P"/></html:option>
65
                <html:option value="E"><bean:message key="course.E"/></html:option>
417 jmachado 66
                <html:option value="A"><bean:message key="course.A"/></html:option>
67
                <html:option value="C"><bean:message key="course.C"/></html:option>
68
                <html:option value="O"><bean:message key="course.O"/></html:option>
214 jmachado 69
            </html:select>
70
            * SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Confirmar Mestrados e Pos graduacoes e informar equipa de desenvolvimento
71
        </td>
72
    </tr>
73
    <tr>
74
        <th>
75
            <bean:message key="course.importYear"/>
76
        </th>
77
        <td>
78
            <html:select property="courseView.importYear">
79
                <logic:iterate id="item" name="CourseForm" property="importYears">
80
                    <html:option value="${item}">${item}</html:option>
81
                </logic:iterate>
82
            </html:select>
83
        </td>
84
    </tr>
85
    <tr>
86
        <th>
87
            <bean:message key="course.institutionalCode"/>
88
        </th>
89
        <td>
90
            <html:text property="courseView.institutionalCode"/>
91
        </td>
92
    </tr>
93
    <tr>
94
        <th>
95
            <bean:message key="course.description"/>
96
        </th>
97
        <td>
98
            <html:textarea property="courseView.description"/>
99
        </td>
100
    </tr>
101
    <tr>
102
        <th>
103
            <bean:message key="course.coordinator"/>
104
        </th>
105
        <td>
106
            <html:select property="courseView.coordinator.id">
107
                <html:option value="0">
108
                    <bean:message key="none"/>
109
                </html:option>
110
                <logic:present name="CourseForm" property="teachers">
111
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
112
                        <html:option value="${teacher.id}">
113
                            (${teacher.code}) ${teacher.name}
114
                        </html:option>
115
                    </logic:iterate>
116
                </logic:present>
117
            </html:select>
118
        </td>
119
    </tr>
120
    <tr>
121
        <th>
122
            <bean:message key="course.director"/>
123
        </th>
124
        <td>
125
            <html:select property="courseView.director.id">
126
                <html:option value="0">
127
                    <bean:message key="none"/>
128
                </html:option>
129
                <logic:present name="CourseForm" property="teachers">
130
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
131
                        <html:option value="${teacher.id}">
132
                            (${teacher.code}) ${teacher.name}
133
                        </html:option>
134
                    </logic:iterate>
135
                </logic:present>
136
            </html:select>
137
        </td>
138
    </tr>
507 jmachado 139
 
140
 
141
 
142
 
143
 
214 jmachado 144
    <tr>
507 jmachado 145
        <th>
146
            <bean:message key="course.validation.role"/>
147
        </th>
148
        <%
149
 
150
            List<String> targetRoles = new ArrayList<String>();
151
            for(String role: Globals.USER_ROLES)
152
            {
153
                if(role.startsWith("courseValidateProgram"))
154
                    targetRoles.add(role);
155
            }
156
            request.setAttribute("targetRoles",targetRoles);
157
        %>
249 jmachado 158
        <td>
507 jmachado 159
            <html:select property="courseView.validationRole">
160
                 <logic:iterate id="role" name="targetRoles">
161
                     <html:option value="${role}" key="user.role.${role}"/>
162
                </logic:iterate>
163
            </html:select>
164
        </td>
165
    </tr>
249 jmachado 166
 
507 jmachado 167
 
168
 
169
 
170
 
171
    <tr>
172
        <td>
173
 
249 jmachado 174
             <bean:message key="course.externalSite"/>
175
        </td>
176
        <td>
177
            <html:select property="courseView.externalSiteServer">
178
                <html:option value="estgp">ESTG</html:option>
179
            </html:select>
180
            <html:text property="courseView.externalSitePath"/>
181
        </td>
182
    </tr>
183
    <tr>
214 jmachado 184
        <th>
185
            <bean:message key="course.studies.plan"/>
186
        </th>
187
        <td>
188
            <html:file property="studiesPlan"/>
189
            <logic:present name="CourseView" property="studiesPlan">
190
                <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
191
            </logic:present>
192
            <logic:notPresent name="CourseView" property="studiesPlan">
193
                <bean:message key="course.studies.plan.not.available"/>
194
            </logic:notPresent>
195
        </td>
196
    </tr>
197
    <tr class="buttons">
198
        <td colspan="2">
199
            <input type="button"
200
                   onclick="set(this.form,'submit');this.form.submit()"
201
                   value="<bean:message key="confirm"/>"/>
202
        </td>
203
    </tr>
204
</table>
205
 
206
</html:form>