comparison gnv/src/main/webapp/WEB-INF/jsp/index.jsp @ 710:5f29bfeb61bd

Improved the design and layout of the user interface. gnv/trunk@980 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Sun, 25 Apr 2010 21:05:44 +0000
parents 7448b6f5f1ed
children a0e6566cd111
comparison
equal deleted inserted replaced
709:68d0fba6f23e 710:5f29bfeb61bd
13 Object staticui = request.getAttribute("staticui"); 13 Object staticui = request.getAttribute("staticui");
14 Object chart = request.getAttribute("chart"); 14 Object chart = request.getAttribute("chart");
15 Object statistic = request.getAttribute("statistic"); 15 Object statistic = request.getAttribute("statistic");
16 Object histogram = request.getAttribute("histogram"); 16 Object histogram = request.getAttribute("histogram");
17 Object wms = request.getAttribute("wms"); 17 Object wms = request.getAttribute("wms");
18 Object wms_published = request.getAttribute("wms_published");
19 String serverPath = (String) request.getAttribute("mapserver");
20 String mapfilePath = (String) request.getAttribute("mapfile");
21 String layerName = (String) request.getAttribute("layer");
22 String timeToLive = (String) request.getAttribute("ttl");
18 boolean furthertargets = true; 23 boolean furthertargets = true;
19 24
20 if (chart == null && statistic == null && histogram == null && wms == null) { 25 if (chart == null && statistic == null && histogram == null && wms == null) {
21 boolean supportChart = sm.getOutputMode("chart") != null; 26 boolean supportChart = sm.getOutputMode("chart") != null;
22 if (supportChart) { 27 if (supportChart) {
23 chart = "true"; 28 chart = "true";
24 } 29 }
25 } 30 }
26 31
27 Object furthertargetsObject = request.getAttribute("furthertargets"); 32 Object furthertargetsObject = request.getAttribute("furthertargets");
28 if (furthertargetsObject != null){ 33 if (furthertargetsObject != null){
29 furthertargets = ((Boolean)furthertargetsObject).booleanValue(); 34 furthertargets = ((Boolean)furthertargetsObject).booleanValue();
30 } 35 }
31 36
32 Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID); 37 Object exceptionMessage = request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_MESSAGE_ID);
33 exceptionMessage = (exceptionMessage != null ? exceptionMessage.toString().replaceAll(" ", ".").replaceAll(":",".").toLowerCase() : null); 38 exceptionMessage = (exceptionMessage != null ? exceptionMessage.toString().replaceAll(" ", ".").replaceAll(":",".").toLowerCase() : null);
34 exceptionMessage = (exceptionMessage != null && exceptionMessage.toString().endsWith(".") ? exceptionMessage.toString().substring(0,exceptionMessage.toString().length()-1) : exceptionMessage); 39 exceptionMessage = (exceptionMessage != null && exceptionMessage.toString().endsWith(".") ? exceptionMessage.toString().substring(0,exceptionMessage.toString().length()-1) : exceptionMessage);
35 40
36 boolean showmapviewercallBody = request.getAttribute("MAPVIEWERCALL") != null; 41 boolean showmapviewercallBody = request.getAttribute("MAPVIEWERCALL") != null;
37 42
38 String exceptionProject = (String) request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_PROJECT); 43 String exceptionProject = (String) request.getAttribute(CommunicationKeys.REQUEST_EXCEPTION_PROJECT);
39 exceptionProject = exceptionProject != null ? exceptionProject.toLowerCase() : null; 44 exceptionProject = exceptionProject != null ? exceptionProject.toLowerCase() : null;
40 exceptionProject = exceptionProject != null ? exceptionProject.replaceAll(" ", ".") : null; 45 exceptionProject = exceptionProject != null ? exceptionProject.replaceAll(" ", ".") : null;
66 <a href="<%=response.encodeURL("describe.do?uid="+System.currentTimeMillis())%>" title="<bean:message key="application.reload"/>"> 71 <a href="<%=response.encodeURL("describe.do?uid="+System.currentTimeMillis())%>" title="<bean:message key="application.reload"/>">
67 <bean:message key="application.reload"/> 72 <bean:message key="application.reload"/>
68 </a> 73 </a>
69 </div> 74 </div>
70 <%}%> 75 <%}%>
71
72 <br/>
73 <%if (showmapviewercallBody){ %> 76 <%if (showmapviewercallBody){ %>
74 <jsp:include page="includes/display_mapviewercall_inc.jsp" /> 77 <jsp:include page="includes/display_mapviewercall_inc.jsp" />
75 <%}%> 78 <%}%>
76 </div> 79 </div>
77 <div class="errormsg" id="load_error">
78 <%if (exceptionMessage != null){ %>
79 <bean-el:message key="<%=exceptionMessage.toString()%>"/>
80 <p class="reload">
81 <a href="<%=response.encodeURL("describe.do?uid="+System.currentTimeMillis())%>" title="<bean:message key="application.reload"/>">
82 <bean:message key="application.reload"/>
83 </a>
84 </p>
85 <%}%>
86 </div>
87 80
88 <%-- the parameter panel is following --%> 81 <table style="width:100%;">
89 <div id="parameterPanel"> 82 <tr id="contentRow">
90 <%if (staticui == null){ %> 83 <td id="parameterColumn">
91 <jsp:include page="includes/display_fis_inc.jsp"></jsp:include> 84 <%-- the parameter panel is following --%>
92 <%} else {%> 85 <div id="parameterPanel">
93 <div class="down"> 86 <%if (staticui == null){ %>
94 <fieldset> 87 <jsp:include page="includes/display_fis_inc.jsp"></jsp:include>
95 <legend><bean:message key="gnviewer.history.title"/></legend> 88 <%} else {%>
96 <%=staticui.toString()%> 89 <div class="down">
97 </fieldset> 90 <fieldset>
98 </div> 91 <legend><bean:message key="gnviewer.history.title"/></legend>
99 <%}%> 92 <%=staticui.toString()%>
100 93 </fieldset>
101 <%-- render the dynamic part to feed the state and advance to the next state --%> 94 </div>
102 <%if (ui != null){%>
103 <div id="timeseriesfilter">
104 <form id="fisSelectionForm" onsubmit="displayOverlay()" action="<%=response.encodeURL("next.do")%>" method="post">
105 <fieldset>
106
107 <%-- error message, if user input was not valid --%>
108 <%if (exception != null) {%>
109 <div class="inputException"><%=exception%></div>
110 <%}%> 95 <%}%>
111 <%=ui != null ? ui.toString().replaceAll("&nbsp;", "") : "" %> 96
112 97 <%-- render the dynamic part to feed the state and advance to the next state --%>
113 <%if(furthertargets){%> 98 <%if (ui != null){%>
114 <input style="margin-top: 5px;" type="image" src="<bean:message key="gnviewer.select.button.src"/>"/> 99 <div id="timeseriesfilter">
100 <form id="fisSelectionForm" onsubmit="displayOverlay()" action="<%=response.encodeURL("next.do")%>" method="post">
101 <fieldset>
102
103 <%-- error message, if user input was not valid --%>
104 <%if (exception != null) {%>
105 <div class="inputException"><%=exception%></div>
106 <%}%>
107 <%=ui != null ? ui.toString().replaceAll("&nbsp;", "") : "" %>
108
109 <%if(furthertargets){%>
110 <br>
111 <input style="margin-top: 5px;" type="image" src="<bean:message key="gnviewer.select.button.src"/>"/>
112 <%}%>
113 </fieldset>
114 </form>
115 </div>
115 <%}%> 116 <%}%>
116 </fieldset>
117 </form>
118 </div>
119 <%}%>
120 117
121 <%-- render export options if existing for this state --%> 118 <%-- render export options if existing for this state --%>
122 <jsp:include page="includes/display_export_inc.jsp"></jsp:include> 119 <jsp:include page="includes/display_export_inc.jsp"></jsp:include>
123 120
124 <%if (chart != null) {%> 121 <%if (chart != null) {%>
125 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_options_inc.jsp"></jsp:include> 122 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_options_inc.jsp"></jsp:include>
126 <%}%> 123 <%}%>
127 124
128
129 <%if (histogram != null) {%>
130 <jsp:include page="/WEB-INF/jsp/includes/display_histogram_options_inc.jsp"></jsp:include>
131 <%}%>
132 125
133 <%-- render wms options --%> 126 <%if (histogram != null) {%>
134 <%if (wms != null) {%> 127 <jsp:include page="/WEB-INF/jsp/includes/display_histogram_options_inc.jsp"></jsp:include>
135 <jsp:include page="/WEB-INF/jsp/includes/display_wms_options_inc.jsp"></jsp:include> 128 <%}%>
136 <%}%>
137 </div>
138 129
139 <%if (chart != null) {%> 130 <%-- render wms options --%>
140 <%-- render chart options if existing for this state --%> 131 <%if (wms != null) {%>
141 <jsp:include page="includes/display_diagramm_inc.jsp"></jsp:include> 132 <jsp:include page="/WEB-INF/jsp/includes/display_wms_options_inc.jsp"></jsp:include>
142 <%}%> 133 <%}%>
134 </div>
135 </td>
136 <td id="contentColumn">
137 <%if (exceptionMessage != null){ %>
138 <div class="errormsg" id="load_error">
139 <bean-el:message key="<%=exceptionMessage.toString()%>"/>
140 <p class="reload">
141 <a href="<%=response.encodeURL("describe.do?uid="+System.currentTimeMillis())%>" title="<bean:message key="application.reload"/>">
142 <bean:message key="application.reload"/>
143 </a>
144 </p>
145 </div>
146 <%}%>
147 <%if (chart != null) {%>
148 <%-- render chart options if existing for this state --%>
149 <jsp:include page="includes/display_diagramm_inc.jsp"></jsp:include>
150 <%}%>
143 151
144 <%-- render statistic --%> 152 <%-- render statistic --%>
145 <%if (statistic != null) {%> 153 <%if (statistic != null) {%>
146 <jsp:include page="includes/display_diagramm_statistics_inc.jsp"></jsp:include> 154 <jsp:include page="includes/display_diagramm_statistics_inc.jsp"></jsp:include>
147 <%}%> 155 <%}%>
148 156
149 <%-- render histogram --%> 157 <%-- render histogram --%>
150 <%if (histogram != null) {%> 158 <%if (histogram != null) {%>
151 <jsp:include page="includes/display_histogram_inc.jsp"></jsp:include> 159 <jsp:include page="includes/display_histogram_inc.jsp"></jsp:include>
152 <%}%> 160 <%}%>
161
162 <%-- render wms layer --%>
163 <%if (wms_published != null) {%>
164 <div class="outerMap">
165 <div id="wms">
166 <table>
167 <tr>
168 <td class="parameter"><bean:message key="gnviewer.wms.server.path"/>:</td>
169 <td class="wmsvalue"><%=serverPath%>?SERVICE=WMS&amp;REQUEST=GetCapabilities</td>
170 </tr>
171 <tr>
172 <td class="parameter"><bean:message key="gnviewer.wms.server.layer"/>:</td>
173 <td class="wmsvalue"><%=layerName%></td>
174 </tr>
175 <tr>
176 <td class="parameter"><bean:message key="gnviewer.wms.layer.ttl"/>:</td>
177 <td class="wmsvalue"><%=timeToLive%></td>
178 </tr>
179 </table>
180 </div>
181 <div id="map"></div>
182 </div>
183 <%}%>
184 </td>
185 </tr>
186 </table>

http://dive4elements.wald.intevation.org