comparison gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 158:f38a86c2c012

Added link to export data as odv. gnv/trunk@291 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 06 Nov 2009 09:51:19 +0000
parents ad739da2802b
children ef10bf497a16
comparison
equal deleted inserted replaced
157:013d47662161 158:f38a86c2c012
8 <%Object diagramm = request.getAttribute("diagramm"); 8 <%Object diagramm = request.getAttribute("diagramm");
9 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request); 9 SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request);
10 if (diagramm != null){ 10 if (diagramm != null){
11 String target = "chart"; 11 String target = "chart";
12 String targetCSV = "csv"; 12 String targetCSV = "csv";
13 String targetODV = "odv";
13 boolean supportChart = sm.getOutputMode(target) != null; 14 boolean supportChart = sm.getOutputMode(target) != null;
14 boolean supportCSV = sm.getOutputMode(targetCSV) != null; 15 boolean supportCSV = sm.getOutputMode(targetCSV) != null;
16 boolean supportODV = sm.getOutputMode(targetODV) != null;
15 String mimeType = null; 17 String mimeType = null;
16 String parameterString = ""; 18 String parameterString = "";
17 if (supportChart){ 19 if (supportChart){
18 mimeType = sm.getOutputMode(target).getMimeType(); 20 mimeType = sm.getOutputMode(target).getMimeType();
19 DiagrammOptions diagrammOptions = sm.getDiagrammOptions(); 21 DiagrammOptions diagrammOptions = sm.getDiagrammOptions();
28 } 30 }
29 String mimeTypeCSV = null; 31 String mimeTypeCSV = null;
30 if (supportCSV){ 32 if (supportCSV){
31 mimeTypeCSV = sm.getOutputMode(targetCSV).getMimeType(); 33 mimeTypeCSV = sm.getOutputMode(targetCSV).getMimeType();
32 } 34 }
35
36 String mimeTypeODV = null;
37 if (supportODV){
38 mimeTypeODV = sm.getOutputMode(targetODV).getMimeType();
39 }
33 %> 40 %>
34 <div id="diagram"> 41 <div id="diagram">
35 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/> 42 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/>
36 <br/> 43 <br/>
37 <div id="export"> 44 <div id="export">
38 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>"> 45 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>">
39 <img src="images/diagram_export.png" border="0"/> 46 <img src="images/diagram_export.png" border="0"/>
40 </a> 47 </a>
41 <%if (supportCSV) { %> 48 <%if (supportCSV) { %>
42 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.title"/>"> 49 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>">
50 <img src="images/data_export.png" border="0"/>
51 </a>
52 <%}%>
53 <%if (supportODV) { %>
54 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeODV+"&target="+targetODV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.odv.title"/>">
43 <img src="images/data_export.png" border="0"/> 55 <img src="images/data_export.png" border="0"/>
44 </a> 56 </a>
45 <%}%> 57 <%}%>
46 </div> 58 </div>
47 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include> 59 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include>

http://dive4elements.wald.intevation.org