comparison gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 397:dacfb0755956

Added download links for ZIP files and WMS layers. gnv/trunk@551 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 17 Jan 2010 11:52:17 +0000
parents 47e3647af88f
children 9005b39c52ac
comparison
equal deleted inserted replaced
396:8330c1dbab34 397:dacfb0755956
12 String target = "chart"; 12 String target = "chart";
13 String targetCSV = "csv"; 13 String targetCSV = "csv";
14 String targetODV = "odv"; 14 String targetODV = "odv";
15 String targetPDF = "pdf"; 15 String targetPDF = "pdf";
16 String targetSVG = "svg"; 16 String targetSVG = "svg";
17 String targetZIP = "zip";
18 String targetWMS = "wms";
17 boolean supportChart = sm.getOutputMode(target) != null; 19 boolean supportChart = sm.getOutputMode(target) != null;
18 boolean supportCSV = sm.getOutputMode(targetCSV) != null; 20 boolean supportCSV = sm.getOutputMode(targetCSV) != null;
19 boolean supportODV = sm.getOutputMode(targetODV) != null; 21 boolean supportODV = sm.getOutputMode(targetODV) != null;
20 boolean supportPDF = sm.getOutputMode(targetPDF) != null; 22 boolean supportPDF = sm.getOutputMode(targetPDF) != null;
21 boolean supportSVG = sm.getOutputMode(targetSVG) != null; 23 boolean supportSVG = sm.getOutputMode(targetSVG) != null;
24 boolean supportZIP = sm.getOutputMode(targetZIP) != null;
25 boolean supportWMS = sm.getOutputMode(targetWMS) != null;
22 String mimeType = null; 26 String mimeType = null;
23 String parameterString = ""; 27 String parameterString = "";
24 if (supportChart){ 28 if (supportChart){
25 mimeType = sm.getOutputMode(target).getMimeType(); 29 mimeType = sm.getOutputMode(target).getMimeType();
26 DiagrammOptions diagrammOptions = sm.getDiagrammOptions(); 30 DiagrammOptions diagrammOptions = sm.getDiagrammOptions();
49 53
50 String mimeTypeODV = null; 54 String mimeTypeODV = null;
51 if (supportODV){ 55 if (supportODV){
52 mimeTypeODV = sm.getOutputMode(targetODV).getMimeType(); 56 mimeTypeODV = sm.getOutputMode(targetODV).getMimeType();
53 } 57 }
58
59 String mimeTypeZIP = null;
60 if (supportZIP) {
61 mimeTypeZIP = sm.getOutputMode(targetZIP).getMimeType();
62 }
63
64 String mimeTypeWMS = null;
65 if (supportWMS) {
66 mimeTypeWMS = sm.getOutputMode(targetWMS).getMimeType();
67 }
54 %> 68 %>
55 <div id="diagram"> 69 <div id="diagram">
56 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/> 70 <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/>
57 <br/> 71 <br/>
58 <div id="export"> 72 <div id="export">
73 <%if (supportChart) { %>
59 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>"> 74 <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>">
60 <img src="images/diagram_export.png" border="0"/> 75 <img src="images/diagram_export.png" border="0"/>
61 </a> 76 </a>
77 <%}%>
62 <%if (supportPDF) { %> 78 <%if (supportPDF) { %>
63 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypePDF+"&target="+targetPDF+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.pdf.title"/>"> 79 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypePDF+"&target="+targetPDF+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.pdf.title"/>">
64 <img src="images/diagram_export.png" border="0"/> 80 <img src="images/pdf.png" border="0"/>
65 </a> 81 </a>
66 <%}%> 82 <%}%>
67 <%if (supportSVG) { %> 83 <%if (supportSVG) { %>
68 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeSVG+"&target="+targetSVG+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.svg.title"/>"> 84 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeSVG+"&target="+targetSVG+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.svg.title"/>">
69 <img src="images/diagram_export.png" border="0"/> 85 <img src="images/svg.png" border="0"/>
70 </a> 86 </a>
71 <%}%> 87 <%}%>
72 <%if (supportCSV) { %> 88 <%if (supportCSV) { %>
73 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>"> 89 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>">
74 <img src="images/data_export.png" border="0"/> 90 <img src="images/data_export.png" border="0"/>
77 <%if (supportODV) { %> 93 <%if (supportODV) { %>
78 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeODV+"&target="+targetODV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.odv.title"/>"> 94 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeODV+"&target="+targetODV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.odv.title"/>">
79 <img src="images/data_export.png" border="0"/> 95 <img src="images/data_export.png" border="0"/>
80 </a> 96 </a>
81 <%}%> 97 <%}%>
98 <%if (supportWMS) { %>
99 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeWMS+"&target="+targetWMS+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.wms.title"/>">
100 <img src="images/map_go.png" border="0"/>
101 </a>
102 <%}%>
103 <%if (supportZIP) { %>
104 <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeZIP+"&target="+targetZIP+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.zip.title"/>">
105 <img src="images/disk.png" border="0"/>
106 </a>
107 <%}%>
82 </div> 108 </div>
83 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include> 109 <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include>
84 </div> 110 </div>
85 <%}%> 111 <%}%>

http://dive4elements.wald.intevation.org