Revision 8222
Added by Lauren Walker about 11 years ago
skins-configuration.jsp | ||
---|---|---|
46 | 46 |
<body> |
47 | 47 |
<%@ include file="./header-section.jsp"%> |
48 | 48 |
|
49 |
<img src="<%= request.getContextPath() %>/metacat-logo-darkgray.png" width="100px" align="right"/> |
|
50 |
<h2>Skins Configuration</h2> |
|
51 |
|
|
52 |
<br class="skins-header"> |
|
53 |
|
|
54 |
<%@ include file="./page-message-section.jsp"%> |
|
55 |
|
|
56 |
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin" |
|
57 |
onsubmit="return validate_form();"> |
|
58 |
|
|
59 |
|
|
60 |
<h3>Skins Configuration</h3> |
|
61 |
<div class="heading-comment message-text"> |
|
62 |
NOTE: Metacat v2.2.0 includes a new mechanism for customizing the look and feel of your |
|
63 |
Metacat deployment. MetacatUI themes can be deployed separately from the Metacat server |
|
64 |
allowing easier independent user interface customization. See the Metacat documentation |
|
65 |
for more information on using this feature. |
|
66 |
</div> |
|
67 |
<br/> |
|
68 |
<div class="heading-comment"> |
|
69 |
Choose and configure the skins that will be available in this instance of Metacat |
|
70 |
</div> |
|
71 |
<br/> |
|
72 |
|
|
73 |
<% |
|
74 |
HashMap<String, HashMap<String, String>> allSkinProperties = |
|
75 |
(HashMap<String, HashMap<String, String>>)request.getAttribute("skinProperties"); |
|
76 |
HashMap<String, PropertiesMetaData> allMetaData = |
|
77 |
(HashMap<String, PropertiesMetaData>)request.getAttribute("metadataMap"); |
|
78 |
|
|
79 |
for (String skinName : skinNames) { |
|
80 |
%> |
|
81 |
<div> |
|
82 |
<input class="checkradio" type="checkbox" |
|
83 |
<% |
|
84 |
if (skinName.equals(defaultStyle)) { |
|
85 |
%> |
|
86 |
checked="yes" |
|
87 |
<% |
|
88 |
} |
|
89 |
%> |
|
90 |
name="<%= skinName %>.cb" id="<%= skinName %>.cb"onClick="toggleHiddenTable(this, 'hiding-section-<%= skinName %>')"/> |
|
91 |
<label class="checkradio-label" for="<%= skinName %>.cb %>"><%= skinName %></label> |
|
92 |
<% |
|
93 |
if (skinName.equals(defaultStyle)) { |
|
94 |
%> |
|
95 |
<div class="checkradio-label-inline" id="hiding-default-<%= skinName %>"> (default)</div> |
|
96 |
<% |
|
97 |
} else { |
|
98 |
%> |
|
99 |
<div class="checkradio-label-inline" style="display: none;" id="hiding-default-<%= skinName %>"> (default)</div> |
|
100 |
<% |
|
101 |
} |
|
102 |
%> |
|
49 |
<div class="document"> |
|
50 |
<h2>Skins Configuration</h2> |
|
51 |
|
|
52 |
<br class="skins-header"> |
|
53 |
|
|
54 |
<%@ include file="./page-message-section.jsp"%> |
|
55 |
|
|
56 |
<form method="POST" name="configuration_form" action="<%= request.getContextPath() %>/admin" |
|
57 |
onsubmit="return validate_form();"> |
|
58 |
|
|
59 |
|
|
60 |
<h3>Skins Configuration</h3> |
|
61 |
<div class="heading-comment message-text"> |
|
62 |
NOTE: Metacat v2.2.0 includes a new mechanism for customizing the look and feel of your |
|
63 |
Metacat deployment. MetacatUI themes can be deployed separately from the Metacat server |
|
64 |
allowing easier independent user interface customization. See the Metacat documentation |
|
65 |
for more information on using this feature. |
|
103 | 66 |
</div> |
104 |
<div class="hiding-section" |
|
105 |
<% |
|
106 |
if (skinName.equals(defaultStyle)) { |
|
107 |
%> |
|
108 |
style="display: block;" |
|
109 |
<% |
|
110 |
} |
|
111 |
%> |
|
112 |
id="hiding-section-<%= skinName %>"> |
|
113 |
<% |
|
114 |
HashMap<String, String> skinProperties = allSkinProperties.get(skinName); |
|
115 |
PropertiesMetaData metaData = (PropertiesMetaData)allMetaData.get(skinName); |
|
116 |
Map<Integer, MetaDataGroup> metaDataGroups = metaData.getGroups(); |
|
117 |
Set<Integer> groupKeys = metaDataGroups.keySet(); |
|
118 |
for (Integer groupkey : groupKeys) { |
|
119 |
if (groupkey == 0) { |
|
120 |
continue; |
|
121 |
} |
|
122 |
SortedMap<Integer, MetaDataProperty> propertyMap = metaData.getPropertiesInGroup(groupkey); |
|
123 |
Set<Integer> propertyKeys = propertyMap.keySet(); |
|
124 |
%> |
|
125 |
<input class="checkradio" type="radio" |
|
126 |
<% |
|
67 |
<br/> |
|
68 |
<div class="heading-comment"> |
|
69 |
Choose and configure the skins that will be available in this instance of Metacat |
|
70 |
</div> |
|
71 |
<br/> |
|
72 |
|
|
73 |
<% |
|
74 |
HashMap<String, HashMap<String, String>> allSkinProperties = |
|
75 |
(HashMap<String, HashMap<String, String>>)request.getAttribute("skinProperties"); |
|
76 |
HashMap<String, PropertiesMetaData> allMetaData = |
|
77 |
(HashMap<String, PropertiesMetaData>)request.getAttribute("metadataMap"); |
|
78 |
|
|
79 |
for (String skinName : skinNames) { |
|
80 |
%> |
|
81 |
<div class="form-row"> |
|
82 |
<input class="checkradio" type="checkbox" |
|
83 |
<% |
|
127 | 84 |
if (skinName.equals(defaultStyle)) { |
128 |
%> |
|
129 |
checked
|
|
130 |
<% |
|
85 |
%>
|
|
86 |
checked="yes"
|
|
87 |
<%
|
|
131 | 88 |
} |
132 |
%> |
|
133 |
name="application.default-style" id="<%= skinName %>-radio" value="<%= skinName %>" onChange="toggleHiddenDefaultText('default-flag', '<%= skinName %>')"/> |
|
134 |
<label class="checkradio-label" for="<%= skinName %>-radio"> Make "<%= skinName %>" default </label> |
|
135 |
<% |
|
136 |
for (Integer propertyKey : propertyKeys) { |
|
137 |
%> |
|
138 |
<% |
|
139 |
MetaDataProperty metaDataProperty = propertyMap.get(propertyKey); |
|
140 |
String fieldType = metaDataProperty.getFieldType(); |
|
141 |
if (fieldType.equals("select")) { |
|
142 |
%> |
|
143 |
<div class="form-row"> |
|
144 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
145 |
<select class="textinput" name="<%= skinName %>.<%= metaDataProperty.getKey() %>"> |
|
146 |
|
|
147 |
<% |
|
148 |
Vector<String> fieldOptionNames = metaDataProperty.getFieldOptionNames(); |
|
149 |
Vector<String> fieldOptionValues = metaDataProperty.getFieldOptionValues(); |
|
150 |
for (int i = 0; i < fieldOptionNames.size(); i++) { |
|
151 |
%> |
|
152 |
<option value="<%= fieldOptionValues.elementAt(i) %>"> <%= fieldOptionNames.elementAt(i) %> |
|
153 |
<% |
|
154 |
} |
|
155 |
%> |
|
156 |
</select> |
|
157 |
<img class="question-mark" src="style/images/help.png" |
|
158 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')""/> |
|
159 |
</div> |
|
160 |
<% |
|
161 |
if (metaDataProperty.getDescription() != null) { |
|
162 |
%> |
|
163 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
164 |
<% |
|
165 |
} |
|
166 |
} else if (fieldType.equals("password")) { |
|
167 |
%> |
|
168 |
<div class="form-row"> |
|
169 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label></div> |
|
170 |
<input class="textinput" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
171 |
type="<%= fieldType %>"/> |
|
172 |
<img class="question-mark" src="style/images/help.png" |
|
173 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
174 |
</div> |
|
175 |
<% |
|
176 |
if (metaDataProperty.getDescription() != null) { |
|
177 |
%> |
|
178 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
179 |
<% |
|
180 |
} |
|
181 |
} else if (fieldType.equals("checkbox")) { |
|
182 |
%> |
|
183 |
<div class="form-row"> |
|
184 |
<input class="checkradio" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
185 |
type="<%= fieldType %>" |
|
186 |
<% |
|
187 |
if (skinProperties.get(metaDataProperty.getKey()).equals("true")) { |
|
188 |
%> |
|
189 |
checked="yes" |
|
190 |
<% |
|
191 |
} |
|
192 |
%> |
|
193 |
/> |
|
194 |
<label class="checkradio-label" for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
195 |
<img class="question-mark" src="style/images/help.png" |
|
196 |
alt="<%= metaDataProperty.getDescription() %>" |
|
197 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
198 |
</div> |
|
199 |
<% |
|
200 |
if (metaDataProperty.getDescription() != null) { |
|
201 |
%> |
|
202 |
<div class="checkradio-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
203 |
<% |
|
204 |
} |
|
205 |
} else { |
|
206 |
%> |
|
207 |
<div class="form-row"> |
|
208 |
<label class="textinput-label" for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
209 |
<input class="textinput" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
210 |
value="<%= skinProperties.get(metaDataProperty.getKey()) %>" |
|
211 |
type="<%= fieldType %>"/> |
|
212 |
<img class="question-mark" src="style/images/help.png" |
|
213 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"/> |
|
214 |
</div> |
|
215 |
<% |
|
216 |
if (metaDataProperty.getDescription() != null) { |
|
217 |
%> |
|
218 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
219 |
<% |
|
220 |
} |
|
221 |
} |
|
89 |
%> |
|
90 |
name="<%= skinName %>.cb" id="<%= skinName %>.cb"onClick="toggleHiddenTable(this, 'hiding-section-<%= skinName %>')"/> |
|
91 |
<label class="checkradio-label" for="<%= skinName %>.cb %>"><%= skinName %></label> |
|
92 |
<% |
|
93 |
if (skinName.equals(defaultStyle)) { |
|
94 |
%> |
|
95 |
<div class="checkradio-label-inline" id="hiding-default-<%= skinName %>"> (default)</div> |
|
96 |
<% |
|
97 |
} else { |
|
98 |
%> |
|
99 |
<div class="checkradio-label-inline" style="display: none;" id="hiding-default-<%= skinName %>"> (default)</div> |
|
100 |
<% |
|
101 |
} |
|
102 |
%> |
|
103 |
</div> |
|
104 |
<div class="hiding-section" |
|
105 |
<% |
|
106 |
if (skinName.equals(defaultStyle)) { |
|
107 |
%> |
|
108 |
style="display: block;" |
|
109 |
<% |
|
110 |
} |
|
111 |
%> |
|
112 |
id="hiding-section-<%= skinName %>"> |
|
113 |
<% |
|
114 |
HashMap<String, String> skinProperties = allSkinProperties.get(skinName); |
|
115 |
PropertiesMetaData metaData = (PropertiesMetaData)allMetaData.get(skinName); |
|
116 |
Map<Integer, MetaDataGroup> metaDataGroups = metaData.getGroups(); |
|
117 |
Set<Integer> groupKeys = metaDataGroups.keySet(); |
|
118 |
for (Integer groupkey : groupKeys) { |
|
119 |
if (groupkey == 0) { |
|
120 |
continue; |
|
121 |
} |
|
122 |
SortedMap<Integer, MetaDataProperty> propertyMap = metaData.getPropertiesInGroup(groupkey); |
|
123 |
Set<Integer> propertyKeys = propertyMap.keySet(); |
|
124 |
%> |
|
125 |
<input class="checkradio" type="radio" |
|
126 |
<% |
|
127 |
if (skinName.equals(defaultStyle)) { |
|
128 |
%> |
|
129 |
checked |
|
130 |
<% |
|
131 |
} |
|
132 |
%> |
|
133 |
name="application.default-style" id="<%= skinName %>-radio" value="<%= skinName %>" onChange="toggleHiddenDefaultText('default-flag', '<%= skinName %>')"/> |
|
134 |
<label class="checkradio-label" for="<%= skinName %>-radio"> Make "<%= skinName %>" default </label> |
|
135 |
<% |
|
136 |
for (Integer propertyKey : propertyKeys) { |
|
137 |
%> |
|
138 |
<% |
|
139 |
MetaDataProperty metaDataProperty = propertyMap.get(propertyKey); |
|
140 |
String fieldType = metaDataProperty.getFieldType(); |
|
141 |
if (fieldType.equals("select")) { |
|
142 |
%> |
|
143 |
<div class="form-row"> |
|
144 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
145 |
<select class="textinput" name="<%= skinName %>.<%= metaDataProperty.getKey() %>"> |
|
146 |
|
|
147 |
<% |
|
148 |
Vector<String> fieldOptionNames = metaDataProperty.getFieldOptionNames(); |
|
149 |
Vector<String> fieldOptionValues = metaDataProperty.getFieldOptionValues(); |
|
150 |
for (int i = 0; i < fieldOptionNames.size(); i++) { |
|
151 |
%> |
|
152 |
<option value="<%= fieldOptionValues.elementAt(i) %>"> <%= fieldOptionNames.elementAt(i) %> |
|
153 |
<% |
|
154 |
} |
|
155 |
%> |
|
156 |
</select> |
|
157 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')""></i> |
|
158 |
</div> |
|
159 |
<% |
|
160 |
if (metaDataProperty.getDescription() != null) { |
|
161 |
%> |
|
162 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
163 |
<% |
|
164 |
} |
|
165 |
} else if (fieldType.equals("password")) { |
|
166 |
%> |
|
167 |
<div class="form-row"> |
|
168 |
<div class="textinput-label"><label for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label></div> |
|
169 |
<input class="textinput" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
170 |
type="<%= fieldType %>"/> |
|
171 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
172 |
</div> |
|
173 |
<% |
|
174 |
if (metaDataProperty.getDescription() != null) { |
|
175 |
%> |
|
176 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
177 |
<% |
|
178 |
} |
|
179 |
} else if (fieldType.equals("checkbox")) { |
|
180 |
%> |
|
181 |
<div class="form-row"> |
|
182 |
<input class="checkradio" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
183 |
type="<%= fieldType %>" |
|
184 |
<% |
|
185 |
if (skinProperties.get(metaDataProperty.getKey()).equals("true")) { |
|
186 |
%> |
|
187 |
checked="yes" |
|
188 |
<% |
|
189 |
} |
|
190 |
%> |
|
191 |
/> |
|
192 |
<label class="checkradio-label" for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
193 |
<i class="icon-question-sign" alt="<%= metaDataProperty.getDescription() %>" |
|
194 |
onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
195 |
</div> |
|
196 |
<% |
|
197 |
if (metaDataProperty.getDescription() != null) { |
|
198 |
%> |
|
199 |
<div class="checkradio-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
200 |
<% |
|
201 |
} |
|
202 |
} else { |
|
203 |
%> |
|
204 |
<div class="form-row"> |
|
205 |
<label class="textinput-label" for="<%= metaDataProperty.getKey() %>" title="<%= metaDataProperty.getDescription() %>"><%= metaDataProperty.getLabel() %></label> |
|
206 |
<input class="textinput" id="<%= skinName %>.<%= metaDataProperty.getKey() %>" name="<%= skinName %>.<%= metaDataProperty.getKey() %>" |
|
207 |
value="<%= skinProperties.get(metaDataProperty.getKey()) %>" |
|
208 |
type="<%= fieldType %>"/> |
|
209 |
<i class="icon-question-sign" onClick="helpWindow('<%= request.getContextPath() %>','<%= metaDataProperty.getHelpFile() %>')"></i> |
|
210 |
</div> |
|
211 |
<% |
|
212 |
if (metaDataProperty.getDescription() != null) { |
|
213 |
%> |
|
214 |
<div class="textinput-description">[<%= metaDataProperty.getDescription() %>]</div> |
|
215 |
<% |
|
216 |
} |
|
217 |
} |
|
218 |
} |
|
222 | 219 |
} |
220 |
|
|
221 |
%> |
|
222 |
</div> |
|
223 |
<% |
|
223 | 224 |
} |
224 |
|
|
225 |
%> |
|
225 |
%> |
|
226 |
<div class="buttons-wrapper"> |
|
227 |
<input type="hidden" name="configureType" value="skins"/> |
|
228 |
<input type="hidden" name="processForm" value="true"/> |
|
229 |
<input class="button" type="submit" value="Save"/> |
|
230 |
<input class="button" type="button" value="Cancel" onClick="forward('./admin')"> |
|
226 | 231 |
</div> |
227 |
<% |
|
228 |
} |
|
229 |
%> |
|
230 |
<input type="hidden" name="configureType" value="skins"/> |
|
231 |
<input type="hidden" name="processForm" value="true"/> |
|
232 |
<br> |
|
233 |
<input class="left-button" type="submit" value="Save"/> |
|
234 |
<input class="button" type="button" value="Cancel" onClick="forward('./admin')"> |
|
232 |
</form> |
|
233 |
</div> |
|
235 | 234 |
|
236 |
</form> |
|
237 |
|
|
238 | 235 |
<%@ include file="./footer-section.jsp"%> |
239 | 236 |
|
240 | 237 |
</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.