Revision 8222
Added by Lauren Walker about 11 years ago
properties-configuration.jsp | ||
---|---|---|
38 | 38 |
|
39 | 39 |
</head> |
40 | 40 |
<body> |
41 |
<%@ include file="./header-section.jsp"%> |
|
41 |
<%@ include file="./header-section.jsp"%>
|
|
42 | 42 |
|
43 |
<img src="<%= request.getContextPath() %>/metacat-logo-darkgray.png" width="100px" align="right"/> |
|
44 |
<h2>Metacat Properties Configuration</h2> |
|
45 |
|
|
46 |
<p>Enter Metacat System properties here. All Fields must be filled in before saving. |
|
47 |
</p> |
|
48 |
<br clear="right"/> |
|
49 |
|
|
50 |
<%@ include file="page-message-section.jsp"%> |
|
51 |
|
|
52 |
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin" |
|
53 |
onsubmit="return submitForm(this);"> |
|
54 |
<% |
|
55 |
// metadata holds all group and properties metadata |
|
56 |
PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata"); |
|
57 |
if (metadata != null) { |
|
58 |
// each group describes a section of properties |
|
59 |
Map<Integer, MetaDataGroup> groupMap = metadata.getGroups(); |
|
60 |
Set<Integer> groupIdSet = groupMap.keySet(); |
|
61 |
|
|
62 |
|
|
63 |
for (Integer groupId : groupIdSet) { |
|
64 |
// for this group, display the header (group name) |
|
65 |
MetaDataGroup metaDataGroup = (MetaDataGroup)groupMap.get(groupId); |
|
66 |
if (groupId == 0) { |
|
43 |
<div class="document"> |
|
44 |
<h2>Metacat Properties Configuration</h2> |
|
45 |
|
|
46 |
<p>Enter Metacat System properties here. All Fields must be filled in before saving. |
|
47 |
</p> |
|
48 |
<br clear="right"/> |
|
49 |
|
|
50 |
<%@ include file="page-message-section.jsp"%> |
|
51 |
|
|
52 |
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin" |
|
53 |
onsubmit="return submitForm(this);"> |
|
54 |
<% |
|
55 |
// metadata holds all group and properties metadata |
|
56 |
PropertiesMetaData metadata = (PropertiesMetaData)request.getAttribute("metadata"); |
|
57 |
if (metadata != null) { |
|
58 |
// each group describes a section of properties |
|
59 |
Map<Integer, MetaDataGroup> groupMap = metadata.getGroups(); |
|
60 |
Set<Integer> groupIdSet = groupMap.keySet(); |
|
61 |
|
|
62 |
|
|
63 |
for (Integer groupId : groupIdSet) { |
|
64 |
// for this group, display the header (group name) |
|
65 |
MetaDataGroup metaDataGroup = (MetaDataGroup)groupMap.get(groupId); |
|
66 |
if (groupId == 0) { |
|
67 |
// get all the properties in this group |
|
68 |
Map<Integer, MetaDataProperty> propertyMap = |
|
69 |
metadata.getPropertiesInGroup(metaDataGroup.getIndex()); |
|
70 |
Set<Integer> propertyIndexes = propertyMap.keySet(); |
|
71 |
// iterate through each property and display appropriately |
|
72 |
for (Integer propertyIndex : propertyIndexes) { |
|
73 |
MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); |
|
74 |
String fieldType = metaDataProperty.getFieldType(); |
|
75 |
if (fieldType.equals("hidden")) { |
|
76 |
%> |
|
77 |
<input type="hidden" |
|
78 |
name="<%= metaDataProperty.getKey() %>" |
|
79 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>"/> |
|
80 |
<% |
|
81 |
} |
|
82 |
} |
|
83 |
} else { |
|
84 |
%> |
|
85 |
<h3><%= metaDataGroup.getName() %></h3> |
|
86 |
<% |
|
67 | 87 |
// get all the properties in this group |
68 | 88 |
Map<Integer, MetaDataProperty> propertyMap = |
69 | 89 |
metadata.getPropertiesInGroup(metaDataGroup.getIndex()); |
... | ... | |
72 | 92 |
for (Integer propertyIndex : propertyIndexes) { |
73 | 93 |
MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); |
74 | 94 |
String fieldType = metaDataProperty.getFieldType(); |
75 |
if (fieldType.equals("hidden")) { |
|
76 |
%> |
|
77 |
<input type="hidden" |
|
78 |
name="<%= metaDataProperty.getKey() %>" |
|
79 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>"/> |
|
80 |
<% |
|
81 |
} |
|
82 |
} |
|
83 |
} else { |
|
84 |
%> |
|
85 |
<h3><%= metaDataGroup.getName() %></h3> |
|
86 |
<% |
|
87 |
// get all the properties in this group |
|
88 |
Map<Integer, MetaDataProperty> propertyMap = |
|
89 |
metadata.getPropertiesInGroup(metaDataGroup.getIndex()); |
|
90 |
Set<Integer> propertyIndexes = propertyMap.keySet(); |
|
91 |
// iterate through each property and display appropriately |
|
92 |
for (Integer propertyIndex : propertyIndexes) { |
|
93 |
MetaDataProperty metaDataProperty = propertyMap.get(propertyIndex); |
|
94 |
String fieldType = metaDataProperty.getFieldType(); |
|
95 |
if (fieldType.equals("select")) { |
|
96 |
%> |
|
97 |
<div class="form-row"> |
|
98 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>"><%= metaDataProperty.getLabel() %></label></div> |
|
99 |
<select class="textinput" name="<%= metaDataProperty.getKey() %>"> |
|
100 |
<% |
|
101 |
Vector<String> fieldOptionValues = metaDataProperty.getFieldOptionValues(); |
|
102 |
Vector<String> fieldOptionNames = metaDataProperty.getFieldOptionNames(); |
|
103 |
for (int i = 0; i < fieldOptionNames.size(); i++) { |
|
104 |
%> |
|
105 |
<option value="<%= fieldOptionValues.elementAt(i) %>" |
|
106 |
<% |
|
107 |
if (fieldOptionValues.elementAt(i).equals(request.getAttribute(metaDataProperty.getKey()))) { |
|
108 |
%> |
|
109 |
selected="yes" |
|
110 |
<% |
|
111 |
} |
|
112 |
%> |
|
113 |
> <%= fieldOptionNames.elementAt(i) %> |
|
114 |
<% |
|
115 |
} |
|
116 |
%> |
|
117 |
</select> |
|
118 |
<img class="question-mark" src="style/images/help.png" |
|
119 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
120 |
</div> |
|
121 |
<% |
|
122 |
} else if (fieldType.equals("password")) { |
|
123 |
%> |
|
124 |
<div class="form-row"> |
|
125 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" ><%= metaDataProperty.getLabel() %></label></div> |
|
126 |
<input class="textinput" id="<%= metaDataProperty.getKey() %>" |
|
127 |
name="<%= metaDataProperty.getKey() %>" |
|
128 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
|
129 |
type="<%= fieldType %>"/> |
|
130 |
<img class="question-mark" src="style/images/help.png" |
|
131 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
132 |
</div> |
|
133 |
<% |
|
134 |
} else if (fieldType.equals("hidden")) { |
|
135 |
%> |
|
136 |
<input id="<%= metaDataProperty.getKey() %>" |
|
95 |
if (fieldType.equals("select")) { |
|
96 |
%> |
|
97 |
<div class="form-row"> |
|
98 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>"><%= metaDataProperty.getLabel() %></label></div> |
|
99 |
<select class="textinput" name="<%= metaDataProperty.getKey() %>"> |
|
100 |
<% |
|
101 |
Vector<String> fieldOptionValues = metaDataProperty.getFieldOptionValues(); |
|
102 |
Vector<String> fieldOptionNames = metaDataProperty.getFieldOptionNames(); |
|
103 |
for (int i = 0; i < fieldOptionNames.size(); i++) { |
|
104 |
%> |
|
105 |
<option value="<%= fieldOptionValues.elementAt(i) %>" |
|
106 |
<% |
|
107 |
if (fieldOptionValues.elementAt(i).equals(request.getAttribute(metaDataProperty.getKey()))) { |
|
108 |
%> |
|
109 |
selected="yes" |
|
110 |
<% |
|
111 |
} |
|
112 |
%> |
|
113 |
> <%= fieldOptionNames.elementAt(i) %> |
|
114 |
<% |
|
115 |
} |
|
116 |
%> |
|
117 |
</select> |
|
118 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
119 |
</div> |
|
120 |
<% |
|
121 |
} else if (fieldType.equals("password")) { |
|
122 |
%> |
|
123 |
<div class="form-row"> |
|
124 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" ><%= metaDataProperty.getLabel() %></label></div> |
|
125 |
<input class="textinput" id="<%= metaDataProperty.getKey() %>" |
|
137 | 126 |
name="<%= metaDataProperty.getKey() %>" |
138 | 127 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
139 | 128 |
type="<%= fieldType %>"/> |
129 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
130 |
</div> |
|
140 | 131 |
<% |
141 |
} else { |
|
142 |
%> |
|
143 |
<div class="form-row"> |
|
144 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %> "><%= metaDataProperty.getLabel() %></label> </div> |
|
145 |
<input class="textinput" id="<%= metaDataProperty.getKey() %>" |
|
146 |
name="<%= metaDataProperty.getKey() %>" |
|
147 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
|
148 |
type="<%= fieldType %> "/> |
|
149 |
<img class="question-mark" class=question-mark |
|
150 |
src="style/images/help.png" |
|
151 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
152 |
</div> |
|
153 |
<% |
|
132 |
} else if (fieldType.equals("hidden")) { |
|
133 |
%> |
|
134 |
<input id="<%= metaDataProperty.getKey() %>" |
|
135 |
name="<%= metaDataProperty.getKey() %>" |
|
136 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
|
137 |
type="<%= fieldType %>"/> |
|
138 |
<% |
|
139 |
} else { |
|
140 |
%> |
|
141 |
<div class="form-row"> |
|
142 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %> "><%= metaDataProperty.getLabel() %></label> </div> |
|
143 |
<input class="textinput" id="<%= metaDataProperty.getKey() %>" |
|
144 |
name="<%= metaDataProperty.getKey() %>" |
|
145 |
value="<%= request.getAttribute(metaDataProperty.getKey()) %>" |
|
146 |
type="<%= fieldType %> "/> |
|
147 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
148 |
</div> |
|
149 |
<% |
|
150 |
} |
|
151 |
|
|
152 |
if (metaDataProperty.getDescription() != null && metaDataProperty.getDescription().trim().length() > 0 ) { |
|
153 |
%> |
|
154 |
|
|
155 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
156 |
<% |
|
157 |
} |
|
154 | 158 |
} |
155 |
|
|
156 |
if (metaDataProperty.getDescription() != null && metaDataProperty.getDescription().trim().length() > 0 ) { |
|
157 |
%> |
|
158 |
|
|
159 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
160 |
<% |
|
161 |
} |
|
159 |
} |
|
162 | 160 |
} |
163 |
} |
|
161 |
|
|
164 | 162 |
} |
165 |
|
|
166 |
} |
|
167 |
%> |
|
168 |
|
|
169 |
<input type="hidden" name="configureType" value="properties"/> |
|
170 |
<input type="hidden" name="processForm" value="true"/> |
|
171 |
<input class=left-button type="submit" value="Save"/> |
|
172 |
<input class=button type="button" value="Cancel" onClick="forward('./admin')"> |
|
173 |
|
|
174 |
</form> |
|
175 |
|
|
163 |
%> |
|
164 |
|
|
165 |
<input type="hidden" name="configureType" value="properties"/> |
|
166 |
<input type="hidden" name="processForm" value="true"/> |
|
167 |
<input class=button type="submit" value="Save"/> |
|
168 |
<input class=button type="button" value="Cancel" onClick="forward('./admin')"> |
|
169 |
|
|
170 |
</form> |
|
171 |
|
|
172 |
</div> |
|
176 | 173 |
<%@ include file="./footer-section.jsp"%> |
177 | 174 |
|
178 | 175 |
</body> |
Also available in: Unified diff
Matched the admin config pages to the default metacatUI theme. Changed the background image of the docs and config pages to a big cat for some metacat branding.