Subversion Repositories bacoAlunos

Rev

Rev 1283 | Rev 1306 | 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" %>
1283 jmachado 5
<%@ page import="pt.estgp.estgweb.web.filters.UserRoleProxy" %>
214 jmachado 6
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
7
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
8
<%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %>
9
<%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %>
10
<%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %>
11
<%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %>
12
<%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %>
13
<%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %>
14
<%@ taglib uri="/WEB-INF/tlds/struts-tiles.tld" prefix="tiles" %>
15
<jsp:useBean id="CourseView" type="pt.estgp.estgweb.domain.views.CourseView" scope="request"/>
1133 jmachado 16
<script>
17
    function alertPermissions()
18
    {
1285 jmachado 19
        alert("Aviso a transmitir ao Centro Informático. 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")
1133 jmachado 20
    }
21
    function alertFolders(place)
22
    {
1285 jmachado 23
        alert("Aviso a transmitir ao Centro Informático. 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.");
1133 jmachado 24
    }
25
 
26
</script>
444 jmachado 27
<html:errors/>
28
<jomm:messages/>
214 jmachado 29
<html:form action="/user/courseControllerFromServiceZone" enctype="multipart/form-data">
30
<input type="hidden" name="dispatch" value="submit"/>
31
<html:hidden property="courseView.id"/>
248 jmachado 32
<logic:present name="CourseView" property="htmlResult">
33
    <pre class="log">
34
        <bean:write name="CourseView" property="htmlResult"/>
35
    </pre>
36
</logic:present>
1133 jmachado 37
 
214 jmachado 38
<table class="form">
39
    <tr>
40
        <th>
41
            <bean:message key="course.code"/>
42
        </th>
43
        <td>
44
            <html:text property="courseView.code"/>
45
        </td>
46
    </tr>
47
    <tr>
48
        <th>
376 jmachado 49
            <bean:message key="course.area"/>
50
        </th>
51
 
52
        <td>
53
            <html:select property="courseView.area">
54
                <logic:iterate id="area" name="CourseForm" property="areas">
55
                    <html:option value="${area}" key="area.${area}"/>
56
                </logic:iterate>
57
            </html:select>
58
        </td>
59
    </tr>
60
    <tr>
61
        <th>
214 jmachado 62
            <bean:message key="name"/>
63
        </th>
64
        <td>
65
            <html:text property="courseView.name"/>
66
        </td>
67
    </tr>
68
    <tr>
69
        <th>
790 jmachado 70
            <bean:message key="status"/>
71
        </th>
72
        <td>
791 jmachado 73
            <html:select property="courseView.status">
797 jmachado 74
                <html:option value="true"><bean:message key="yes"/></html:option>
75
                <html:option value="false"><bean:message key="no"/></html:option>
790 jmachado 76
            </html:select>
77
        </td>
78
    </tr>
79
    <tr>
80
        <th>
214 jmachado 81
            <bean:message key="course.degree"/>
82
        </th>
83
        <td>
84
            <html:select property="courseView.degree">
249 jmachado 85
                <html:option value="B"><bean:message key="course.B"/></html:option>
86
                <html:option value="L"><bean:message key="course.L"/></html:option>
87
                <html:option value="M"><bean:message key="course.M"/></html:option>
88
                <html:option value="P"><bean:message key="course.P"/></html:option>
89
                <html:option value="E"><bean:message key="course.E"/></html:option>
417 jmachado 90
                <html:option value="A"><bean:message key="course.A"/></html:option>
91
                <html:option value="C"><bean:message key="course.C"/></html:option>
92
                <html:option value="O"><bean:message key="course.O"/></html:option>
896 jmachado 93
                <html:option value="T"><bean:message key="course.T"/></html:option>
214 jmachado 94
            </html:select>
1133 jmachado 95
            ** SIGES: <bean:write name="CourseForm" property="courseView.degree"/> - Qualquer erro de atrbuição informar imediatamente a equipa de desenvolvimento
214 jmachado 96
        </td>
97
    </tr>
98
    <tr>
99
        <th>
100
            <bean:message key="course.importYear"/>
101
        </th>
102
        <td>
103
            <html:select property="courseView.importYear">
104
                <logic:iterate id="item" name="CourseForm" property="importYears">
105
                    <html:option value="${item}">${item}</html:option>
106
                </logic:iterate>
107
            </html:select>
108
        </td>
109
    </tr>
110
    <tr>
111
        <th>
112
            <bean:message key="course.institutionalCode"/>
113
        </th>
114
        <td>
115
            <html:text property="courseView.institutionalCode"/>
116
        </td>
117
    </tr>
901 jmachado 118
 
214 jmachado 119
    <tr>
120
        <th>
901 jmachado 121
            <bean:message key="course.userGroupStudents"/>
122
        </th>
123
        <td>
1133 jmachado 124
            <html:text onchange="alertPermissions()" property="courseView.userGroupStudents"/>
901 jmachado 125
        </td>
126
    </tr>
127
 
128
    <tr>
129
        <th>
214 jmachado 130
            <bean:message key="course.description"/>
131
        </th>
132
        <td>
133
            <html:textarea property="courseView.description"/>
134
        </td>
135
    </tr>
136
    <tr>
137
        <th>
138
            <bean:message key="course.coordinator"/>
139
        </th>
140
        <td>
1133 jmachado 141
            <html:select onchange="alertPermissions()"  property="courseView.coordinator.id">
214 jmachado 142
                <html:option value="0">
143
                    <bean:message key="none"/>
144
                </html:option>
145
                <logic:present name="CourseForm" property="teachers">
146
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
147
                        <html:option value="${teacher.id}">
148
                            (${teacher.code}) ${teacher.name}
149
                        </html:option>
150
                    </logic:iterate>
151
                </logic:present>
152
            </html:select>
153
        </td>
154
    </tr>
155
    <tr>
156
        <th>
157
            <bean:message key="course.director"/>
158
        </th>
159
        <td>
1133 jmachado 160
            <html:select onchange="alertPermissions()"  property="courseView.director.id">
214 jmachado 161
                <html:option value="0">
162
                    <bean:message key="none"/>
163
                </html:option>
164
                <logic:present name="CourseForm" property="teachers">
165
                    <logic:iterate id="teacher" name="CourseForm" property="teachers" type="pt.estgp.estgweb.domain.views.UserView">
166
                        <html:option value="${teacher.id}">
167
                            (${teacher.code}) ${teacher.name}
168
                        </html:option>
169
                    </logic:iterate>
170
                </logic:present>
171
            </html:select>
172
        </td>
173
    </tr>
507 jmachado 174
 
175
 
176
 
177
 
178
 
214 jmachado 179
    <tr>
507 jmachado 180
        <th>
181
            <bean:message key="course.validation.role"/>
182
        </th>
183
        <%
184
 
185
            List<String> targetRoles = new ArrayList<String>();
1283 jmachado 186
            for(String role: UserRoleProxy.getUserRoles())
507 jmachado 187
            {
188
                if(role.startsWith("courseValidateProgram"))
189
                    targetRoles.add(role);
190
            }
191
            request.setAttribute("targetRoles",targetRoles);
192
        %>
249 jmachado 193
        <td>
1133 jmachado 194
            <html:select onchange="alertPermissions()" property="courseView.validationRole">
507 jmachado 195
                 <logic:iterate id="role" name="targetRoles">
196
                     <html:option value="${role}" key="user.role.${role}"/>
197
                </logic:iterate>
198
            </html:select>
199
        </td>
200
    </tr>
249 jmachado 201
 
507 jmachado 202
 
203
 
204
 
205
 
206
    <tr>
1133 jmachado 207
        <th>
249 jmachado 208
             <bean:message key="course.externalSite"/>
1133 jmachado 209
        </th>
249 jmachado 210
        <td>
211
            <html:select property="courseView.externalSiteServer">
212
                <html:option value="estgp">ESTG</html:option>
213
            </html:select>
214
            <html:text property="courseView.externalSitePath"/>
215
        </td>
216
    </tr>
217
    <tr>
214 jmachado 218
        <th>
219
            <bean:message key="course.studies.plan"/>
220
        </th>
221
        <td>
222
            <html:file property="studiesPlan"/>
223
            <logic:present name="CourseView" property="studiesPlan">
224
                <a href="<%=request.getContextPath()%>/repositoryStream/${CourseView.studiesPlanStreamId}"><bean:message key="course.studies.plan"/></a> (${CourseView.studiesPlanSizeKb} Kb - ${CourseView.studiesPlanDate})
225
            </logic:present>
226
            <logic:notPresent name="CourseView" property="studiesPlan">
227
                <bean:message key="course.studies.plan.not.available"/>
228
            </logic:notPresent>
229
        </td>
230
    </tr>
231
    <tr class="buttons">
232
        <td colspan="2">
233
            <input type="button"
234
                   onclick="set(this.form,'submit');this.form.submit()"
235
                   value="<bean:message key="confirm"/>"/>
236
        </td>
237
    </tr>
238
</table>
239
 
240
</html:form>