Subversion Repositories bacoAlunos

Rev

Rev 797 | Rev 897 | 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>
82
            * SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Confirmar Mestrados e Pos graduacoes e informar equipa de desenvolvimento
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>
105
    <tr>
106
        <th>
107
            <bean:message key="course.description"/>
108
        </th>
109
        <td>
110
            <html:textarea property="courseView.description"/>
111
        </td>
112
    </tr>
113
    <tr>
114
        <th>
115
            <bean:message key="course.coordinator"/>
116
        </th>
117
        <td>
118
            <html:select property="courseView.coordinator.id">
119
                <html:option value="0">
120
                    <bean:message key="none"/>
121
                </html:option>
122
                <logic:present name="CourseForm" property="teachers">
123
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
124
                        <html:option value="${teacher.id}">
125
                            (${teacher.code}) ${teacher.name}
126
                        </html:option>
127
                    </logic:iterate>
128
                </logic:present>
129
            </html:select>
130
        </td>
131
    </tr>
132
    <tr>
133
        <th>
134
            <bean:message key="course.director"/>
135
        </th>
136
        <td>
137
            <html:select property="courseView.director.id">
138
                <html:option value="0">
139
                    <bean:message key="none"/>
140
                </html:option>
141
                <logic:present name="CourseForm" property="teachers">
142
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
143
                        <html:option value="${teacher.id}">
144
                            (${teacher.code}) ${teacher.name}
145
                        </html:option>
146
                    </logic:iterate>
147
                </logic:present>
148
            </html:select>
149
        </td>
150
    </tr>
507 jmachado 151
 
152
 
153
 
154
 
155
 
214 jmachado 156
    <tr>
507 jmachado 157
        <th>
158
            <bean:message key="course.validation.role"/>
159
        </th>
160
        <%
161
 
162
            List<String> targetRoles = new ArrayList<String>();
163
            for(String role: Globals.USER_ROLES)
164
            {
165
                if(role.startsWith("courseValidateProgram"))
166
                    targetRoles.add(role);
167
            }
168
            request.setAttribute("targetRoles",targetRoles);
169
        %>
249 jmachado 170
        <td>
507 jmachado 171
            <html:select property="courseView.validationRole">
172
                 <logic:iterate id="role" name="targetRoles">
173
                     <html:option value="${role}" key="user.role.${role}"/>
174
                </logic:iterate>
175
            </html:select>
176
        </td>
177
    </tr>
249 jmachado 178
 
507 jmachado 179
 
180
 
181
 
182
 
183
    <tr>
184
        <td>
185
 
249 jmachado 186
             <bean:message key="course.externalSite"/>
187
        </td>
188
        <td>
189
            <html:select property="courseView.externalSiteServer">
190
                <html:option value="estgp">ESTG</html:option>
191
            </html:select>
192
            <html:text property="courseView.externalSitePath"/>
193
        </td>
194
    </tr>
195
    <tr>
214 jmachado 196
        <th>
197
            <bean:message key="course.studies.plan"/>
198
        </th>
199
        <td>
200
            <html:file property="studiesPlan"/>
201
            <logic:present name="CourseView" property="studiesPlan">
202
                <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
203
            </logic:present>
204
            <logic:notPresent name="CourseView" property="studiesPlan">
205
                <bean:message key="course.studies.plan.not.available"/>
206
            </logic:notPresent>
207
        </td>
208
    </tr>
209
    <tr class="buttons">
210
        <td colspan="2">
211
            <input type="button"
212
                   onclick="set(this.form,'submit');this.form.submit()"
213
                   value="<bean:message key="confirm"/>"/>
214
        </td>
215
    </tr>
216
</table>
217
 
218
</html:form>