Subversion Repositories bacoAlunos

Rev

Rev 897 | Rev 1133 | 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>
790 jmachado 57
            <bean:message key="status"/>
58
        </th>
59
        <td>
791 jmachado 60
            <html:select property="courseView.status">
797 jmachado 61
                <html:option value="true"><bean:message key="yes"/></html:option>
62
                <html:option value="false"><bean:message key="no"/></html:option>
790 jmachado 63
            </html:select>
64
        </td>
65
    </tr>
66
    <tr>
67
        <th>
214 jmachado 68
            <bean:message key="course.degree"/>
69
        </th>
70
        <td>
71
            <html:select property="courseView.degree">
249 jmachado 72
                <html:option value="B"><bean:message key="course.B"/></html:option>
73
                <html:option value="L"><bean:message key="course.L"/></html:option>
74
                <html:option value="M"><bean:message key="course.M"/></html:option>
75
                <html:option value="P"><bean:message key="course.P"/></html:option>
76
                <html:option value="E"><bean:message key="course.E"/></html:option>
417 jmachado 77
                <html:option value="A"><bean:message key="course.A"/></html:option>
78
                <html:option value="C"><bean:message key="course.C"/></html:option>
79
                <html:option value="O"><bean:message key="course.O"/></html:option>
896 jmachado 80
                <html:option value="T"><bean:message key="course.T"/></html:option>
214 jmachado 81
            </html:select>
897 jmachado 82
            ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Confirmar Mestrados e Pos graduacoes e informar equipa de desenvolvimento
214 jmachado 83
        </td>
84
    </tr>
85
    <tr>
86
        <th>
87
            <bean:message key="course.importYear"/>
88
        </th>
89
        <td>
90
            <html:select property="courseView.importYear">
91
                <logic:iterate id="item" name="CourseForm" property="importYears">
92
                    <html:option value="${item}">${item}</html:option>
93
                </logic:iterate>
94
            </html:select>
95
        </td>
96
    </tr>
97
    <tr>
98
        <th>
99
            <bean:message key="course.institutionalCode"/>
100
        </th>
101
        <td>
102
            <html:text property="courseView.institutionalCode"/>
103
        </td>
104
    </tr>
901 jmachado 105
 
214 jmachado 106
    <tr>
107
        <th>
901 jmachado 108
            <bean:message key="course.userGroupStudents"/>
109
        </th>
110
        <td>
111
            <html:text property="courseView.userGroupStudents"/>
112
        </td>
113
    </tr>
114
 
115
    <tr>
116
        <th>
214 jmachado 117
            <bean:message key="course.description"/>
118
        </th>
119
        <td>
120
            <html:textarea property="courseView.description"/>
121
        </td>
122
    </tr>
123
    <tr>
124
        <th>
125
            <bean:message key="course.coordinator"/>
126
        </th>
127
        <td>
128
            <html:select property="courseView.coordinator.id">
129
                <html:option value="0">
130
                    <bean:message key="none"/>
131
                </html:option>
132
                <logic:present name="CourseForm" property="teachers">
133
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
134
                        <html:option value="${teacher.id}">
135
                            (${teacher.code}) ${teacher.name}
136
                        </html:option>
137
                    </logic:iterate>
138
                </logic:present>
139
            </html:select>
140
        </td>
141
    </tr>
142
    <tr>
143
        <th>
144
            <bean:message key="course.director"/>
145
        </th>
146
        <td>
147
            <html:select property="courseView.director.id">
148
                <html:option value="0">
149
                    <bean:message key="none"/>
150
                </html:option>
151
                <logic:present name="CourseForm" property="teachers">
152
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
153
                        <html:option value="${teacher.id}">
154
                            (${teacher.code}) ${teacher.name}
155
                        </html:option>
156
                    </logic:iterate>
157
                </logic:present>
158
            </html:select>
159
        </td>
160
    </tr>
507 jmachado 161
 
162
 
163
 
164
 
165
 
214 jmachado 166
    <tr>
507 jmachado 167
        <th>
168
            <bean:message key="course.validation.role"/>
169
        </th>
170
        <%
171
 
172
            List<String> targetRoles = new ArrayList<String>();
173
            for(String role: Globals.USER_ROLES)
174
            {
175
                if(role.startsWith("courseValidateProgram"))
176
                    targetRoles.add(role);
177
            }
178
            request.setAttribute("targetRoles",targetRoles);
179
        %>
249 jmachado 180
        <td>
507 jmachado 181
            <html:select property="courseView.validationRole">
182
                 <logic:iterate id="role" name="targetRoles">
183
                     <html:option value="${role}" key="user.role.${role}"/>
184
                </logic:iterate>
185
            </html:select>
186
        </td>
187
    </tr>
249 jmachado 188
 
507 jmachado 189
 
190
 
191
 
192
 
193
    <tr>
194
        <td>
195
 
249 jmachado 196
             <bean:message key="course.externalSite"/>
197
        </td>
198
        <td>
199
            <html:select property="courseView.externalSiteServer">
200
                <html:option value="estgp">ESTG</html:option>
201
            </html:select>
202
            <html:text property="courseView.externalSitePath"/>
203
        </td>
204
    </tr>
205
    <tr>
214 jmachado 206
        <th>
207
            <bean:message key="course.studies.plan"/>
208
        </th>
209
        <td>
210
            <html:file property="studiesPlan"/>
211
            <logic:present name="CourseView" property="studiesPlan">
212
                <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
213
            </logic:present>
214
            <logic:notPresent name="CourseView" property="studiesPlan">
215
                <bean:message key="course.studies.plan.not.available"/>
216
            </logic:notPresent>
217
        </td>
218
    </tr>
219
    <tr class="buttons">
220
        <td colspan="2">
221
            <input type="button"
222
                   onclick="set(this.form,'submit');this.form.submit()"
223
                   value="<bean:message key="confirm"/>"/>
224
        </td>
225
    </tr>
226
</table>
227
 
228
</html:form>