view 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 source
<%@ 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 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='<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>
<%}%>

http://dive4elements.wald.intevation.org