Subversion Repositories bacoAlunos

Rev

Rev 901 | Rev 1283 | 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"/>
1133 jmachado 15
<script>
16
    function alertPermissions()
17
    {
18
        alert("Este procedimento afecta as permissões atuais no sistema de ficheiros da intranet. Após salvar estas alterações, por favor gere o BAT de geração de pastas e corra-o novamente na raiz do servidor IONLINE")
19
    }
20
    function alertFolders(place)
21
    {
22
        alert("Caro administrador, lembramos-lhe que alterar o " + place + " de uma unidade curricular implica trocar a pasta de ficheiros da intranet do " + place + " onde esta se encontrava para o " + place + " onde actualmente se encontra. O BACO irá actualizar a nova LOCALIZAÇÃO da pasta de ficheiros na sua base de dados. Mas a pasta terá de ser fisicamente alterada pela administração de sistemas.");
23
    }
24
 
25
</script>
444 jmachado 26
<html:errors/>
27
<jomm:messages/>
214 jmachado 28
<html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data">
29
<input type="hidden" name="dispatch" value="submit"/>
30
<html:hidden property="courseView.id"/>
248 jmachado 31
<logic:present name="CourseView" property="htmlResult">
32
    <pre class="log">
33
        <bean:write name="CourseView" property="htmlResult"/>
34
    </pre>
35
</logic:present>
1133 jmachado 36
 
214 jmachado 37
<table class="form">
38
    <tr>
39
        <th>
40
            <bean:message key="course.code"/>
41
        </th>
42
        <td>
43
            <html:text property="courseView.code"/>
44
        </td>
45
    </tr>
46
    <tr>
47
        <th>
376 jmachado 48
            <bean:message key="course.area"/>
49
        </th>
50
 
51
        <td>
52
            <html:select property="courseView.area">
53
                <logic:iterate id="area" name="CourseForm" property="areas">
54
                    <html:option value="${area}" key="area.${area}"/>
55
                </logic:iterate>
56
            </html:select>
57
        </td>
58
    </tr>
59
    <tr>
60
        <th>
214 jmachado 61
            <bean:message key="name"/>
62
        </th>
63
        <td>
64
            <html:text property="courseView.name"/>
65
        </td>
66
    </tr>
67
    <tr>
68
        <th>
790 jmachado 69
            <bean:message key="status"/>
70
        </th>
71
        <td>
791 jmachado 72
            <html:select property="courseView.status">
797 jmachado 73
                <html:option value="true"><bean:message key="yes"/></html:option>
74
                <html:option value="false"><bean:message key="no"/></html:option>
790 jmachado 75
            </html:select>
76
        </td>
77
    </tr>
78
    <tr>
79
        <th>
214 jmachado 80
            <bean:message key="course.degree"/>
81
        </th>
82
        <td>
83
            <html:select property="courseView.degree">
249 jmachado 84
                <html:option value="B"><bean:message key="course.B"/></html:option>
85
                <html:option value="L"><bean:message key="course.L"/></html:option>
86
                <html:option value="M"><bean:message key="course.M"/></html:option>
87
                <html:option value="P"><bean:message key="course.P"/></html:option>
88
                <html:option value="E"><bean:message key="course.E"/></html:option>
417 jmachado 89
                <html:option value="A"><bean:message key="course.A"/></html:option>
90
                <html:option value="C"><bean:message key="course.C"/></html:option>
91
                <html:option value="O"><bean:message key="course.O"/></html:option>
896 jmachado 92
                <html:option value="T"><bean:message key="course.T"/></html:option>
214 jmachado 93
            </html:select>
1133 jmachado 94
            ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento
214 jmachado 95
        </td>
96
    </tr>
97
    <tr>
98
        <th>
99
            <bean:message key="course.importYear"/>
100
        </th>
101
        <td>
102
            <html:select property="courseView.importYear">
103
                <logic:iterate id="item" name="CourseForm" property="importYears">
104
                    <html:option value="${item}">${item}</html:option>
105
                </logic:iterate>
106
            </html:select>
107
        </td>
108
    </tr>
109
    <tr>
110
        <th>
111
            <bean:message key="course.institutionalCode"/>
112
        </th>
113
        <td>
114
            <html:text property="courseView.institutionalCode"/>
115
        </td>
116
    </tr>
901 jmachado 117
 
214 jmachado 118
    <tr>
119
        <th>
901 jmachado 120
            <bean:message key="course.userGroupStudents"/>
121
        </th>
122
        <td>
1133 jmachado 123
            <html:text onchange="alertPermissions()" property="courseView.userGroupStudents"/>
901 jmachado 124
        </td>
125
    </tr>
126
 
127
    <tr>
128
        <th>
214 jmachado 129
            <bean:message key="course.description"/>
130
        </th>
131
        <td>
132
            <html:textarea property="courseView.description"/>
133
        </td>
134
    </tr>
135
    <tr>
136
        <th>
137
            <bean:message key="course.coordinator"/>
138
        </th>
139
        <td>
1133 jmachado 140
            <html:select onchange="alertPermissions()"  property="courseView.coordinator.id">
214 jmachado 141
                <html:option value="0">
142
                    <bean:message key="none"/>
143
                </html:option>
144
                <logic:present name="CourseForm" property="teachers">
145
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
146
                        <html:option value="${teacher.id}">
147
                            (${teacher.code}) ${teacher.name}
148
                        </html:option>
149
                    </logic:iterate>
150
                </logic:present>
151
            </html:select>
152
        </td>
153
    </tr>
154
    <tr>
155
        <th>
156
            <bean:message key="course.director"/>
157
        </th>
158
        <td>
1133 jmachado 159
            <html:select onchange="alertPermissions()"  property="courseView.director.id">
214 jmachado 160
                <html:option value="0">
161
                    <bean:message key="none"/>
162
                </html:option>
163
                <logic:present name="CourseForm" property="teachers">
164
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
165
                        <html:option value="${teacher.id}">
166
                            (${teacher.code}) ${teacher.name}
167
                        </html:option>
168
                    </logic:iterate>
169
                </logic:present>
170
            </html:select>
171
        </td>
172
    </tr>
507 jmachado 173
 
174
 
175
 
176
 
177
 
214 jmachado 178
    <tr>
507 jmachado 179
        <th>
180
            <bean:message key="course.validation.role"/>
181
        </th>
182
        <%
183
 
184
            List<String> targetRoles = new ArrayList<String>();
185
            for(String role: Globals.USER_ROLES)
186
            {
187
                if(role.startsWith("courseValidateProgram"))
188
                    targetRoles.add(role);
189
            }
190
            request.setAttribute("targetRoles",targetRoles);
191
        %>
249 jmachado 192
        <td>
1133 jmachado 193
            <html:select onchange="alertPermissions()" property="courseView.validationRole">
507 jmachado 194
                 <logic:iterate id="role" name="targetRoles">
195
                     <html:option value="${role}" key="user.role.${role}"/>
196
                </logic:iterate>
197
            </html:select>
198
        </td>
199
    </tr>
249 jmachado 200
 
507 jmachado 201
 
202
 
203
 
204
 
205
    <tr>
1133 jmachado 206
        <th>
249 jmachado 207
             <bean:message key="course.externalSite"/>
1133 jmachado 208
        </th>
249 jmachado 209
        <td>
210
            <html:select property="courseView.externalSiteServer">
211
                <html:option value="estgp">ESTG</html:option>
212
            </html:select>
213
            <html:text property="courseView.externalSitePath"/>
214
        </td>
215
    </tr>
216
    <tr>
214 jmachado 217
        <th>
218
            <bean:message key="course.studies.plan"/>
219
        </th>
220
        <td>
221
            <html:file property="studiesPlan"/>
222
            <logic:present name="CourseView" property="studiesPlan">
223
                <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
224
            </logic:present>
225
            <logic:notPresent name="CourseView" property="studiesPlan">
226
                <bean:message key="course.studies.plan.not.available"/>
227
            </logic:notPresent>
228
        </td>
229
    </tr>
230
    <tr class="buttons">
231
        <td colspan="2">
232
            <input type="button"
233
                   onclick="set(this.form,'submit');this.form.submit()"
234
                   value="<bean:message key="confirm"/>"/>
235
        </td>
236
    </tr>
237
</table>
238
 
239
</html:form>