diff gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp @ 29:bba8fd97e549

Export and Diagrammoptions integrated into GUI gnv/trunk@133 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 25 Sep 2009 07:28:49 +0000
parents 367a00e4b9ad
children 07e9c137a2f1
line wrap: on
line diff
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp	Thu Sep 24 12:43:46 2009 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_diagramm_inc.jsp	Fri Sep 25 07:28:49 2009 +0000
@@ -1,11 +1,28 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
 <%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
 <%Object diagramm = request.getAttribute("diagramm");
 if (diagramm != null){
+    
+    String target = "chart"; 
+    String targetCSV = "csv";
+    boolean supportCSV = true; // TODO get from SessionModel
     String mimeType = "image/png";// TODO: get from SessionModel SessionModelFactory.getInstance().getSessionModel(request).
-    String target = "chart"; // TODO: get from SessionModel
-    %>
+    String mimeTypeCSV = "text/plain";// TODO: get from SessionModel SessionModelFactory.getInstance().getSessionModel(request).
+%>
     
     <div id="diagram">
-        <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+"&uid="+System.currentTimeMillis())%>' alt='Chart'>
+        <img src='<%=response.encodeURL("out.do?mimetype="+mimeType+"&target="+target+"&uid="+System.currentTimeMillis())%>' alt='<bean:message key="gnviewer.output.options.diagramm.alt"/>'/>
+        <br/>
+        <div id="export">
+            <a href="<%=response.encodeURL("export.do?mimetype="+mimeType+"&target="+target+"&uid="+System.currentTimeMillis())%>" title="<bean:message key="gnviewer.output.options.save.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.title"/>">
+                <img src="images/data_export.png" border="0"/>
+            </a>
+            <%}%>
+        </div>
     </div>
+    <jsp:include page="/WEB-INF/jsp/includes/display_diagramm_adons_inc.jsp"></jsp:include>
 <%}%>
\ No newline at end of file

http://dive4elements.wald.intevation.org