diff gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 283:ef10bf497a16

Added link in gui to export charts to pdf. gnv/trunk@382 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Mon, 30 Nov 2009 09:57:12 +0000
parents f38a86c2c012
children 47e3647af88f
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp	Mon Nov 23 16:30:33 2009 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp	Mon Nov 30 09:57:12 2009 +0000
@@ -11,9 +11,11 @@
     String target = "chart"; 
     String targetCSV = "csv";
     String targetODV = "odv";
+    String targetPDF = "pdf";
     boolean supportChart = sm.getOutputMode(target) != null;
-    boolean supportCSV = sm.getOutputMode(targetCSV) != null;
-    boolean supportODV = sm.getOutputMode(targetODV) != null;
+    boolean supportCSV   = sm.getOutputMode(targetCSV) != null;
+    boolean supportODV   = sm.getOutputMode(targetODV) != null;
+    boolean supportPDF   = sm.getOutputMode(targetPDF) != null;
     String mimeType = null;
     String parameterString = "";
     if (supportChart){
@@ -28,6 +30,10 @@
            }
        }
     }
+    String mimeTypePDF = null;
+    if (supportPDF) {
+       mimeTypePDF = sm.getOutputMode(targetPDF).getMimeType();
+    }
     String mimeTypeCSV = null;
     if (supportCSV){
         mimeTypeCSV = sm.getOutputMode(targetCSV).getMimeType();
@@ -45,6 +51,11 @@
             <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+parameterString+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.title"/>">
                 <img src="images/diagram_export.png" border="0"/>
             </a>
+            <%if (supportPDF) { %>
+            <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypePDF+"&target="+targetPDF+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.pdf.title"/>">
+                <img src="images/diagram_export.png" border="0"/>
+            </a>
+            <%}%>
             <%if (supportCSV) { %>
             <a href="<%=response.encodeURL("export.do?mimetype="+mimeTypeCSV+"&target="+targetCSV+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.export.csv.title"/>">
                 <img src="images/data_export.png" border="0"/>

http://dive4elements.wald.intevation.org