Subversion Repositories bacoAlunos

Rev

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