Rev 457 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
456 | jmachado | 1 | <%@ page import="java.util.List" %> |
2 | <%@ page import="pt.estgp.estgweb.web.form.srusource.SruSourceForm" %> |
||
3 | <%@ page contentType="text/html;charset=UTF-8" language="java" %> |
||
4 | <%@ taglib uri="/WEB-INF/tlds/struts-bean.tld" prefix="bean" %> |
||
5 | <%@ taglib uri="/WEB-INF/tlds/struts-logic.tld" prefix="logic" %> |
||
6 | <%@ taglib uri="/WEB-INF/tlds/struts-html.tld" prefix="html" %> |
||
7 | <%@ taglib uri="/WEB-INF/tlds/jomm.tld" prefix="jomm" %> |
||
8 | <%@ taglib uri="/WEB-INF/tlds/struts-nested.tld" prefix="nested" %> |
||
9 | <%@ taglib uri="/WEB-INF/tlds/baco.tld" prefix="baco" %> |
||
10 | <div id="contentIntranet"> |
||
11 | <div id="contentPane"> |
||
12 | |||
13 | <jomm:messages/> |
||
14 | <html:errors/> |
||
15 | |||
16 | |||
17 | <html:form action="/user/sruSourceFromServiceZone"> |
||
18 | <input type="hidden" name="dispatch" value="editSruSource"> |
||
19 | <html:hidden property="sruSourceView.id"/> |
||
457 | jmachado | 20 | <html:hidden property="auxId"/> |
456 | jmachado | 21 | <html:hidden property="role"/> |
22 | <input type="hidden" name="collectionSize" value="<%=((SruSourceForm)request.getAttribute("SruSourceForm")).getSruSourceView().getCollections().size()%>"> |
||
23 | <table class="form"> |
||
24 | |||
25 | <baco:isAdmin> |
||
26 | <tr> |
||
27 | <th> |
||
28 | <bean:message key="srusource.name"/> |
||
29 | </th> |
||
30 | <td> |
||
31 | <html:text styleClass="text" property="sruSourceView.name" maxlength="250"/> |
||
32 | </td> |
||
33 | </tr> |
||
34 | <tr> |
||
35 | <th> |
||
36 | <bean:message key="srusource.description"/> |
||
37 | </th> |
||
38 | <td> |
||
39 | <html:text styleClass="text" property="sruSourceView.description" maxlength="250"/> |
||
40 | </td> |
||
41 | </tr> |
||
42 | <tr> |
||
43 | <th> |
||
44 | <bean:message key="srusource.url"/> |
||
45 | </th> |
||
46 | <td> |
||
47 | <html:text styleClass="text" property="sruSourceView.url" maxlength="250"/> |
||
457 | jmachado | 48 | (e.g: http://deptal.estgp.pt:8983/telHandler/Handler2) |
456 | jmachado | 49 | </td> |
50 | </tr> |
||
51 | <tr> |
||
52 | <th> |
||
53 | <bean:message key="srusource.collectionField"/> |
||
54 | </th> |
||
55 | <td> |
||
56 | <html:text styleClass="text" property="sruSourceView.collectionField" maxlength="250"/> |
||
57 | </td> |
||
58 | </tr> |
||
59 | <tr> |
||
60 | <th> |
||
61 | <bean:message key="srusource.metadataSchema"/> |
||
62 | </th> |
||
63 | <td> |
||
64 | <html:select property="sruSourceView.metadataSchema"> |
||
65 | <html:option value="files"><bean:message key="srusource.metadataSchema.files"/></html:option> |
||
66 | </html:select> |
||
67 | </td> |
||
68 | </tr> |
||
69 | <tr> |
||
70 | <th><bean:message key="srusource.collections"/></th> |
||
71 | <td> |
||
72 | <table class="dataTable"> |
||
73 | |||
74 | <logic:notEmpty name="SruSourceForm" property="sruSourceView.collections"> |
||
75 | <tr> |
||
76 | <th><bean:message key="srusource.collection"/></th> |
||
77 | <th><bean:message key="srusource.admited.roles"/></th> |
||
78 | </tr> |
||
79 | <nested:iterate id="collectionView" name="SruSourceForm" property="sruSourceView.collections" > |
||
80 | <tr> |
||
81 | <td><bean:write name="collectionView" property="collection"/></td> |
||
82 | <td> |
||
83 | <nested:hidden property="id"/> |
||
84 | <nested:hidden property="collection"/> |
||
85 | <nested:hidden property="admitedRoles"/> |
||
86 | <nested:notEmpty name="collectionView" property="admitedRolesSet"> |
||
87 | <nested:iterate id="admitedRole" name="collectionView" property="admitedRolesSet"> |
||
88 | <bean:message key="user.role.${admitedRole}"/>, |
||
89 | </nested:iterate> |
||
90 | </nested:notEmpty> |
||
91 | </td> |
||
457 | jmachado | 92 | <td> |
93 | <input type="button" class="removeButton" value="" onclick="SruSourceForm.auxId.value='${collectionView.id}';set(this.form,'removeCollection');this.form.submit();"> |
||
94 | </td> |
||
456 | jmachado | 95 | </tr> |
96 | </nested:iterate> |
||
97 | </logic:notEmpty> |
||
98 | <logic:empty name="SruSourceForm" property="sruSourceView.collections"> |
||
99 | <tr> |
||
100 | <td colspan="2"> |
||
101 | <bean:message key="srusource.zero.collections"/> |
||
102 | </td> |
||
103 | </tr> |
||
104 | </logic:empty> |
||
105 | </table> |
||
106 | <table style="border:1px solid black"> |
||
107 | <tr> |
||
108 | <th colspan="2"><bean:message key="srusource.new.collection"/></th> |
||
109 | </tr> |
||
110 | <tr> |
||
111 | <th><bean:message key="srusource.collection"/></th> |
||
457 | jmachado | 112 | <td> |
113 | <html:hidden property="sruSourceCollectionView.id"/> |
||
114 | <html:text property="sruSourceCollectionView.collection"/> |
||
115 | </td> |
||
456 | jmachado | 116 | </tr> |
117 | <tr> |
||
118 | <th> |
||
119 | <bean:message key="srusource.admited.roles"/> |
||
120 | </th> |
||
121 | <td> |
||
122 | <html:select property="targetRolesStr"> |
||
123 | <logic:present name="SruSourceForm" property="targetRoles"> |
||
124 | <logic:iterate id="item" name="SruSourceForm" property="targetRoles"> |
||
125 | <jomm:option itemName="item" comparableObjectName="SruSourceForm" |
||
126 | comparableObjectProperty="targetRolesStr"> |
||
127 | <jomm:message patternMessage="user.role.{0}" name0="item"/> |
||
128 | </jomm:option> |
||
129 | </logic:iterate> |
||
457 | jmachado | 130 | <input type="button" value="<bean:message key="add"/>" onclick="set(this.form,'addRole');this.form.submit();"> |
456 | jmachado | 131 | </logic:present> |
132 | </html:select> |
||
133 | |||
134 | <logic:present name="SruSourceForm" property="selectedRoles"> |
||
135 | <logic:notEmpty name="SruSourceForm" property="selectedRoles"> |
||
136 | <table class="dataTable removeButton"> |
||
137 | <logic:iterate id="item" name="SruSourceForm" property="selectedRoles"> |
||
138 | <tr> |
||
139 | <th> |
||
140 | <jomm:message patternMessage="user.role.{0}" name0="item"/> |
||
141 | </th> |
||
142 | <td> |
||
143 | <input type="button" class="removeButton" value="" |
||
144 | onclick="SruSourceForm.role.value='${item}';set(this.form,'removeRole');this.form.submit();"> |
||
145 | </td> |
||
146 | </tr> |
||
147 | </logic:iterate> |
||
148 | </table> |
||
149 | </logic:notEmpty> |
||
150 | </logic:present> |
||
151 | </td> |
||
152 | </tr> |
||
153 | <tr> |
||
154 | <td colspan="2"> |
||
155 | <input type="button" onclick="set(this.form,'addSruSourceCollection');this.form.submit()" value="<bean:message key="srusource.collection.add"/>"/> |
||
156 | </td> |
||
157 | </tr> |
||
158 | </table> |
||
159 | |||
160 | </td> |
||
161 | </tr> |
||
162 | |||
163 | </baco:isAdmin> |
||
164 | <tr class="buttons"> |
||
165 | <td colspan="2"> |
||
166 | <input type="button" onclick="set(this.form,'editSruSource');this.form.submit()" |
||
167 | value="<bean:message key="confirm"/>"/> |
||
168 | </td> |
||
169 | </tr> |
||
170 | </table> |
||
171 | </html:form> |
||
172 | </div> |
||
173 | </div> |